Home Technical Talk

Baking - Anistropy Maps - Pretty please, help me.

polycounter lvl 12
Offline / Send Message
Ace-Angel polycounter lvl 12
Hey to all,

I was wondering how one goes about creating a system for Anistropy maps.

I did some reading, and for the life of me cannot understand why Anistropy systems works only on the Diffuse maps, while having their own specialized Map.

Here is the tutorial I have been reading off from, trying to understand the system.
http://stephenjameson.com/tutorials/anisotropic-shader-for-hair/

Again, my main problem is how would one go about making the map? Is there a dirty way? Can you convert Tangents to Aniso-Maps through a program? Any input would be much appreciated.

Cheers and thanks.

Replies

  • Vailias
    Offline / Send Message
    Vailias polycounter lvl 18
    Oh Ace. :) So full of questions, and I'm glad you ask really, as it's turning this forum into an even greater repository of technical information than it was.

    As far as I am aware there is no way to "bake" anisotropic directional information, as there isn't any production renderers that encodes molecular or microsufrace alignment in it's material definitions.

    However you can paint an anisotropy map, or even just paint one channel and extrapolate the other.
    I've hand painted in one once, which kinda sucked as an experience.
    Ihave some ideas about good ways to do this, but I'll be testing them this weekend with my angel model. I'll post the results here later on.
  • Ace-Angel
    Offline / Send Message
    Ace-Angel polycounter lvl 12
    Haha, well, always useful to learn stuff I would say, and I like learning stuff :)

    Plus, I love technical stuff, usually its that 'need better technical graphics' stuff which bring aesthetics and style into play and makes them pop.

    Actually, funny note, your angel model is what inspired me to do some anisotropy test outs for metal and hair, your model has so much potential for playing around with anisotropic effects, that I thought I might as well learn this, since with all the next gen stuff we're doing including robots and sci-fi stuffs, but was sorely disappointed when the closest thing I found was 8monkey having their own solution for Marmoset, which isn't available to the public.

    Can't wait for you to finish your model, good luck with that!
  • equil
    i'm not near a real computer right now but there's a couple of different maps you can use to control anisotropy. in that tutorial it seems that they're just using a normal map (bent in the tangent direction?) specifically for the specular component, but usually i guess you'd bake tangent maps. you can do this in maya (in essence baking uv direction, so it requires a specifically uvmapped highpoly), not sure about other apps. there's also 2-component roughness, which allows you to stretch it in two dimensions. i personally think this is easier to author and isn't as reliant on the normals as a tangent map is, but you need a lighting model that works that way (ward, ashikhmin-shirley, kajiya-kay etc).
  • Ace-Angel
    Offline / Send Message
    Ace-Angel polycounter lvl 12
    Yah, I'm a fan of Kajiya-Kay ever since I saw Ruby from ATi, but not really something I can do with my skills or really want to delve to, so I was hoping for an 'artist' map based friendly solution.

    The best option (for hairs case) would be to unwrap and rotate your shells in the up/down direction, so you only need a simple constant value of RG. Add a quick normal map and marry with a set of constant to make the 'noise' values appear would also be dandy.

    But what about metal and other polished sci-fi stuff, which would benefit from said tech? They both serve the same idea from what I could read upon, but more complex stuff would certainly benefit from a map which guides the flow of the UV's direction.
  • Vailias
    Offline / Send Message
    Vailias polycounter lvl 18
    for what its worth, UDK has a slot for "anisotropic direction" in its standard material setup. Of course it only does anything if the material type is set to anisotropic.

    It takes a 2 vector corresponding to the direction perpendicular to the anisotopic highlight. It defaults to 1,0 which is up to down. Its range is the same as a normal map, that is -1 to +1 on both channels. However, for this particular map, just leaving a normal unpack of 0-1 won't harm it any.

    Knowing that you can paint just the vertical component to the anisotropy and calculate the horizontal component. I was planning to do that for the bare metallic portions of Angel, though I may skip it, as I have a ton of other materials going on anyway. :)


    Anyway, the anisotropy direction map, being two channel, can be viewed as a red/green texture. But since the anisotropy will be everywhere, you only need one channel to construct the other. Using Red for up and down grain the green portion is just 1-abs(r). This will only generate positive green values, but really, that should suffice for most applications, and saves a second texture channel for some other purpose.

    For what its worth, I'm going to implement something close to the Marschner reflectance model on Angels's hair. Gonna have to simplify or modify it some I believe, as I don't have a way to make look up textures like NVidia did for the Nalu demo.
  • EarthQuake
    When I was at 8ml we had an inhouse tool to "paint" the direction, or sort of "comb" the direction. How it worked was you had a 3d model, basic 3d paint interface and you would paint the direction map by literally drawing brush strokes in a certain direction. We used this for some horse textures to good effect.

    Unfortunately source code was lost and the app died of code rot.

    I think in the latest toolbag the aniso material has been modified to take a more "common sense" type of input that you can paint yourself without too much trouble.
  • Ace-Angel
    Offline / Send Message
    Ace-Angel polycounter lvl 12
    Actually, Toolbag was my second stop. I don't have it personally, so no idea, but I asked a friend of mine who has it if there is any artist friendly documentation on how to paint the Aniso maps, and he told me no.

    I also hit up their page, but still couldn't find anything about Aniso.
  • oXYnary
    Offline / Send Message
    oXYnary polycounter lvl 18
    Raising from the Dead. Is there a tutorial showing how to create a direction map? My hair is 3 dimensional with hair going in different directions versus just flat alpha strips so one color direction wont work.

    I cant seem to find anything. Including Marmoset Tuts. Stephens page is more a technical talk idea behind it and uses some tangent tricks versus a real direction map.
  • EarthQuake
    oXYnary wrote: »
    Raising from the Dead. Is there a tutorial showing how to create a direction map? My hair is 3 dimensional with hair going in different directions versus just flat alpha strips so one color direction wont work.

    I cant seem to find anything. Including Marmoset Tuts. Stephens page is more a technical talk idea behind it and uses some tangent tricks versus a real direction map.

    Check out this: http://www.polycount.com/forum/showthread.php?t=98844

    An aniso tutorial for Toolbag is something that is sort of on my mind, but I need to do some more research and actually figure out how to use it myself first.:poly124:
  • oXYnary
    Offline / Send Message
    oXYnary polycounter lvl 18
    Hmm... me thinks that the industry should change the name as to not get confusion with vector displacement maps.

    Thanks, wouldn't have thought to use comb as search term.
Sign In or Register to comment.