Hairy Issues // updated!

  / by Andy

hey there!

hair render test with curves

okay i have to admit it. this decision was quite hard to make: our characters will have hair – and not cartoony hair, but believable realistic hair!
so for me that meant, dive into blender, research and hope that i’d find a solution. admittedly, to this day there were only few convincing hair renders done in blender.
– dupliverted curves are ok for fur, have a nice appearance, but tend to look too repetitive and produce jaggyies in render
– particles are good for overall control of the hair system and material appearance but look crappy when rendered
– the fiber script has the ability to style hair in a good way, but produces heavy heavy heavy meshes
– the beast script looks ok and renders fast, but still has that card based look to it which is not acceptable for long flowing hair.

sooo… this was kinda tricky. duh!

i decided to go the curve based way because with the ‘UV orco’ feature it enables me to spread texture properties over the indidividual hair strands (dark color and opaque at the root, brighter color and transparent at the tip). so i first tried to make a good old fashioned hair furry ball and then slowly nudge it into a more hairy direction…

hair render test with curves hair render test with curves

blender renders 400 K hair strands (with 12 faces each) without any problems, but once we add the much needed transparency, render times climb up! but still… we were able to render a full HD (1920×1080) frame with hair in closeup in under 15 mins. this technique isn’t new, it’s been possible for ages – all the pics here to the left and right could have been done 6 years ago!

the tricky thing with geometry based fibers in blender is that once they’re more narrow than one pixel on rendertime, they show jaggy lines. z transparency helps to cure that a bit. and another drawback: it’s rather easy to make furry creatures with this technique but almost impossible to design a full fledged hairstyle!

so ton and i discussed this and we came to the conclusion that we need to extend the flexibility of the particle system to allow advanced styling and animation AND geometry based rendering with full shadow casting, specular, full control over material properties along the strands, render fast *takes breath* AAAND eliminate anti-aliasing issues to the maximum possible amount.

ton left, we went back too work. and only a couple of hours later i was completely amazed to see the first results in cvs – ready to play with!

the new improved hair solution is simple. static (animated) particles are rendered as a series of extruded faces which are parallel to the camera view, and blender makes sure that they’re rendered at the right size to produce no (or only minor) AA issues. workflow is easier than ever: make a mesh, assign static particles, add material – and off you go!
it’s also easy to add transparency and different color properties along the strand: since it uses the x axis to folow the strand you can simply add a blend texture with a colorband to control color and transp offset.

funky hair test with new particleson the todo list is the inclusion of the new particle patch which allows for guide curves (think of softbody guide curves!) and much more goodies for animated particles, too! also there has to be significant speedup with ztransp rendering and anisotropic shading is also planned. further we should be able to use vertex colors to influence hair density, direction and lenght.

here is a little test to show you the possibilities of the new particle rendering. it also uses a cloud texture on the eighth tex channel to make the hair curly. of course you need the latest, and i mean LATEST cvs to see it correctly (otherwise you’d just see the old usual crappyness)

UPDATE: now anisotropic (tangent) shading has been implemented:

woo

see ya! =D

« | »




