Showing posts with label path. Show all posts
Showing posts with label path. Show all posts

Friday, 20 November 2020

instance path

Say you have some points and you want to instance an object from disk to them..

in a point wrangle-

 s@instancepath=chs("path");

create the input box and type in the path of your object eg: c:\dave\ball.obj


beneath the point wrangle, add an instance node. ta da!

Wednesday, 27 September 2017

writing alembics for maya - path attribute

Covered this in an older post, but this is for more straightforward cases when you want to define a group and shape node name for Maya purposes. We do this to avoid multiple shape names in Maya (eg. lots of pSphereShape1's or multiple Houdini Merge listings ; Alembic will take whatever the penultimate node to your ROP-alembic is called!)

In a primitive wrangle, this bit of code will create two text entry boxes, so you can input a group name and a shape name. If you were to call the group "squareGrp" and the name "square", then the resultant hierarchy would be "squareGrp/square/squareShape" in Maya.


string group = chs("MayaGroup");
string name = chs("Name");

group += chs("groupSuffix");
name += chs("geoSuffix");

s@path = group + '/' + name + '/' + name + 'Shape';


Remember to tick the "build hierarchy" box in the ROP-Alembic node & also to tick "use path".

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...