maya-usd icon indicating copy to clipboard operation
maya-usd copied to clipboard

Usd is doesn't take into account FPS and always reads it in 24 fps

Open vcandelam opened this issue 1 year ago • 3 comments

Describe the bug Working in 25 fps and exporting a USD correctly sets the timeCodesPerSecond and framesPerSecond metadata to 25 to the usd file. However, when loading it back in maya in the same scene, the animation of the usd is offseted as if it was in 24 fps.

Steps to reproduce 1- For easier visualization, create a ball and animate it from frame 1001 to 1010 with the timeline in 25fps. 2- Export to usd, the metadata is set correctly 3- Usd Load the exported file, notice that the animation starts now in 960, 40 frames earlier, which corresponds to 1 frame per second of 1000 frames at 25 fps (1000/25: 40)

Expected behavior For the animation to be read in the proper timecode

Specs (if applicable):

  • Maya version : Maya 2024.2
  • MayaUSD : 0.30.0

vcandelam avatar Feb 13 '25 14:02 vcandelam

Thank you for reporting. We will investigate.

wallworm avatar Feb 20 '25 17:02 wallworm

Actually today I've just found out why! @wallworm

Turns out that the root layers of the UsdStageProxyShape (both RootLayer and SessionLayer) doesn' t get the fps from the scene and reverts to usd's fallback 24fps. Writing explicitly the fps in the root layer after loading or sublayering to match Maya's scene fps does indeed play at the correct timecode. Having it written in the loaded layer beforehand does not work.

(tested Maya 2024.2 and MayaUsd 0.32.0)

vcandelam avatar Oct 03 '25 14:10 vcandelam

@vcandelam Thanks for sharing this news. We started embedding more metadata like axis and units in the last couple of years. This is another that we need to consider as well. Again, thanks for sharing.

wallworm avatar Oct 03 '25 14:10 wallworm