Developer Notes

When importing from a USDStageActor into Unreal, via the USDStage GUI, if prims have single time-sampled attributes the transforms reset to origin ( the keyed or timesampled transform is lost ).

Description

There may be an issue with USD prims with time-sampled attributes - or at least an issue of user expectations.   

When importing from a USDStageActor into Unreal, via the USDStage GUI, if prims have single time-sampled attributes the transforms reset to origin ( the keyed or timesampled transform is lost ).   The reason they are lost is there is not a Level Sequence generated when imported - as it appears that the USDStage's Level Sequence does not key any attributes when only one time sample exists on a prim.   The xform is also not baked onto the imported asset, so there is no way to return the imported geo back to its proper location.

When you reference the same a USD file and layer an over a non-timesampled xform the transforms were maintained on import - on the sub-location on the asset.

There are three usd file examples:

  • cube.usda
  • cube_sublayer_notimesamples.usda
  • cube_sublayer_timesamples.usda

A couple of things to note about these examples:

  • One thing to note, is cube.usda only has one time sample.   I noticed in this case, that the Level Sequence generated for it and for the cube_sublayer_timesamples.usda version did not have a "key" in the timeline for the transform.  If you import the single timesampled asset - a Level Sequence is not generated for the object.  However, if you modify the cube.usda file to have two or more samples directly in the usda file, and reload cube_sublayer_timesamples.usda - the Level Sequences generated will in fact have two keys.
  • What should the import behavior be when there is one timesample?  How about two or more?   It is currently inconsistent, and for a single sample - incomplete.  The customer in this case, the customer is expecting the single timesample to be baked down to a xform.   For two or more samples, generating the level sequence seems appropriate, but maybe there should still be an option to bake the xforms down to a single frame - discarding the animation.

The usd files can be found in the following Box link.  In that Box directory is a Problem_Description.boxnote for more information.

  • [Link Removed]

I recorded a video walking thru the example usda files and some observations I had.   

  • [Link Removed]]

The immediate issue to address is to handle the single timesample case better, maybe by keying it in the USDStage's Level Sequence, and then also generating a Level Sequence on import.

The next step would be adding an Import option to bake down xforms and/or keys to a single frame onto the imported assets. 

Let me know if you have any questions, or want to discuss the import topic.

Steps to Reproduce
  1. Take a look at the *.usda files in the text editor to note how they are setup.
  2. Setup USDStages for each *.usda file in a empty level
  3. Look at the temporary Level Sequence for each USDStage - note there is no keyed attributes.
  4. Import each USDStage into the UE project.   Take a look at the generated assets - note that neither the cube.usda or the cube_sublayer_timesampels.usda imports generated a Level Sequence upon import.
  5. Modify the cube.usda file to add two time samples ( as shown in my explanatory video )
  6. Repeat the setup of the USDStages and import steps above.
  7. Investigate the resulting generated assets.   This time a Level Sequence is generated for the cube.usda or the cube_sublayer_timesampels.usda examples.

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-151557 in the post.

0
Login to Vote

Fixed
ComponentUE - Editor - Content Pipeline - USD
Affects Versions5.0.25.1
Target Fix5.1
Fix Commit22180501
Main Commit22188482
Release Commit22180501
CreatedMay 10, 2022
ResolvedSep 26, 2022
UpdatedSep 18, 2023
View Jira Issue