top of page

LXR Land

Documentation of the LXR Land project and key learnings



Summary

  • USD as an interoperable file format is in itself quite good

  • Support for USD is widespread (as in most 3D programs have some level of support) but usually limited (i.e. the level of support in a given program is usually lacking in some ways)

  • Installing Pixar's USD implementation is a hassle and it is fragile once installed due to its dependency on the system Python installation and libraries



Blender USD Support

Blender has a USD exporter/importer out of the box. It cannot open USD files natively, however, the main problem with which being that any aspect of USD that Blender cannot handle will be lost when updating a USD file by import->export.

Limitations with Blender USD support:


  • No "defaultPrim" is set on export

  • This precludes referencing it from another layer (loading it as a sublayer is still OK though)

  • Some strange bug whereby it will randomly claim it can't find the USD plugin when trying to export, and delete a usd file that you are attempting to overwrite. Possible cause is when repeatedly exporting and leaving path/filename to default to what it was before (as saving to a different filename seemed to work around the issue).

  • Does not yet support exporting Skeletal Meshes

  • If in edit mode, the active mesh won't be included in USD export. This proved to be a common source of errors.

  • Blender doesn't appear to export emissive to materials (even though this is supported by USD's UsdPreviewSurface)

  • When exporting a mesh with multiple materials, importing it to unreal will only recognize one material slot.

  • Can be fixed manually by removing the material:binding property from the Mesh prim in question from the output USD file.

Unreal 5.1 USD Support

Unreal has a USD plugin which enables importing/exporting USD and also the ability to open USD files natively.

Opening USD files natively in Unreal

  • You can "open" a USD file in a particular level in Unreal.

  • The fact that the USD file is open is saved to the .umap file, but the contents of the file is loaded dynamically each time the level is opened

  • Sublayers are loaded recursively (i.e. USD files referenced in the top level USD file are loaded e.t.c).

  • Transient actors are created to represent the USD prims in Unreal

  • Modifying the transient actors and then saving will write to the USD file, although only concepts that are representable in USD can be saved in this manner. Any other modifications to the transient actors will be lost on reloading the level.

  • Example: There is not a way to directly add scripts to the transient actors. The only way to add functionality to them that was found was having a persistent actor in the level find the transient actor by name.

  • No way was found of assigning collision geometry to the transient actors

  • Unreal has a USD stage viewer which enables viewing the tree structure of a loaded USD stage.

  • Unreal recognizes USD variants and lets you switch between them

The lack of ability to add scripts or collision geometry to natively loaded USD actors is potentially a bit of a deal-breaker for an actual game (although it wouldn't be an issue for linear media, which seems to be one of the main applications for USD in Unreal at the moment).

Thus, for LXR land, we fell back on importing the USD to unreal.

Importing USD into Unreal

Unreal's USD importer can be used to import USD objects to an Unreal project in a similar manner to FBX or other 3D file formats, with the following differences:


Pros: One can load a USD stage natively into a level and then import it, having positioned it as desired (and made any modifications to the USD, which could be saved back out). Static meshes, materials e.t.c. will be created in the content browser but also the transient actors in the level will be converted to permanent actors and saved to the level.

Cons: The import dialogue lacks an option to generate collision geometry automatically. This incurs the inconvenience of manually opening each static mesh actor that was generated and adding collision geometry.

Worse still, this will have to be done every time a mesh is reimported from USD.


bottom of page