Retime and copy to points

   853   6   2
User Avatar
Member
47 posts
Joined: July 2017
Offline
I've been trying to find a way to do this correctly in Solaris/LOPS for a while...
I have an animated asset from a USD file (loaded via Asset Reference), and some points coming from SOPs with some simple translations and a frame attribute set.

I'd like to copy to point and retime each copy/instance according to the point attribute, and save out a lightweight USD file to render.

Using the Instance LOP and the retime instances set to Explicit frame, seems to work fine in the viewport - but saving the full scene USD file gives unexpected results when I try to render or read that file. The copies/instances jump around and/or disappears completely at random frames. I assume the instances are technically no longer instances since they're at different frames, but would be great to have it clarified why it works before I save the USD file. I tried adding a Cache after the USD import, but that didn't help. Perhaps a copy to point or for each setup is better, but I'm unable to figure out the workflow here.

I might have to do a copy to point and a for loop in LOPS instead, but not figuring out how to set this up correctly.

Any advice?


Here's the setup and viewport result when looking at the retime LOP.


And here is looking at the USD file written after the retime.

Attachments:
01.PNG (932.6 KB)
02.PNG (899.4 KB)

User Avatar
Staff
451 posts
Joined: June 2020
Online
Without seeing the hip file, I expect the issue is the same as https://www.sidefx.com/forum/topic/92811/ [www.sidefx.com] in which case there are two solutions:

1 - Change the expression on the framerange for cache3 from @ropstart/@ropend to @fstart/@fend

2 - Change usd_export to write out the whole framerange rather than just the current frame

If you need more info/assistance, just shout (and ideally share a hip file)
User Avatar
Member
47 posts
Joined: July 2017
Offline
robp_sidefx
Without seeing the hip file, I expect the issue is the same as https://www.sidefx.com/forum/topic/92811/ [www.sidefx.com] in which case there are two solutions:

1 - Change the expression on the framerange for cache3 from @ropstart/@ropend to @fstart/@fend

2 - Change usd_export to write out the whole framerange rather than just the current frame

If you need more info/assistance, just shout (and ideally share a hip file)
Thanks for the tips! Unfortunately it doesn't seem to solve the issue in this case. It's probably an user error, but I provided a simple sample scene to look at. I tried adding a cache after the retime node as well, but it gave different - but still wrong results.
Edited by Tronotrond - Nov. 8, 2023 14:30:59

Attachments:
RetimeInstanceTest.zip (1.7 MB)

User Avatar
Staff
451 posts
Joined: June 2020
Online
Tronotrond
I provided a simple sample scene to look at. I tried adding a cache after the retime node as well, but it gave different - but still wrong results.

Are there possibly still some missing files?

Warning
Could not open asset @/0_io/cocoon_animated_PROXY_v3.usd@ for reference on prim @/tmp/cocoon_proxy.usd@,@anon:0x7f24fae61300:cocoon_proxy-session.usda@</coccoon2>. (instantiating stage on stage @/tmp/cocoon_proxy.usd@ <0x7f2488789400>)
User Avatar
Member
47 posts
Joined: July 2017
Offline
robp_sidefx
Tronotrond
I provided a simple sample scene to look at. I tried adding a cache after the retime node as well, but it gave different - but still wrong results.

Are there possibly still some missing files?

Warning
Could not open asset @/0_io/cocoon_animated_PROXY_v3.usd@ for reference on prim @/tmp/cocoon_proxy.usd@,@anon:0x7f24fae61300:cocoon_proxy-session.usda@</coccoon2>. (instantiating stage on stage @/tmp/cocoon_proxy.usd@ <0x7f2488789400>)


Ah, my bad! I accidentally saved a nested USD asset for the test scene.
This attachment should work. Also updated the original attachment file.

Attachments:
RetimeInstanceTest.zip (1.7 MB)

User Avatar
Staff
360 posts
Joined: Feb. 2008
Offline
Thanks for the bug report and the example, this should be fixed in tomorrow's daily build.
User Avatar
Member
47 posts
Joined: July 2017
Offline
npetit
Thanks for the bug report and the example, this should be fixed in tomorrow's daily build.
Awesome! Thanks for the swift fix - and happy to hear it wasn't an user error
  • Quick Links