[Sidefx-houdini-list] Feather/Fur for Bird

Peter Claes claespeter1 at hotmail.com
Sun Jan 17 10:06:57 EST 2010


Hi,

The more advanced way to get around the memory limitation issue (especially for the body feathers) is to make use of delayed load geometry shaders. There are limitations with this - such as no raytracing, but you can render huge amounts of data with this technique.
Or you can use the clusterThis dso : http://www.digitalcinemaarts.com/dev/clusterThis/index.html
Or you can write your own dso using the hdk, but you'll need to be able to program in c++. 

I have just writen my own dso which performs very similar functionality as the copy sop, but at rendertime. I have been able to render up to 160 million points with 10gig of ram. You can render up to 40 million with 2 gigs of ram. Rendertimes are also really fast, considering the amount of geometry being rendered a single 2k frame can render in 4-5 minutes without shadow, and 8-9 minutes with a shadowmap. The procedural will be called for each light, which makes adding lights slower, but at least you can get huge amounts of geometry rendered with fairly low amounts of ram.
You will still need your orient attributes, or up vector and N or v vectors. 

I hope to explain how to write your own dso in a future video tutorial. But for now, the easiest way is to look at the examples that ship with the hdk and combine the demofile with the demostamp example.

Good luck,
Peter Claes


