PixarAnimationStudios / OpenUSD

Universal Scene Description

Home Page:http://www.openusd.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Updating A DomeLight Texture Via Its Texture File Attribute Does Not Get "Picked Up" Correctly (In hdPrman Hydra Delegate)

SimonCSmith opened this issue · comments

If I change the texture of a dome light by setting its TextureFileAttr to a new sdf path, the render does not update to reflect this change. If I debug down into HdPrmanLight::Sync (in light.cpp) it looks like whilst the the DirtyParam parameter is being set when the attribute is changing, this does not seem to result in the new texture being picked up.

I did notice that if the DirtyResource flag was forced to be set (which it was not) then this would result in the dirtyLightShader flag being set and the texture update being picked up and thus the render correctly updates. I wonder if this dirty flag should be being set perhaps?

Unless I am missing an explicit "invalidate" call or similar, I would expect if the texture attribute changed then the texture change would be picked up. Is there any short term workaround that I might be able to use to get around this?

Steps to Reproduce

  1. In a valid C++ USD/Hydra project running a hdPrMan hydra delegate call: myLuxDomeLightInstance.GetTextureFileAttr().Set(SdfAssetPath(strFilename));

System Information (OS, Hardware)

Running under Windows 10, VS 2019.
USD v23.08 (which uses renderman 25.1)
All code C++.

Filed as internal issue #USD-9702