Search This Blog

Blog Archive

Tuesday, March 16, 2010

regarding the maya to houdini pipeline:

animation is brought in via the fbx format
(NB in the fbx import options check `unlock vertex cache`
otherwise all the animation will be saved in the Houdini file resulting in very large hip files rather than referenced on disk like it should be)
also check 'import directly to /obj' to bring the nodes directly into the root level of houdini thus bypassing a useless encapsulating layer of hierarchy
so far we have been starting a new blank session of Houdini to import the fbx files
and then copying and pasting the relevant nodes made by this fbx import into ANOTHER houdini session which is setup for Houdini specific geometry caching and rendering.
the models come into Houdini automatically with a vertex cache SOP that links the model with its associated animation CHOP (channel operator) to give it the life that puts bread on out tables.
By default the path to the animation involves the object name in it
(in the choppath parameter)
such as :
../../fbx_chops/MDL_tongue02_chopfile

the fbx import process automatically adds "_chopfile" to the end of the name
after sourcing the object name (tongue02) in this case which makes our live kinda esier once we get our heads around whats happening
we can then replace this path with this :
`"../../fbx_chops/" + opname("..") + "_chopfile"`
we've split up the string adding quotes and + signs to concatenate it .
the cmd 'opname' looks at the objects name in question procedurally and automagically
derives it - no matter which object we are dealing with.
".." is like 'the node, one level up from where we are now' - just like unix.

the single quotes around the expression force it to evaluate.
this new expression can then pasted onto ALL the vertex cache SOPS in every animated object - and pasted all in one hit using the attribute spreadsheet.
when the animation in Maya is updated or changed, we simply copy in the CHOP network *ONLY* and as long as no object names have changed in maya - we can link the new animation from maya to the old models in Houdini (essentially the same models - because they cant change point count). The Chop netwotk name shouldnt change either - but if it does - we just change our expression to suit.
why cant we just past in the new animation network and all the paths will automatically connect as they are ? well we could....but if there is any old fbx animation networks hanging around in houdini, it will add a '_1' increment to the name and break the path.
why cant we just remove the "_1" from the name of the animation network ?
we could but any paths that are specific - or explicit or not using an expression
will automatically update to follow the current fbx animation it is connected to, in an attempt to keep the paths connected.
So if we ever have 2 or more fbx animation networks in the one houdini file - it can easily be broken. This is avoided with the expression meaning we only have one name to keep an eye on one name - the fbx CHOP subnet name.
this gives us a workflow to simply update animation from maya by coping and pasting one node from one Houdini file to another and hopefully everys at the pub by 6 pm with a beer in there hand and smiles on there faces :)
----------------------------------------------
we could also just go into the fbx animation node and simply copy all the CHOP nodes, then paste them into the old fbx_chops subnet node (*after* deleting all the old ones to avoid houdini's automatic renaming) which is even easier !

No comments: