Home Unreal Engine

Can't wrap my head around using secondary UV channel for details

polycounter lvl 8
Offline / Send Message
Mant1k0re polycounter lvl 8
I vaguely recall reading something about a technique using secondary UVs for detail texture - I think it was a post by Rogelio. I can't seem to find anything but information on lightmaps when searching. Would someone care to explain briefly how this works or point me in the right direction...?

Thanks.

Replies

  • slosh
    Options
    Offline / Send Message
    slosh hero character
    You can add multiple UV sets to a mesh.  For detail normals, you can add a tiling normal map of say a weave pattern to a shirt and tile it a bunch of times to give it hyper detail up close.  This detail normal can be applied to a 2nd UV set in case your first UV set is not optimal for a tiling detail normal.  2nd UV sets are also great for env assets where you need a tiling texture for the albedo/spec maps but you want to break up the tiling with a dirt overlay.  The dirt overlay can go on the 2nd UV set and tile at a separate rate to make the base tiling look less uniform.  
  • Mant1k0re
    Options
    Offline / Send Message
    Mant1k0re polycounter lvl 8
    Thanks Slosh, I don't know why I posted this in Unreal section but since I have, I guess I'm now at the right spot to ask about shaders that would leverage this technique. Based on your explanations I surmise this is what Unity's standard shader is doing with the "detail texture" slot. How would one go about reproducing such a shader in UE4 material editor? Also, I am guessing having a secong UV set doubles a mesh vertex count in engine, is that correct?

    Really appreciate the help in any case.
  • musashidan
    Options
    Offline / Send Message
    musashidan high dynamic range
    You can use the Texturecoordinate node to access additional UV channels. By default 0 is your texture channel, 1 is your lightmap channel (you can change this to whatever) You can plug the texcoord node into whatever map and set it to whatever number uv channel you want to access.

    And yes, extra uv channels will add draw calls.
  • Mant1k0re
    Options
    Offline / Send Message
    Mant1k0re polycounter lvl 8
    Thanks, sounds simpler than I thought!
Sign In or Register to comment.