Alembic
# Work with the Alembic Hierarchy
# Building Path Hierarchy
You can use the [ ] Build Hierarchy From Attribute
option on the Alembic ROP
to manage how geometry gets organized in an alembic file and rebuilt in e.g. Maya. the node expects a primitive attribute usually called @path
.
//primitive wrangle
|
|
This is similar to how USD hierarchy is defined with @name
.
# Path Attribute to Groups
A lot of the time you want to have access to the path as groups:
//primitive wrangle
|
|
For more snippets check out VEX Snippets.
This creates groups for every segment of the path which can be a lot. To deal with them you can use wildcards in pretty much all fields that take group names.
Say you have a few paths that also include some material information:
- /GEO/Exterior/Glass/GEO
- /GEO/Interior/Glass/GEO
- /GEO/Interior/Leather/GEO
You can use that to assign a glass material to the relevant parts by using *Glass*
in the group field.
# Hiccups
# Getting the Time Range, Startframe and Endframe
There is no time range intrinsic available by default so we need to write 3 lines of python to read the range from the file itself.
// python shell
|
|
You can make it more procedural by first getting the filename automatically. I read it from the instrinsics first and stored it in a regular attribute, but I’m sure you could do that in python too.
// python SOP
|
|
# Vertex Colors to Maya
Make sure to:
- not have any degenerate prims or loose points by using a
clean
node - have
Cd
as a vertex attribute not point or prim
“Sometimes” this also helped:
- Use Hierarchy from Path option (could be any hierarchy)
- Create a 4 float
Cd
that also has an alpha channel - Qualifier type has to be color (Clr) see below
sources / further reading: