-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SceneGlobalsSceneIndex blocks ActiveRenderSettingsPrimPath #3367
Comments
Filed as internal issue #USD-10321 |
I was going to try and put together a PR for this, as it felt like something easy enough to fix, but I found myself struggling over "what's the right workflow?". Given that the metadata can be in the USD Stage, and the Stage Scene Index will author it for Hydra, I question why the Scene Globals Scene Index provides an API for application-level control to set/modify the data. Let's for now proceed with the assumption that this is useful/powerful, and then I'm stuck on "what if the Stage says 'settings X' and the application says 'settings Y'?" and "what if the Stage then changes its metadata?" and "what if the application then changes its opinon?" |
Hi Rob, I believe the intended use here is that the app will use this API to configure Hydra to use the appropriate render settings. Apps using USD to specify this will consult the stage metadata first, but also allow the users to specify an override (ex: when choosing to render a surface vs. volume pass). An example of this is in usdrecord where it consults both the stage metadata and command-line arguments to determine which render settings prim to use: That rsPrimPath is subsequently passed to the HdsiSceneGlobalsSceneIndex via the FrameRecorder and then UsdImagingGLEngine::SetActiveRenderSettingsPrimPath(). hope this helps, |
Thanks Brett, that seems sensible enough, but then I question whether the Stage Scene Index should stop translating this data. I struggle with it being "right behaviour" that all the Scene Indexes up to the Stage Globals Scene Index have a value and then said value disappears when the SGSI comes into play (unless the application "renews" the value). |
In
UsdImagingGLEngine::PrepareBatch
there's the following:The comment is not wrong, as the StageSceneIndex does indeed populate this data, but the problem is that the
SceneGlobalsSceneIndex
(which is an "expected" part of the Hydra pipeline for all renderers) effectively masks the data set upstream.HdsiSceneGlobalsSceneIndex::GetPrim()
returns a prim based on a_SceneGlobalsDataSource
which goes back to the Scene Index and just returns a cached value. This works fine if there was an explicit call made toHdsiSceneGlobalsSceneIndex::SetActiveRenderSettingsPrimPath()
(as is the case when_GetUseSceneIndices()
isfalse
), but otherwise the cached value is an emptySdfPath
rather than the path already stored on the input scene index.Example of a USD scene with stage metadata set, loaded in USD with and without the Stage Scene Index:
The text was updated successfully, but these errors were encountered: