Hi everyone,
Looking for some advice on how to read in alembic hierarchies properly using the C++ API of with Alembic 1.8.3
We have a mesh that was opened and written out from houdini. After writing out from houdini, my own custom C++ alembic reader has switched the order in which it is traversing hierarchy paths, and changing the point order in the process.
Houdini does not change the point order or the path traversal when I read the abc file back in, so I am assuming I am missing something fairly elementary in my importer. Code snippet is below, followed by the traversal pattern before the houdini-write out and after. Note the "L" and the "R" switch places
Would be great if someone can offer some advice here.
Thank you
Amaan
Alembic::Abc::IArchive archive;
archive = Alembic::Abc::IArchive(Alembic::AbcCoreOgawa::ReadArchive(), fileName);
Alembic::Abc::IObject topObject(archive, Alembic::Abc::kTop);
ParseAlembic(topObject, crvProc, ID);
void ParseAlembic(const Alembic::Abc::IObject &parentObject, int depth = 0 )
{
Alembic::Abc::ObjectHeader objectHeader = parentObject.getHeader();
if (Alembic::AbcGeom::IPolyMesh::matches(objectHeader))
{
Alembic::AbcGeom::IPolyMesh mesh(parentObject, Alembic::Abc::kWrapExisting);
printMsg("Ingesting Polymesh at @path = %s", parentObject.getFullName().c_str());
}
// Iterate through the children of the current object
for (size_t i = 0; i < parentObject.getNumChildren(); ++i)
{
Alembic::Abc::IObject childObject(parentObject.getChild(i));
ParseAlembic(childObject, depth + 1);
}
}
Traversal path before houdini import and write out, using printMsg()
Ingesting Polymesh at @path = /Hat_GRP/R_pomPom_GRP/R_pomPomCenter_PLY/R_pomPomCenter_PLYShape
Ingesting Polymesh at @path = /Hat_GRP/L_pomPom_GRP/L_pomPomCenter_PLY/L_pomPomCenter_PLYShape
Traversal path after houdini import and write out,
using printMsg()
Ingesting Polymesh at @path = /Hat_GRP/L_pomPom_GRP/L_pomPomCenter_PLY/L_pomPomCenter_PLYShape
Ingesting Polymesh at @path = /Hat_GRP/R_pomPom_GRP/R_pomPomCenter_PLY/R_pomPomCenter_PLYShape