Home Unreal Engine

Metalness doesnt have to be 1 or 0

polycounter lvl 12
Offline / Send Message
Rockley Bonner polycounter lvl 12
But I thought metalness was to save processing power. If its not black and white wouldnt have to be more than 2 channels? So then what would be the point of using metalness?

Replies

  • EarthQuake
    Options
    Offline / Send Message
    First off, metalness doesn't always have to be 0 or 1, but it generally would be. Most materials are either metal or they are not. Very few materials are partially metal in reality, and materials like rust/oxidization are not metal anymore (simply used to be metal). However, it can make sense to have some gray values in transitional areas, as rust transitions to metal, dust/dirt with a soft edge, etc. But really, most materials are simply 0 or 1.

    The metalness workflow doesn't save processing power, what it does save is texture memory. A metalness map is typically an 8 bit image, and would often be packed into a single channel of a 24 bit image, while the other two channels have some other content, for instance:
    R: metalness
    G: roughness/gloss
    B: cavity/ao

    This means you can pack all of that data into the space of a full-color specular map, so its generally a more efficient workflow memory wise, but processing power isn't really here nor there.

    Now, in most cases, if you're using only black and white, there are very few texture formats where this would give you any real savings. I think DXT1 with 1 bit alpha channel would be the only format which makes any sense whatsoever, and this would limit you to not having any grey values for transition effects or even anti-aliasing. So this isn't very common at all. If your material is all one material type, say wood, rock, or steal, then you don't need a texture map at all and can use a constant instead, which is the most efficient way to do it.

    Lastly, having values other than 0 or 1 would not require more than two channels, I'm really confused what you even mean by this, whether your metalness map contains only 0 or 1 values, or various shades of gray, it can be saved as a single channel no matter what.
  • Rockley Bonner
    Options
    Offline / Send Message
    Rockley Bonner polycounter lvl 12
    Thanks! that makes more sense and gives me a few Ideas as well :)

    I was mistaken, I thought that a two channel texture would only have black and white while a grey would be a RGB (three channel) texture sense the gradation.
  • EarthQuake
    Options
    Offline / Send Message
    24 bit RGB images are made up of 3 grayscale channels, one for each: red, green and blue. So either of those singular channels can store enough data to represent a metalness, roughness, ao, or any other colorless texture.
  • ZacD
    Options
    Online / Send Message
    ZacD ngon master
    I just wanted to expand on what EQ was saying, If you are doing this approach with most of your textures

    R: metalness
    G: roughness/gloss
    B: cavity/ao

    and you have an asset where you can just plug a constant into the metalness, you can use that channel for things like emissive, opacity, and masks.

    Also there has been a few time I have noticed sometimes with modern interior designs that they like to use a semi metallic paint, I'm not sure where in the range of 0-1 in PBR range these would fall, they obviously are not metals or non-metals. Stained metals can also seem to have a big variation and ranges that fall into the middle of metal and non-metal.
  • marks
    Options
    Offline / Send Message
    marks greentooth
    Yeah I think stuff like car paints are often the same - it's done with huge amounts of tiny metallic flakes in the paint. So on a micro scale it's still a 0 or 1 metallic value, but at the pixel scale you'd use in a texture it kinda needs to be somewhere in-between to approximate.

    Probably one of the few surfaces that legitimately needs to "break the rules" a little bit to accurately recreate. I think a bunch of complex surface treatments all sit in the same boat.
Sign In or Register to comment.