PixarAnimationStudios / OpenUSD

Universal Scene Description
http://www.openusd.org
Other
5.99k stars 1.18k forks source link

Root upAxis vs sub object upAxis #589

Closed TongkuiSu closed 6 years ago

TongkuiSu commented 6 years ago

Given an URL, we can create an USDStage and we can get the upAxis through USDStage->GetMetadata<pxr::TfToken>(USDTokens::upAxis, &UpAxisValue);, If a scene like Kitchen_set, there are many sub scenes and each .usd has an upAxis, Do we need to parse them for each .usd, or we just need to get it through USDStage ?

spiffmon commented 6 years ago

No, as a consumer, the stage-level declaration is all you need, as described here: http://graphics.pixar.com/usd/docs/api/group___usd_geom_up_axis__group.html#details

You can also use UsdGeomGetStageUpAxis() to fetch the value , for greater robustness and clarity.

I don't know if it's your use case, but we are decreeing that all "web friendly " usdz files must be Y-up, and the recently released usdchecker utility will validate that in --arKit mode.

On Mon, Aug 13, 2018 at 5:51 AM Tongkui Su notifications@github.com wrote:

Given an URL, we can create an USDStage and we can get the upAxis through USDStage->GetMetadata(USDTokens::upAxis, &UpAxisValue);, If a scene like Kitchen_set, there are many sub scenes and each .usd has an upAxis, Do we need to parse them for each .usd, or we just need to get it through USDStage ?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/PixarAnimationStudios/USD/issues/589, or mute the thread https://github.com/notifications/unsubscribe-auth/AF7qaE1nDe7zGTILbFjjQGV_dJU_3bDyks5uQXZcgaJpZM4V6cmQ .

-- --spiffiPhone