Home Technical Talk

Hair Techniques - When should I tweak normals?

polycounter
Offline / Send Message
Justo polycounter
In the hair Round Up thread I was surprised to see the SlideNormalThief script being used in one video. It was at the very end of the work, aligning all the hair normals to a blobby shape that resembled the hair's silhouette. 

Was this used to permanently fix the problem of intersecting hair cards, much like people use this script for foliage? Even though this was something to be put into TB2, I rarely see people doing this. Why is this so?  

Also, while I'm talking about this script, I'd like to point out to anyone interested that supposedly there's a newer better version of it made by Noors

Replies

  • Eric Chadwick
    Options
    Offline / Send Message
    This is likely done to improve shading. But it does not fix other errors, like alpha sorting wrong, you have to fix that with alpha-to-coverage or other methods.
  • Eric Chadwick
  • Justo
    Options
    Offline / Send Message
    Justo polycounter
    You say improve, but is it really better? How so? Applying the script definitely makes it look different, but I can't tell if better is the case. Does doing this make hair behave better in a wider margin of lightning setups, perhaps? 

    Also, do not answer if this is too big of a tangent, but on the topic of alpha blending methods, I have a hard time relating which method is being applied in which app with so many names. Alpha testing, in other apps like TB2, is known as Cutout, while Alpha-to-coverage would be Dithering? 

  • Eric Chadwick
    Options
    Offline / Send Message
    Which video were you watching? Curious to see the before/after. 

    Here's foliage with bent vertex normals, you would get similar results with hair. 
    http://wiki.polycount.com/wiki/Foliage#Vertex_Normals

    A little further up on the Transparency Map wiki page, a few of the alpha methods are explained. After reading that, if you don't understand how they're different, then feel free to ask again.
  • AtticusMars
    Options
    Offline / Send Message
    AtticusMars greentooth
    Justo said:
    You say improve, but is it really better? How so?
    It softens the shading so that looks more like a volume than a bunch of cards with textures pasted on them. For some hair types you might be able to get away with not doing it but it will improve the shading in the overwhelming majority of circumstances.

  • Justo
    Options
    Offline / Send Message
    Justo polycounter
    Eric, I did read it before asking, sorry if I sounded too ignorant about that. The video you asked for is this one, the script being applied around the 21:30 mark. About  transparencies, am I correct to assume the biggest difference between A2C and Blend is that the former does not need depth-sorting-by-ZBuffer, while Blend does? Because visual-wise, they look pretty sameish to me, sorting-issues excluded. So in TB2 terms, alpha test=cutout, and dithering=A2C?

    @AtticusMars Interesting, thanks for the input. Would you use this technique too for more extreme cuts, like curly hair or ponytails? 
  • Eric Chadwick
    Options
    Offline / Send Message
    Here's the difference, they tumble it in Marmoset before and after:
    https://www.youtube.com/watch?v=v13EPr4DCs8&t=1098<br>https://www.youtube.com/watch?v=v13EPr4DCs8&t=1312

    Kinda subtle, but before each polystrip gets it own local bit of lighting, while after the lighting is wrapped a bit more around the whole head. It's just spreading out the lighting response.

    Alpha-to-coverage is similar to alpha test, but it's multi-sampled to create a softer result. It gives you 9 or so levels of transparency, which isn't all that obvious if the screen pixels are small, but more obvious as the resolution drops.

    Alpha blend uses 256 levels of transparency, and has all kinds of sorting problems. Alpha-2-coverage avoids that, at the cost of performance and some dithering artifacts.
  • Justo
    Options
    Offline / Send Message
    Justo polycounter
    I see, thanks for replying Eric. In regards to the TB2 terms, I'll assume cutout resembles alpha test, and as for dithering I found a line in the Marmo Viewer page saying this method is "a mix of alpha blend and alpha test".

    I believe you're correct in explaining why the hair looks better; I couldn't describe exactly the changes. I'll eventually make some tests and see for myself, but would you say altering these normals may conflict with stuff like anisotropic highlights?

    Still, I wonder why I do not see this being used more often. What's more, I see some haircuts that should run into shading problems where the hair cards are intersecting each other (pic below), but the end result looks just fine. Shouldn't it look bad, since the vertex normals are not being altered?


  • Eric Chadwick
    Options
    Offline / Send Message
    It looks like the untextured models aren't the same ones used in the textured shot. The untextured shading is very different. You would see the same dark edges in the textured shot. The normals must be bent.
  • Justo
    Options
    Offline / Send Message
    Justo polycounter
    Ah, I see. Thanks Eric!
Sign In or Register to comment.