Go Crazy with Dynamic Hair( Part II)

Since the result for the puffer ball dosen’t look to bad, I wanted to do more with the dynamic hairs. I am taking Independent study with Prof. Bridge Gaynor, so I can free free to do what I want to achieve. The video below is the result. In this project, for the dynamic part I am pretty satisfied. However, for the lighting and intergration part, since I had a lot of trouble with the hair cache(which is famously known as bad), I did not  have much time do make the lighting look good…. I will re-light the scene during the summer.

Anyway, here is the result for right now:

result for right now

BG and Look development:

I shot the BG plate at the Jepson center of Savannah, and I wanted to create a senario that things are a little different than normal. I want to create the CG jelly fishes floating and “swimming” in the air. Beside the jellyfish, I want some CG water coming down the steps. With these two major different CG elements, I need use Maya, MEL, Pymel, Houdini, which makes this project really exiting to me.

Here is the BG shot:

shot with HVX200 and tracked with PFTrack

shot with HVX200 and tracked with PFTrack

I shot the scene with HVX200 camera, tracked it with PFTrack, and created proxy geometry for houdini as collision objects for the water.

Jelly Dynamic:

Attempt 1: In the beginning I planned to create dynamic hair, then use pointOnCurveInfo node to position joints, also add a expression to each joint(force the joint translate with the curve’s certain U value). Then after this, skin the pre-modeled jellyfish geometry with the number of joints….here is a test result:

with joints created, not very efficient way

with joints created, not very efficient way

As people can easily imagine, this approach is very inefficient, too many non-properly used nodes such as expression node, pointOnCurveInfo node have been added into the construction history. And the playback is really slow even just with one jellyfish in the scene.

Attempt 2: Instead of using joints to deform the geometry, simulate the hair curves and then loft a surface based on the curves is much easier and straigt forward. So I deleted the hand modeled geometry, twicked the script to automatically duplicate hair curves, then create a loft based on the hair curves. As a result, as long as the hair curves are dynamic, the surface is moving correspondingly.

here is the result:

lofted surface version is much faster than joints skin version

lofted surface version is much faster than joints skin version

In addition, I changed the curves from 2 skin curves to one skin curve, which will prevent the penetration issue in the later on dynamic simulation stagest(the self collide will help the hair curves reduce the likeness of penetration)

Attempt 3: To get a better control of simulation, make the rest curve pre-animated or pre-defined is better. So I created a blendshape for the rest curve, and when the blend value chage from 0 to 1, the rest curve will change from close position to open position, which represent the open and close motion of the jelly skin.

blendshape animation

Attempt4: After this, I lofted the surface, and based on the surface’s U value, I attached 600 folicles onto the surface, then each folicle has been attached a dynamic hair curve. 600 is pretty decent for the density of small curves on the edge of the skin. All these folicles and hairs are go with a new hair system that gives a seperate hair behavior control.

What’s more,  I added another hair system and some dynamic hairs to represent the long organic skin. Three other surfaces have been lofted based on the motion of the hair curves. Addition to this, a simple cluster and a circle as a controller created as a easy rig. As a result, the controller moves the shape node of the rest curves, causing all the dynamic system to response.

And here is the result:

all hair systems for a jelly created

all hair systems for a jelly created

Attemp 5: For the sake of better control of simulation tweaking, I wrote the UI for the tool:

As user can see, I can set and key random value to the open_close value of the jelly’s skin, which brings the jelly to live. Also, to get individule jelly’s corresponding hair system and cache them, some helper funcion such as “select hair system” and “set start frame” added:

UI to get better control and simulation

UI to get better control and simulation

Final result for the simulation part:

playblast of dynamics


a. The dynamic hair cach system in Maya has been offering a really bad time. I ‘ve tried to customize the hair cache a litlle by constructing my own cache command. However, after this, Maya would never find the correct cache file again. I searched online for a while but no good anwser…. Which make me really unhappy was, since Maya can’t find the right cache, before it go to batch render the frames, it will re-simulate all the systems. This problem has been enlarged 10 times because I set up at least 10 render passes in my maya scene. As a result, even though the local render time was 3-10 second per frame per pass in average, I could not render my sequence within 2 hours per frame on the render farm, In the end, I have batch render locally, which consumed my time should be decicated to the lighting part.

b. another problem is a little weird but I think is fixable:

I wrote all the script in Windows. It works fine and the UI works perfectly. However, when I worked on Linux, the UI dosen’t display correctly. Except all the framelayouts, I lost all the buttons, fieldgrps, and instruction texts… Weird…Will looking into it later.

And the here is the lighting breakdown so far:

lighting breakdown

Special Thanks:
I need to appreciate Prof. Bridget Gaynor and prof. Ken Huff, without their greate suggestions I would finish this with more unnecessary pains.

Leave a Reply