Hey everyone,
Josh from Weta Digital here
We are currently in the middle of updating the Hydra render delegate of our real time renderer from 21.08 to 23.08, and one thing that sticked out is how display purposes are not properly respected anymore following the API updates that happened in 21.11/22.03.
Adding support for tracking of the task render tags version in the HdRenderPass
was apparently not enough.
From my print debugging, I can draw a couple of observations, namely:
- Methods from
HdRprim
derived classes (such asHdMesh
, and their own derivatives) such as_InitRepr()
/_PropagateDirtyBits()
/Sync()
/… are not called anymore as we enable/disable display purposes.- This is making things… difficult for us to destroy/recreate our internal data properly.
- A new
UpdateRenderTags()
virtual method has been added onHdRprim
.- From my quick testing, it does not seem to be called on every change of state of a display purpose, but only one out of two instead, i.e. if a Prim is assigned the “render” purpose and we start the delegate with said purpose already activated, the method will be called as we disable it, but not as we enable it (and the opposite is also true if the purpose was not enabled as we started the renderer).
I can see that hdStorm seems to be making use of UpdateRenderTags()
to keep track of tags counts in its HdRenderParam
class. Would this be the way to go for a real time renderer?
In our case, we are not using the disabling of purposes to hide the data as we destroy it instead (through Finalize()
to call on our own Cleanup()
function easily), since we cannot afford to hold a duplicate of our scenes in memory at all time in production.
What would be the proper way to handle this issue?
Thanks,
Joshua