> Date: Sun, 17 Jan 2010 00:14:21 +0200
> From: eoyilmaz at gmail.com
> To: sidefx-houdini-list at sidefx.com
> Subject: Re: [Sidefx-houdini-list] Feather/Fur for Bird
> 
> Hi Diana,
> 
> In our last project, I've used Houdini to create 3 pigeon characters
> feathers. The characters were rigged in Maya.
> 
> You are right, the best way is to use Copy SOP with orient quaternions.
> Instancing is not efficient, because, the base feather that is going to be
> copied over the geometry generally has a very low number of polygons, so it
> is not efficient to store all the matrices.
> 
> I'll try to summarize my approach in these steps:
> 
> *Exporting from Maya:*
> 
>    1. The characters are rigged and animated in Maya.
>    2. The order of the objects when exporting is important, you should
>    always export the objects in the same order or it will not work, so I stored
>    the selection list in characters XFORM notes attribute (simple and quick
>    solution), I've then used this attribute to automate and use the render farm
>    for this export process
>    3. Then converted them to bgeo.gz to reduce the disk usage in the file
>    server
>    4. I've also exported the T-Pose of the characters as OBJ models to be
>    used as the Rest pose which is needed to have stabilized feathers on the
>    characters over the frames
> 
> I think I need to write a bgeo exporter for Maya...
> 
> *Houdini Part*
> We need to import the character sequences and then create the feathers...
> 
> *The Character:*
> 
>    1. Create a geometry node and give it a name like "bird_geo" or something
>    ( '*_geo' is important cause later on it will be used in light linking)
>    2. Load the bgeo.gz sequence (I'm going to call it Live Geometry or Live)
>    and the T-Pose OBJ file (Rest Geometry) with two File nodes
>    3. Attach a VOP SOP to the Live Geometry and pipe the Rest Geometry to
>    the second input
>    4. Store the Rest Geometry point positions in an vector attribute called
>    'rest' in the Live geometry
>    5. Do your material assignments and add a Null at the end of the graph
>    and rename it RENDER
>    6. I've also calculated the v (velocity) of each point by using a
>    timeShift and a VOP SOP node, to have the motion blur of the geometry and
>    the feathers
> 
> *
> The Feathers:*
> ( The overall thing is like that: Import the geometry, move it to rest
> position, create the orient quaternion and reorient the quaternion attribute
> to the live geometry, then create the feathers with that orient values )
> 
>    1. create another geometry node, and go inside this node
>    2. use an "Object Merge" node to merge the "bird_geo"s RENDERs output to
>    this geometry
>    3. create a VOP SOP and move the points to the rest position (the T-Pose)
>    by connecting rest to P (we will calculate the orient quaternion in the rest
>    pose and then reorient it to the live pose, this is the best approach to
>    have stable feathers over time )
>    4. create a comb node ( to have the featherDirection vectors)
>    5. set override normal to an attribute called "featherDirection" and
>    paint the directions that your feathers are going to point at
>    6. create another VOP SOP and call it projFeatherDir_vopsop
>    7. inside projFeatherDir_vopsop, what we simply need to do is to project
>    the featherDirection vectors over the geometry, to have perfectly orthogonal
>    vectors to the normal (N) vector of the geometry, you can simply do that by
>    using to cross product nodes ( (NxF)XN will give you the projected vector )
>    8. create attributes like inclanation, randomRotation, pScale ( I don't
>    recall if it was pscale or pScale, it is a variable that Houdini understands
>    by default)
>    9. then create paint nodes for each of them ( paint_inclanation,
>    paint_pScale ignore the randomRotation for now )
>    10. I've used a simple expression (which I don't remember now) in a Point
>    node to fill the randomRotation variable with random values and to randomize
>    the pScale values
>    11. create a measure node and let it calculate the area of the primitives
>    ( it is going to be used in the scatter node later on )
>    12. create a VOP SOP again and call it orient_vopsop and go inside this
>    node
>    13. to calculate the orient quaternion you basically need two vectors, N
>    and the projFeatherDir vectors and the inclanation, randomRotation values
>    14. as I remember I used a "lookAt" node at my latest setup to calculate
>    the 3x3 rotation matrix that rotates the +Z axis of the feather to the
>    projFeatherDir and aligns the +Y vector with N
>    15. pipe the projFeatherDir to "to" input of the lookAt node and the N to
>    the "up" input and set from to (0,0,0) (this is important!!!)
>    16. this lookAt node will give you a 3x3 rotation matrix which is enough
>    to rotate the feathers to match the projFeatherDir
>    17. I've then created a constant node to create the x-axis ( vector 1,0,0
>    )
>    18. multiply the x-axis with this matrix from the output of the lookAt
>    node to have the feathers x-axis in place
>    19. create parameter nodes to get the inclanation and random rotation
>    20. create two "rotate" nodes
>    21. for the first rotate node, plug aligned x-axis to the axis and
>    inclanation to the angle of the rotate node
>    22. for the second rotate node, plug N to the axis and random rotation to
>    the angle of the rotate node
>    23. by multiplying all the three matrices in the right order ( lookAt ->
>    inclanation -> randomRotation ) you should now have a final 3x3 matrix
>    24. convert the matrix to a quaternion by using a "matrix3 to quaternion"
>    node
>    25. create a parameter node to export the quaternion with the name of
>    "orient"
>    26. go one up level ( out of the VOP SOP to the geometry )
>    27. create an attributeReorient node
>    28. put live geometry to the "input 1 : live geometry" plug and the
>    orient_vopsop to the second plug
>    29. select orient from the drop down menu inside the attributeReorient
>    node
>    30. create an attirbuteCopy node to copy the area, pScale and v
>    attributes to the live geometry
>    31. create a scatter node to have certain amount of points on the
>    geometry
>    32. deselect "scatter based on primitive area" and set "alternative
>    attirbute" to area
>    33. use "attribute bias" attribute to control the distribution of the
>    points
>    34. create a grid node, move it in the +Z axis to have one edge aligend
>    with the x-axis, do whatever deformation you want on that grid
>    35. create a copy node, and connect the grid to input 1, and the scatter
>    to input 2
>    36. celebrate yourself :)
> 
> I think I had more nodes than I've explained here... And you can even add
> more attributes to have automatic feather animation for wind simulation, to
> rotate the feathers according to the curvature of the surface (use the
> measure node to get the curvature), to have different material attributes
> for every feather ( actually I had this in my setup ) etc. ....
> 
> The feathers shouldn't cast shadows, or they will look to hard rather than
> soft. Adjust your lights to exclude feathers from shadow casting...
> 
> At the end I've exported the feather system as an asset, and created the
> minimum amount of parameters to make it work with different characters.
> 
> *The Problems*
> 
> *Problem 1:* The interpolation of the quaternions: When you created the
> scatter node, the quaternion values are interpolated from the primitive
> points over the scattered points. If the primitive points' orient values are
> so different (axis, angle, mainly the axis vector) than each other you
> probably going to have feathers in strange orientations. To fix that I've
> created a subdivide node and right after importing the live geometry and
> divided the problematic areas. But even with this I had problematic
> feathers.
> 
> *Problem 2:* Render Time and Memory Usage: I've used Mantra to render the
> birds and feathers. Some how I couldn't render them quickly. I think it was
> mostly related with the shading, because it was rendering super fast when
> I've not used opacity maps. The render times for PAL resolution were around
> 10-15 minute for one character for fullbody renders, and around 5-6 minutes
> for head close-ups. When you consider you have all the three characters side
> by side in some shots, it was too much ( render farms have 8 core XEON cpus
> with 10 gig of ram). And they were using too much memory around 6-7 gigs ( 3
> ram + 3 virtual mem ). But, I've successfully reduced the memory usage by
> writing down the final feathers to disk and cleaning the SOP cache and then
> loading the feathers again in render time.
> 
> Here one of my collogue has added the commercial to vimeo:
> http://www.vimeo.com/8671263
> 
> I hope it was clear enough... Like you, I couldn't find any good resource
> giving a clue about creating a feather system. So I'm curious about how
> others going to solve the problem of creating a feather system. And I've
> used Houdini for the first time in my life, and there was no body around to
> teach me, so I've probably did a lot of things wrong (especially the render
> setup and the shaders)
> 
> Cheers...
> 
> E.Ozgur Yilmaz
> Lead Technical Director
> www.ozgurfx.com
> 
> 
> On Wed, Jan 13, 2010 at 1:26 AM, <craigleehoffman at aol.com> wrote:
> 
> >
> >
> > Diana,
> >
> > Do you want all the feathers to be geometry (perhaps simple low-res proxy
> > geometry only) seen in your interactive viewport so you can determine and
> > fix interpenetration problems or animate them, etc.- or do you only need to
> > see them at render time?  Are they large stiff type feathers like an eagle,
> > or small fluffy/furry down-like feathers, etc.?
> >
> > There is no "one size fits all" solution for feathers- the solution needs
> > to fit the design and needs of your project.  Houdini allows an enormous
> > amount of flexibility and power for how to address something like feathers.
> >
> > Good luck,
> > Craig
> >
> >
> > -----Original Message-----
> > From: Diana Li <r.diana.li at gmail.com>
> > To: sidefx-houdini-list at sidefx.com
> > Sent: Tue, Jan 12, 2010 3:16 pm
> > Subject: [Sidefx-houdini-list] Feather/Fur for Bird
> >
> >
> > Hi,
> > I am working on a project involves feathers on a bird like creature.  I
> > need
> > ome help to see what's the best approach.  The creature will fly, but only
> > n medium shots and long shots, and there is one close up shot of the head.
> >  haven't found any tutorial on fur/feather system.  After researching, it
> > eems that to create feather, it's adding fur on a tube like geometry, then
> > opy/instance it to where you need it.  Does that sound right?  I never used
> > ur, I'd really appreciate it if someone could point me in the right
> > irection. thanks.
> > diana
> > ______________________________________________
> > idefx-houdini-list mailing list
> > idefx-houdini-list at sidefx.com
> > ttps://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
> >
> > _______________________________________________
> > Sidefx-houdini-list mailing list
> > Sidefx-houdini-list at sidefx.com
> > https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
> >
> _______________________________________________
> Sidefx-houdini-list mailing list
> Sidefx-houdini-list at sidefx.com
> https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
 		 	   		  
_________________________________________________________________
Windows Live: Make it easier for your friends to see what you’re up to on Facebook.
http://www.microsoft.com/middleeast/windows/windowslive/see-it-in-action/social-network-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:en-xm:SI_SB_2:092009


More information about the Sidefx-houdini-list mailing list