Home Technical Talk

What is a "direction map"?

sr3d
polycounter lvl 2
Offline / Send Message
sr3d polycounter lvl 2
I've never heard of this kind of map.  Someone said that a direction map was used for hair like in Lara Croft Tomb Raider.

http://www.windowscentral.com/sites/wpcentral.com/files/styles/larger/public/field/image/2015/07/rise-of-the-tomb-raider.jpg?itok=nQtOk-Ob

Xnormal has an option to make a direction map.  What does a direction map do? How would I use a direction map in Max or Maya for example?


Replies

  • slosh
    Offline / Send Message
    slosh hero character
    Directional maps are used for anisotropic shaders in game engines.  They are used to let the shader know which direction the hair is flowing.  Sometimes the shader will be set up so that you don't necessarily need this map if all of your hair cards are flowing either vertically or horizontally in your UVs but if you splay out the hair in all directions, you would require this map for the shader to work properly.  I'm sure a graphics coders could better explain the tech working under the hood but this is a directional map's main purpose.  I am not sure how this can be applied in maya or max or for offline renderers because my only experience with them are in game engines.  These maps can be created by hand but I have also heard that Mari can create them.  Here is a tutorial that explains how you can make one:

    http://polycount.com/discussion/98983/how-to-paint-flow-anisotropic-comb-maps-in-photoshop
  • Neox
    Offline / Send Message
    Neox veteran polycounter
    slosh said: These maps can be created by hand but I have also heard that Mari can create them.  
    You still create them by hand in Mari, just in 3d.

    recently i have been thinking, usually what you do is paint them and then you blur them. Why not do them directly in vertexcolors? Unless you use vertexcolors for hair, the memory imprint would be way way less than a texture. it would all be nicely smooth. AND you wouldnt have to worry about UV seams.
    I guess this would be a cool task for a tech artist, writing a way to comb vertex normals and then bake this info into vertexcolors.
  • sr3d
    Offline / Send Message
    sr3d polycounter lvl 2
    I get it. They are mainly used for game engines. 

    Hair is generally made up of hair cards, but also a base scalp hair.

    1. Hair Cards Texture
    2. Hair Scalp Texture

    Does the base scalp hair also need this direction map?

    See the hair scalp and how tight it is? Would that need this direction map?



    Example, does this hair scalp need a direction map for flow of hair?

    http://cdn.buzznet.com/assets/users16/emerymonroe/default/tight-sleek-ponytail--large-msg-134394559571.jpg






  • Eric Chadwick
  • sr3d
    Offline / Send Message
    sr3d polycounter lvl 2
    Can't a simple specular map for hair achieve the same result?
    Wait, it's not the same.  Oh god, I have to make yet another map? This is getting annoying lol.
    I found some more information to add to the pool of knowledge: https://udn.epicgames.com/Three/AnisotropicLighting.html
    It seems Unreal Engine uses your normal map to figure out the anisotropiclighting?
    "You can also specify a normal map as usual and the normal will perturb the anisotropic direction. "
    Since I'm using Unreal ENgine 4, does this mean I don't need a direction map since I already have a normal map?
  • ActionDawg
    Offline / Send Message
    ActionDawg greentooth
    Anisotropy, roughness, and normals are all highly interrelated concepts, just treat this as an effect where you feel its needed. In the future roughness maps will probably be anisotropic by nature in the next iteration of video game shaders, as that is far better solution (look up Valve's VR  GDC talk).

    For now, use normals to define the detail of your object and anisotropy to stretch highlights as necessary.

    Direction map can mean a few things. In xNormal it's a vector displacement map I believe.
  • kodde
    Offline / Send Message
    kodde polycounter lvl 18
    I've used LoTekks software Flow Map Painter when I was playing around with flow maps for animating water flow a few weeks back. Light weight and works well. Not sure if it is useful for anisotropic specular directions as well?
  • slosh
    Offline / Send Message
    slosh hero character
    sr3d said:
    I get it. They are mainly used for game engines. 

    Hair is generally made up of hair cards, but also a base scalp hair.

    1. Hair Cards Texture
    2. Hair Scalp Texture

    Does the base scalp hair also need this direction map?

    See the hair scalp and how tight it is? Would that need this direction map?



    Example, does this hair scalp need a direction map for flow of hair?

    http://cdn.buzznet.com/assets/users16/emerymonroe/default/tight-sleek-ponytail--large-msg-134394559571.jpg






    Yes that would need a directional map for the anisotropic shader to work and highlight it correctly...
Sign In or Register to comment.