Can I change Reference play back from 24 fps to 30 fps?

   3165   6   1
User Avatar
Member
33 posts
Joined: 5月 2018
Offline
Hi, I've noticed that when I import animated USD files as sublayers, they play back at their original speed (30 fps). But when I bring them as references, they play back at 24fps, and the only way to adjust for that, is to futz with the time scale. I need to use references (because I'm trying to copy and transform several versions of the same USD file throughout my stage), so simply switching to sublayers is a no-go. And I'm worried that messing with time scale will result in less-than-smooth playback. Any suggestions?
User Avatar
スタッフ
4177 posts
Joined: 9月 2007
Offline
I suspect that in the sublayer case, there is no other layer setting the FPS so it's just using that when it's playing back; though I'm not sure if that should be considered a bug or not...

USD linearly interpolates values, so the time-scale will be linear, though whether it's smooth or not is hard to guess without seeing any results. But if you're referencing files with different FPS, time scale is probably the best bet (apart from re-authoring the files to export at an expected frame rate).

Is there a reason you're mixing USD layers generated at different rates? I would expect if you don't want 24FPS that you'd set it in your hip file. All project files for the same show/productionproject should probably use the same FPS for all of it's layers/exports (even if there are some cases where you would cache out additional sub-frame time samples for motion blur reasons).
I'm o.d.d.
User Avatar
Member
33 posts
Joined: 5月 2018
Offline
Hi - my apologies, I didn't see your reply. In case you're curious, research turned up that when you export an animated usd sequence from a 30 fps Houdini file, and then use usd clip stitch, the resulting template.usd will erase any fps information from the original file, and default back to 24fps (because Pixar standard). Apparently, it's a bug in clip stitch. However, this only seems to be a problem when bringing the template.usd into stage via reference. Sublayers either go by the Houdini file fps, or somehow know that the template.usd is supposed to be 30 fps (don't know which one). As of now, we're either setting the time scale in references to 0.8 (and then the animation plays as expected) or manually typing framesPerSecond = 30, TimeCodePerSecond = 30 in the template.usda

Any light on this problem would be appreciated
Edited by MamaYaga - 2022年6月2日 16:27:52
User Avatar
スタッフ
4453 posts
Joined: 7月 2005
Offline
The Sublayer LOP has a parameter "Copy Layer Metadata to Stage Root Layer" which defaults to "Auto". This setting means that if the Sublayer LOP has no input, then we do copy the layer metadata (which includes the TCPS value) from the layer on disk to the stage. Which means when you sublayer in a 24TCPS layer file, the stage gets set to 24TCPS. This means that your stage's TCPS value is not equal to the Houdini FPS value any more. But because the original file was _actually_ 30TCPS, when you play back this 24 TCPS clip at 30FPS it _looks_ correct. But if you were to then sublayer in another USD file that has 30TCPS set in the file, _that_ file will play back at the wrong rate (because you're loading a 30TCPS file into a 24 TCPS stage, so the samples will be scaled). You can always see the current stage TCPS value by clicking onthe root prim inthe scene graph tree, then looking at the metadata tab inthe scene graph details.

The Reference LOP does not have this "Copy Layer Metadata" capability, so the underlying stage metadata remains as 30 TCPS, and the 24 TCPS stitched file plays back at a scaled rate (which you have to correct for with the Scale parameter on the Reference LOP).

So all of this is working as expected except for the bug mentioned i the other thread, whre the Stitch Clips ROP isn't authoring the correct TCPS value in the template file.
User Avatar
Member
33 posts
Joined: 5月 2018
Offline
Thanks, mtucker - this made things clearer :-), at least in terms of how to come up with the best workaround!
Cheers,
Inna
User Avatar
Member
45 posts
Joined: 7月 2009
Online
mtucker
The Sublayer LOP has a parameter "Copy Layer Metadata to Stage Root Layer" which defaults to "Auto". This setting means that if the Sublayer LOP has no input, then we do copy the layer metadata (which includes the TCPS value) from the layer on disk to the stage. Which means when you sublayer in a 24TCPS layer file, the stage gets set to 24TCPS. This means that your stage's TCPS value is not equal to the Houdini FPS value any more. But because the original file was _actually_ 30TCPS, when you play back this 24 TCPS clip at 30FPS it _looks_ correct. But if you were to then sublayer in another USD file that has 30TCPS set in the file, _that_ file will play back at the wrong rate (because you're loading a 30TCPS file into a 24 TCPS stage, so the samples will be scaled). You can always see the current stage TCPS value by clicking onthe root prim inthe scene graph tree, then looking at the metadata tab inthe scene graph details.

The Reference LOP does not have this "Copy Layer Metadata" capability, so the underlying stage metadata remains as 30 TCPS, and the 24 TCPS stitched file plays back at a scaled rate (which you have to correct for with the Scale parameter on the Reference LOP).

So all of this is working as expected except for the bug mentioned i the other thread, whre the Stitch Clips ROP isn't authoring the correct TCPS value in the template file.
Thanks for explaining this.
Is it somehow possible that the stage always uses the timesamples specified in the usd file? For Example if the usd file's timesamples state
1001: 12,
1002: 13
I want the value 12 on Frame 1001 regardless of the fps.

Thanks in advance,
Martin
User Avatar
スタッフ
4453 posts
Joined: 7月 2005
Offline
No, I don't believe USD supports this.
  • Quick Links