Autodesk / arnold-usd

Arnold components for USD
https://www.arnoldrenderer.com/
Other
243 stars 57 forks source link

Incorrect transform when exporting an object hierarchy to USD #1402

Open peterhorvath111 opened 1 year ago

peterhorvath111 commented 1 year ago

When exporting objects from an Arnold scene via AiSceneWrite(), the transform is wrong, if the object hierarchy is coded into the node names.

Arnold does not support object hierarchy, in an Arnold scene all objects are on the same level. When we export objects from DCCs which support hierarchy, this information is encoded into the node name. For instance if a Pyramid is under a Cube object in Cinema 4D, the name of the Pyramid will be '/Cube/Pyramid'. When exporting to USD, it recognizes the hierarchy, and puts the Pyramid object under the Cube, but it does not change the transform to relative to the Cube and still uses the global transform. That's causing the problem.

These are ASS and USD exports of the same scene. ASS file: object_hierarchy.ass.zip USD file: object_hierarchy.usda.zip

To verify, load the ASS and USD files with a procedural.

ASS USD
scene_ASS.zip scene_USD.zip
scene_ASS scene_USD
correct incorrect
autodesk-oss-arnold-bot[bot] commented 1 year ago

Issue synced internally to ARNOLD-13322