Houdini Alembic to Maya with Geometry Separation

One way to export multiple geometries from Houdini to Maya and preserve the geometry separation is to make sure that the primitives have individual @name attributes before using the Merge SOP. Thereafter, ensure that the ROP Alembic Output has ‘Partition Mode’ set to “Use Shape Node Component of Path Attribute Value”, and ‘Partition Attribute’ set to “name”

Update on 14 Sep 2018: You can use a Name SOP to help sort the incoming geometry before the Merge SOP

Ronald Fong Houdini Alembic to Maya Geometry Preservation - ROP Alembic Outpuit Settings

When imported into Maya, Houdini alembic export will show up as a single transform with multiple shape nodes
In Maya, select the transform node and run this script to get unique transform nodes for each shape.

This way, you can do your material assignment like how we’d normally do in Maya, instead of trying to assign them to individual shape nodes. Cheers!

Ronald Fong Houdini Alembic to Maya Geometry Preservation - Shapes to Transforms

//Author: Ronald Fong
//Date: 11 Aug 2018
//Notes: When imported into Maya, Houdini alembic export often show up as a single transform with multiple shape nodes. However, we usually want a transform node per shape node in Maya.
//Usage: In Maya, select the transform node and run this script to get unique transform nodes for each shape. Cheers!

global proc rf_shapesToTransforms() {
    string $abcObj[] = `ls -sl`;
    string $shapes[] = `listRelatives -s $abcObj[0]`;
        for ($shape in $shapes) {
            select $abcObj;
            $newGeo = `duplicate -rr -un -n ($shape+"_GEO")`;
            string $newShapes[] = `listRelatives -s $newGeo`;
            for ($newShape in $newShapes) {
                if ($newShape != $shape) {
                    delete ($newGeo[0] + "|" + $newShape);
                }
                else if ($newShape == $shape){
                    rename ($newGeo[0] + "|" + $newShape) ($newShape+"_GEOShape");
                }
            }
        }
    delete $abcObj[0];
}

rf_shapesToTransforms();
0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *