Viewport "Background Update USD Stage"

   3500   6   1
User Avatar
Member
48 posts
Joined: July 2009
Offline
Hi,

I try to find the most effective way to cache and view a RBD(geo and points) sim in Solaris.
I create transforms from the points and apply it via "over" to the highres Geo.

When I cache the transforms to a .usdc file and import them with a sublayer node, the update happens super fast.
Every other way I tried ( directly merging the nodes withouth writing to a file, updating with python, vex, "transform by sop points" node ) causes the Viewport to update the USD Stage in the Background, wich takes quite some time.
This is mutch faster when I just merge the two usd files.


So my question is there a way to over transforms without having the viewport to update the Usd Stage in the background ( as fast as merging two sublayer)?


usd files importet via sublayer.

updated via pointxform node.
Edited by louisx - Dec. 22, 2022 11:05:36

Attachments:
sublayer_viewport.jpg (134.4 KB)
xform_viewport.jpg (135.7 KB)

User Avatar
Staff
4566 posts
Joined: July 2005
Offline
You can pause the viewer updates using the pause button on the right side of the viewport ("Lock viewport stage to prevent renderer updates"). It's like the "Pause Render" command for non-HoudiniGL renderers, but it doesn't stop in-progress rendering, and also affects HGL).
User Avatar
Member
48 posts
Joined: July 2009
Offline
mtucker
You can pause the viewer updates using the pause button on the right side of the viewport ("Lock viewport stage to prevent renderer updates"). It's like the "Pause Render" command for non-HoudiniGL renderers, but it doesn't stop in-progress rendering, and also affects HGL).

Ok, but this way I dont see any viewport updates. Maybe my Questions wasnt well formulated.
I want to get Viewport updates. I just realized that the process of updating the Viewport is mutch faster when I merge two usd files from disk. Compared to the other methods. The process with the biggest difference in speed was the "Background Update USD Stage", shown in the two screenshots above.

So why is the viewport updating so mutch faster when I use the cached files? It still hast to apply the transforms and move all the geometry to its new location.

I hope it makes my problem a bit clearer.
Cheers Martin
Edited by louisx - Dec. 22, 2022 11:50:34

Attachments:
speed_dif.jpg (26.0 KB)

User Avatar
Member
48 posts
Joined: July 2009
Offline
I'll give this a bump with some new performance Monitor screenshots
Would be really nice if someone knows why there is such a big difference?

Transforming my highres Geo with "Transform by Sop Points" Node takes the Viewport 32sec to update, especially slow "Background UPdate USD Stage"

Transforming my highres Geo by merging the transforms via sopimport is mutch faster. Still mutch slower than using sublayers.

Transforming by merging the transforms via sublayer node (usd from disc).
Edited by louisx - Dec. 31, 2022 08:49:21

Attachments:
pointx_tg.jpg (73.0 KB)
sopimport_tg.jpg (65.3 KB)
sublayer_tg.jpg (64.0 KB)

User Avatar
Staff
597 posts
Joined: June 2020
Offline
Happy New Year! Can you share a hip file I can play with?
User Avatar
Member
48 posts
Joined: July 2009
Offline
robp_sidefx
Happy New Year! Can you share a hip file I can play with?
Thx, also a happy New Year.
I attached a .zip wich contains the hip and geo. The differences are not as big as in the above Screenshots, but they scale up with more highres geo.

Thanks in advanced for looking into it

Attachments:
rbd_solaris_import_viewport_v001.hip (802.5 KB)

User Avatar
Staff
597 posts
Joined: June 2020
Offline
louisx
So why is the viewport updating so mutch faster when I use the cached files?

Thanks for the test scene. I've been able to reproduce a similar result to what you've described, in the context of moving around the timeline (i.e., changing frames).

The cached files are able to put all the cached data onto the stage in one go, via USD Time Samples. The layer it generates looks like this:

over "box"
{
over "piece0_1508_11"
{
matrix4d xformOp:transform.timeSamples = {
1: ( (1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (0, 0, 0, 1) ),
2: ...,
3: ...,
4: ...,
...

In contrast, the SOP Import only authors USD data for the current time. The layer it generates looks like this (assuming you're on frame 18):

over "box"
{
over "piece0_1508_11"
{
matrix4d xformOp:transform.timeSamples = {
18: ...,
}
uniform token[] xformOpOrder = ["xformOp:transform"]
}
over "piece0_1508_10"
...

Each time you change the frame, the cached version has already produced the data needed, but the SOP Import needs to generate a new layer that needs to be recomposed into the stage.

This can be alleviated by introducing a Cache LOP just downstream of the SOP Import.

Does this help at all?

Attachments:
cache.png (55.4 KB)

  • Quick Links