Home Technical Talk

Shader Discussions and shenanigans

J.I. Styles
polycounter lvl 18
Offline / Send Message
J.I. Styles polycounter lvl 18
I've wanted to create an open discussion on various shader crap for a while now, and with more people getting into authoring shaders it seems now's the time to make a thread in ye olde 2d/3d discussion forum tongue.gif

To kick things off, first up, I've been tinkering around with hair and fur recently, created a pretty cool shell shader - I've been thinking about lighting methods and how to do directional lighting on the shells. Basically I'm aiming to get it as though each hair had cylindrical lighting. The two methods I'm thinking of is:
- having a normal map with 4 normal directions per strand and bending them towards the light source, biasing the eye vector
- a linear view direction method - eye vector versus light vector.

at the moment these are both pretty half-arsed ideas, but I did want to get them out there and see if anybody had anything to throw back at me.

Besides that stuff, I wanted to ask what people would want in a shell hair shader... what's your wishlists laugh.gif

Replies

  • CrazyButcher
    Offline / Send Message
    CrazyButcher polycounter lvl 20
    could you please illustrate your idea ?
    other than that, trial and error rules =) the good thing is that shaders are typically not too long, ie not insane amount of work to just experiment with it. I found that most solutions come up as hack/mix of other solutions...

    wishes, well dynamic fur =), although you cannot trivially do that in a .fx viewer like max.

    I think this one was good
    http://www.shadertech.com/cgi-bin/shaders.cgi?filter=-1&page=6
  • Eric Chadwick
    Have you tried implementing a BRDF? That should be able to give you PP anistropy, if done right, good for micro-cylinder hair lighting.

    http://boards.polycount.net/showflat.php?Cat=0&Number=121008&an=&page=0&vc=1
    We have a couple controls for it, but it hasn't been on the front burner so it isn't working in our runtime yet. frown.gif

    I'd like to see controls like we have for our X and Y, except maybe each as an editable gradient (ala Gradient Ramp map) instead of munged together in a single bitmap. Also would like a per-pixel control for amount of BRDF-ness. So for example the a mohawk's short-shaved side-hairs would get less anisotropic than the tall central hairs. Or Lara's braids could have different BRDF than the rest.

    For shells I'd love to see an easier way to generate the transparency map(s). A graphics programmer here recommends using a 3d volume texture to get differences in hair thickness from bottom shell to top shell. Or else you can go the Shadows of the Colossus route and just replicate a single shell tex, offsetting it on each shell to create hair-flow.

    Also apparently it's better to match the style of the fin texture with the style of the shell texture(s). Not just color but placement of the strands.

    Should have controls for # of shells, # of fins (every edge, every other, every third, etc.), length of fins, depth of shells.

    Per-pixel masking of where shells/fins are grown or not. Maybe this is better as per-vertex, using vert alpha or somesuch.

    Just spouting ideas. Sounds like a cool project.
Sign In or Register to comment.