Home Unreal Engine

UE4 stain roughness on metal texture

polycounter lvl 15
Offline / Send Message
Swarm22 polycounter lvl 15
I'm trying to achieve the result in the example I included. A metal surface that has varying degrees of roughness. I took this from unreal and simplified it a bit. I'm sure it could be simplified more and still get the same result but my lunch break is over and im going to be stewing over this all day now in my head.

Is there a more simple way to achieve this effect? What do these coloured constants have to do with this network? As far as I could tell they did not effect the result no matter what colour I picked.

Thanks

Replies

  • almighty_gir
    Offline / Send Message
    almighty_gir ngon master
    you're using a single channel from three different vector3's, why not put each value you want into a different channel of a single vector3? that would be way more efficient than what you're doing now.

    Also, i'm not fully understanding exactly what this is supposed to achieve... the alpha texture you're using in the linear interpolate would give you a variance in roughness, the only thing the interpolate is doing is changing the min/max values.
  • iniside
    Offline / Send Message
    iniside polycounter lvl 6
    You over thinked it, and I'm not sure what are you trying to achieve with it.

    Just put your roughness mask in any of RGB channels. Then put into Alpha slot of Lerp node, put two scalars into A,B slots and you are done.
    Why are using vectors here is something I can't really understrand.


    If you are feeling fancy, instead of packing textures into separate channels, you can create Atlas, and then extract each texture from it. Though this setup is more complex, it might be have better performance in some cases, as you are not limited to only 4 textures.
    Also, i'm not fully understanding exactly what this is supposed to achieve... the alpha texture you're using in the linear interpolate would give you a variance in roughness, the only thing the interpolate is doing is changing the min/max values.
    It's easier to tweak two scalars in instance material editor, than tweaking textures. That is why you should actually never plug textures directly into Roughness/Metallic/Specular.

    In some cases using textures as masks for Refraction/Subsurface/Opacity is also more beneficial than pluggin them directly.
Sign In or Register to comment.