Showing posts with label string concatenation. Show all posts
Showing posts with label string concatenation. Show all posts

Friday 14 October 2016

Exporting simple multiple objects from Houdini to Maya

Assuming... you've duplicated objects around, animated them etc... AND the objects are single mesh things. Eg. a Sphere, a torus.... Not a multi-object thing.

Create a "connectivity" node and set the connectivity type to Primitive. This should be connected to the group of objects you're exporting.

This creates a Primitive attribute which assigns an integer value, based on the object's "shell".
eg. the primitives in Cube 1 might have a value of 0, Cube3 might have a value of 4 or whatever..

Connect a Primitive Wrangle and put in:

s@path = 'fish_GRP/fish_' + itoa(i@class) + '_GEO/fish_'+ itoa(i@class)+'_GEOShape';

where the path attribute created is making a group called "fish_GRP" and objects called "fish_1_GEO" and their respective Maya shape nodes called "fish_1_GEOShape".

It seems necessary to build the complete hierarchy for Maya, otherwise the individual shape nodes are not so easily accessible..

Finally, using a ROP_Alembic node, output your file, making sure that you have
"Build Hierarchy from Attribute" ticked ON, and set to "path".
The other bits are left as default...