61 Responses to “Hairy Issues // updated!”

  1. Derek Marsh said on 28 Sep, 2005:

    Now that looks friggin amazing! Great work @ndy and Ton on this. Finally realistic looking hair in Blender.

    BgDM


  2. Roel Spruit said on 28 Sep, 2005:

    Now that’s just plain cool


  3. Jonathan Merritt said on 28 Sep, 2005:

    This is very similar to the RenderMan approach to curves. It’s wonderful to see this implemented in Blender. It should open up the use of curve type geometry to a much wider community of artists. I can’t wait to see the results in the movie.

    So, when are we going to see splitting and dicing in the Blender renderer? Only 400K curves? :-P

    Jonathan Merritt.
    (Author of the first ever Open Source implementation of RenderMan curves. October 2002. ;-)


  4. thoro said on 28 Sep, 2005:

    Wow, I can’t wait to test this…


  5. Elam said on 28 Sep, 2005:

    I just compiled the newest cvs, 9/28, and Blender segfaults on the blend file you posted, Andy.

    Anyone else have this problem?


  6. Zeusbwr said on 28 Sep, 2005:

    I think its amazing how much Project Orange will contribute to blender. I’ve been stuggling with programs like Modo which has some nice handles, but blender always seems to bring me back :) ( ofcourse it also has the huge Opensource tag fighting for it hehe )


  7. Vassilios Boucer said on 28 Sep, 2005:

    I also have the Last CVS Built ….and the Example Blend file not Open! Error..!
    I can open only in 2.37a but not usefull in this!

    Great Work and all the best!!!


  8. Jinto said on 28 Sep, 2005:

    Had u tried MakeHair plugin?
    http://www.dedalo-3d.com/


  9. joeri said on 28 Sep, 2005:

    “could have been done 6 years ago!”
    Not in 15 minutes for a HD frame :)

    Amazing stuff Andy!

    “ton left, we went back too work. and only a couple of hours later i was completely amazed to see the first results in cvs – ready to play with!” *sigh* Don’t you just love that guy? Why is not everybody like that?

    Way cool.


  10. Ian Ross said on 28 Sep, 2005:

    BLENDER HAS MATURED TO PUBERTY.

    AT LAST!


  11. JoOngle said on 28 Sep, 2005:

    Great first go!

    Now…We’re looking forward to a way to “comb” particles so
    it’s possible to shape the hair instead of huge fuzzballs..

    …even though…we love fuzzballs.

    :)


  12. JuanJavier said on 28 Sep, 2005:

    [quote from Andy]: “…but still… we were able to render a full HD (1920×1080) frame with hair in closeup in under 15 mins.”

    —Another question relating resolution I posted a few days ago…What will the final render resolution be for the film? 1920p, 2K perhaps….even monster 4k? Just guessing….and awaiting an answer…

    A blender friend,
    Juan.
    Madrid, Spain.


  13. carlinhos said on 28 Sep, 2005:

    Can’t wait to play around with this cool stuff!
    Where can I download a testbuild including the new Particle System?
    All the Blender OSX versions I have downloaded from
    http://blendertestbuilds.de/index.php?dir=Testbuilds/Blender/MacOSX/BrianH/
    don’t run on my G5 with “Tiger”. Blender even don’t start.

    I am looking forward for the “Machina”-DVD, which I have already ordered.
    Gonna be a fantastic movie!


  14. NateTG said on 28 Sep, 2005:

    muahahaha… those are some DAMN cool hairballs. I’m confused though, is this curves or particles?

    \n


  15. Job said on 28 Sep, 2005:

    that hair is superb @ndy! thanx for sharing (though the cvs for macosx doesn’t work here too on Tiger :( )


  16. pofo said on 28 Sep, 2005:

    That is several shades of awesome. I spent much of Sunday trying to create realistic hair and just couldn’t do it.
    Haven’t dared playing with the testbuilds, so I’ll just save my bald characters until this becomes part of a regular Blender version :)


  17. DwarvenFury said on 28 Sep, 2005:

    AWESOME! I can’t wait to get my grubby little paws on a testing build.:)

    Will these new “hair particles” be detected by raytracing?


  18. JoOngle said on 28 Sep, 2005:

    Even better yet..when will these be availiable to Yafray? :)


  19. guitargeek said on 28 Sep, 2005:

    JoOngle, they do in the current CVS! Static particles are real faces and real faces render in yafray!!!! Here is an example.

    http://projects.blender.org/sharea/index.php?action=view&filename=yafstat2.jpg&PHPSESSID=667ec8d95894340d65621fcfb42572a4


  20. Toon Scheur said on 28 Sep, 2005:

    The hairstrands are always facing the camera? So does it mean that unexpected results happen when Hairy stands before a mirror?


  21. JoOngle said on 28 Sep, 2005:

    Guitargeek. Ah! Both good news and bad news then…
    because one of my newly “haired” characters crashed blender
    when I rendered to Yafray….I’ll check on this.


  22. JoOngle said on 28 Sep, 2005:

    Bug found!
    Latest CVS Blender crashes on using the Blender window
    for Yafray rendering preview (XML ticked/selected in the Yafray menu). This crash is consistent.

    More details in the bugtracker.

    /JoOngle


  23. Josh Belay said on 29 Sep, 2005:

    Awesome job!! I have been trying to create hair for ages, finally hair has arrived in blender. Thank You

    Shard


  24. wu said on 29 Sep, 2005:

    the power is on jack!


  25. Alexandre Rangel said on 29 Sep, 2005:

    Amazing work, guys! Congratulations to you all!


  26. Jarod said on 29 Sep, 2005:

    Congratulations!

    great work!
    thx @ndy for my nice new wallpaper ;-)
    And ton, real good job!

    Thank You guys!

    Jarod


  27. m0nki said on 29 Sep, 2005:

    you guy’s are amazing … this is truely the way things should happen in a tight development when the competences are available.

    reading this made me smile … you made my day.

    (still have the smile on my face)


  28. Wim said on 29 Sep, 2005:

    Finally some good things happening for the creation of hair directly in Blender! Thanks !!!!

    Well, I hope all these new improvements with ‘guided – curve – hair’ will be included in the next 2.40 version of Blender. Will it be, because I think a lot of people are really eager to have such a nice system?

    This would make it really really GREAT, because at the moment I’m not satisfied with the current hair methods as Andy mentioned in his article.

    Thanks again!!!


  29. Jiri said on 29 Sep, 2005:

    Well Andy,

    you have just show how to even increase our addoration by your update :-)

    Does anyone know where can be donwloaded Blender version which is capable to work with the test-file?

    Thank you very much.

    Jiri


  30. Michael said on 29 Sep, 2005:

    I’ve seen things like yafstat2.jpg come out of my cat. :)

    Looking forward to the new features. Thumbs up guys!


  31. Rui Campos said on 29 Sep, 2005:

    Jiri: it works great under Linux, at least in my box with latest CVS.


  32. Wim said on 30 Sep, 2005:

    Cool update! Excellent work, keep it up!


  33. Falgor said on 30 Sep, 2005:

    Thanks… I gonna get cool hair to my character, if I succceed in using this. I hoper we get this feature soon to blender!


  34. levon said on 30 Sep, 2005:

    “Well, I hope all these new improvements with ‘guided – curve – hair’ will be included in the next 2.40 version of Blender. Will it be, because I think a lot of people are really eager to have such a nice system?”

    with the other new particle features (particles that folow curves) you will be able to direct hair, and afaik it will be in 2.40, as well as the patch is already availible.


  35. Christiaan Bakker said on 30 Sep, 2005:

    Hope the new Blender is coming soon. I can’t wait to test all those new features(i don’t know anything about adding things to the source)

    Hope there is coming more soon


  36. Juan Javier Martínez said on 1 Oct, 2005:

    Are there plans for final render resolution? Which rez will be used?

    Don’t know if you have already made a decission on this……

    JuanJavier


  37. kindzu said on 2 Oct, 2005:

    “i think i saw a pussycat…” hehehhehehe
    good work, very, very good!


  38. The Masonmop (not my real name) said on 2 Oct, 2005:

    Wow, I always hoped that blender would have good hair, and there it is. It looks fantastic, but the one thing it is missing is slef shadowing. The hairs are all the same color, even the ones at the back, even though they’d be shadowed by the ones in the front.
    there’s an algorithm called deep shadow maps (http://graphics.stanford.edu/papers/deepshadows/) that fixes that. I’m not sure if it needs raytracing or not, but if it does, maybe you could get the people at yafray to put in support for it.

    I hope that helps, and keeps up the fantastic work
    If it keeps going like this, the movie will look fantastic.


  39. Andy said on 2 Oct, 2005:

    The Masonmop: the hair actually does selfshadowing. atm we’re working on optimising the render speed, too…


  40. JoOngle said on 2 Oct, 2005:

    Optimizing the render speed would be king, because right
    now…if you only have one computer – even if it’s fast
    and pretty much up to date with a lot of ram…its sloooooow

    But nice work, kudos to the coders!


  41. ezual said on 3 Oct, 2005:

    Whoohooo! Beast gets a mention!!
    Looking good people!
    Blend On!
    ezual


  42. christian kalidin said on 3 Oct, 2005:

    Can anyone show me how to install the particle patches


  43. Juan Javier Martinez said on 3 Oct, 2005:

    Andy: Are you the author of “Mindfields”?

    What a wonderful short! Provides lots of inspiration for other artists, as well….

    BTW (I think I made this question before) Are there plans about what the final render resolution of the film will be?

    Cheers,
    Juan


  44. Matt said on 5 Oct, 2005:

    Hi Juan, I’m not Andy, but we’re planning to render in HD 1920×1080, 24fps :)


  45. Juan Javier Martínez said on 5 Oct, 2005:

    [Quote from Matt]”Hi Juan, I’m not Andy, but we’re planning to render in HD 1920×1080, 24fps :)”

    —Very good idea. This a very nice output resolution and saves a lot of render time compared to 2K. Surely the difference in quality 1920p versus 2K will not be noticeable since 2k uses 1536 scan lines instead of the 1080 used by 1920p; one third less. I’m eager to see the results….

    —BTW I am planing to make a purchase decision for the DVD soon…I am almost convinced that Orange DVDs will run out. You will maybe have to make more….;-)

    That would be really great!!

    Cheers,
    Juan.


  46. kakapo said on 5 Oct, 2005:

    how does conversion of 24fps to 25fps (pal) and 29.97fps (ntsc) work?

    i guess for pal you can just play it faster and nobody will notice but for ntsc i have no clue how this could work without degrading quality a lot?


  47. Polygone said on 6 Oct, 2005:

    Kakapo.

    I believe frame-rate conversion is usually done through a process known as “pulldown”. (Think it’s 3:2:2 or just 3:2).

    I’m not sure entirely how it all works, but it seems to crop up all over the place whenever 24fps is mentioned.

    Perhaps the Project Orange guys can explain?

    By the way, since it’s my first post, good luck Project Orange :D


  48. kakapo said on 6 Oct, 2005:

    i have googled a bit… it seems like you can just encode the mpeg2 with 24fps and the dvd players will do the proper conversions.


  49. quickflash said on 7 Oct, 2005:

    Hello-

    Been playing with this stuff a bit and was trying to figure out ways to speed things up. One thing I noticed is that if you do not need a shadow from the strand particle object itself cast upon other objects, than you can move it to it’s own layer and have the lights on it be for that layer only (with shadow). However, in order to get light on any other object in the scene with shadows, you need to move all those objects into their own layer and place another light. Is there anyway to add a “not this layer” light option that does not effect objects in it’s own current layer?


  50. Matt said on 8 Oct, 2005:

    It’s a bit clunky, but in case you didn’t know, an object can be on more than one layer at the same time (hold shift). Maybe this will help finding a setup that works nicely.


  51. mrfranz said on 8 Oct, 2005:

    I just find a way to animate particle with a wind emitter, using an ipo driver. A made a test video which you can found
    here .


  52. quickflash said on 8 Oct, 2005:

    @Matt: No, didn’t know that, and yes that helps :)


  53. chris said on 12 Oct, 2005:

    Hi,

    This is great:
    -any ideas on when this will be in a release blender version
    -are there people around who could write a short turorial?


  54. Kamil said on 23 Oct, 2005:

    The funkyhair.blend is rendered right in 2.40alpha release.

    (applying wind in proximity, enabling softbody -> strands flicker in the wind)


  55. Shane said on 26 Oct, 2005:

    i cant make the python script for the particel update work


  56. the buzzer said on 28 Oct, 2005:

    For some of u guys living in a world where u can make a choice on which 3D application to use, it may sound like… “if not blender, it could be another modeller out there”, u may have 3ds max or maya in u local software shop, and have the lots on euro to buy.But in Africa, Blender is a blessing.Less that 10 MB on slow internet connections, a wonderful community, and all these guys working endlessly to make things like this happen.I think I’m going to cry.Ton and the rest, u guys are like stars to me.What can a guy like me do to keep this going on? Cheers all!


  57. Paul said on 4 Nov, 2005:

    Blender is so friggin sweet. Blender has got the magic of great minds, freedom, and lots of enthusiasm.


  58. Mishel said on 4 Apr, 2006:

    JEG VIL HA LITT IS!!! ELLERS


ok