Search Unity

Official New OpenUSD packages now available

Discussion in 'Asset Importing & Exporting' started by mblain, Dec 6, 2023.

  1. mblain

    mblain

    Unity Technologies

    Joined:
    Aug 11, 2022
    Posts:
    11
    forum_image.png
    Quickstart Guide
    If you're already familiar with our new packages and want to jump straight to getting them installed then please go directly to our "Getting Started" section below.

    Introduction

    We are delighted to announce the release of a brand new bundle of OpenUSD packages supporting the import and export of USD scenes within the Unity Editor.

    Universal Scene Description (USD) is an open source, high-performance, extensible software platform for the construction and interchange of animated 3D scenes and is gaining traction across a wide range of industries.

    USD was originally conceived to meet the needs of large scale VFX productions. It is now seeing increasing adoption in the industrial sector for use cases such as digital twins and product configurators and is starting to play a role in certain large scale game productions.

    These packages provide our next generation of USD support and supersede our previous Import & Export USD offering Unity USD SDK.

    The bundle consists of 3 packages:

    USD Importer (com.unity.importer.usd)

    This package provides support for the import of USD assets into the Unity Editor. The importer is built on the ScriptedImporter API and imports assets stored in USD's data format (with file extensions .usd, .usda, .usdc & .usdz) to Unity native representations.

    The Importer supports both packaged USDZ files and multi-layer USD scenes composed from multiple files on disk. Imported assets are stored as artifacts in Unity's Asset Database and any changes to the source asset files are tracked and reflected within the Editor.

    All 3 Unity render pipelines are supported through the usage of Shader Graph functionality.

    This package is currently at the pre-release stage in Unity’s package lifecycle.

    USD Exporter (com.unity.exporter.usd)
    This package provides support for the export of USD assets from the Unity Editor. The exporter can export scene data in all standard USD formats (.usda, .usdc, .usdz). Export of animated data is also supported via the Recorder package.

    This package is currently at the experimental stage in Unity’s package lifecycle.

    USD C# SDK (com.unity.usd.core)
    This package provides native USD binaries and bindings for accessing the USD SDK from C# code. It acts as a common backend for both the importer and exporter packages.

    The supported USD version is v23.02.

    This package is currently at the pre-release stage in Unity’s package lifecycle.

    Resources
    OpenUSD is a high-performance extensible software platform for the construction and interchange of animated 3D scenes. USD was originally designed for authoring large-scale scenes collaboratively. It provides a powerful composition engine to enable scenes to be non-destructively assembled into a single, composed view from a large number of source assets. It is supported in a wide range of popular content creation applications.

    The “Alliance for OpenUSD” is an Industry initiative working to foster the standardization, development, evolution and growth of OpenUSD. Their forum is a great place to connect with the OpenUSD community and ask questions.

    The “Book of USD” is a good place to start to find out more about the OpenUSD framework.

    Requirements
    The minimum required Unity version is 2023.1. The packages support all current Unity Editor platforms and architectures on supported Unity versions.
    For further details please see our package documentation:
    Getting Started
    Full installation instructions for the packages are included in the package documentation - please see the links in the preceding "Requirements" section.
    If you'd like to get started right away then the packages can be installed by name via the Unity 2023.1+ Package Manager window.
    forum_packageinstall.png
    Package names are as follows:
    • com.unity.importer.usd - USD Import.
    • com.unity.exporter.usd - USD Export.
    • com.unity.usd.core - USD C# SDK.
      • Please note com.unity.usd.core is installed automatically when either the importer or exporter are installed. You only need to install this by name if you are not using either import or export.


    How to report bugs
    Our packages are still in pre-release or experimental development stages. If you find a bug during testing of any of our USD packages, please log it according to the guidance here.


    How to contribute to future plans for Unity’s content pipeline
    To find out more about Unity’s future plans for our content pipeline and share your feedback please take a look at our “Content Pipeline and Package Management Roadmap” page.

    Open Standards
    Unity is committed to increasing its adoption of Open Standards to help deliver a common foundation for content creation, collaboration and interoperability.

    Alongside the OpenUSD support announced today, Unity has recently released Unity glTFast (forum post), a package for efficient import and export of glTF™ 3D files, both at runtime and within the Editor.

    We consider OpenUSD and glTF™ as complementary technologies that help users to build ever more powerful workflows and content pipelines. With these releases, users now have the flexibility to choose the format that best suits their requirements, for example OpenUSD for flexible, complex multi-layer content authoring and glTF™ for efficient runtime content delivery.


    You can find more information on Unity glTFast in the Unity glTFast package documentation.

    Notices

    "Carbon Frame Bike" by Robert Schweier and prefrontal cortex is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

    "Sponza22" by Frank Meinl, Katica Putica, Cristiano Siqueria, Timothy Heath, Justin Prazen, Sebastian Herholz, Bruce Cherniak and Anton Kaplanyan (2022), is licensed under the Academy Software Foundation license | Intel Graphics Sample Library.

    "UsdCookie" and usd-wg/assets are licensed under the Apache License 2.0.
     
    Last edited: Jan 2, 2024
  2. Yoraiz0r

    Yoraiz0r

    Joined:
    Apr 26, 2015
    Posts:
    82
    Hello!
    I'd like to say this is looking pretty exciting - having a newer format than FBX to work with in Unity.
    I'd like to ask a few related questions since I don't see if they were clearly covered by the package or not...

    For context... I work a lot with animations, and the current process of iterating on said animations with available apps is pretty painful
    - If working with Blender, Unity's .blend files export as FBX to my understanding from the included python file in the unity editor installation path, and come in with -90x rotation due to blender's z-up, and with a 100x scale if an armature is involved at times.
    - If working with FBX manually exported with better settings or from other applications, you can eventually reach good enough export settings, but you lose the ability to just drop the iteration file into the unity project path, you have to keep it outside, in a hidden folder, or other such solutions. not ideal.

    My questions are
    1. I see that the import section of the documentation include conversion of cameras and transforms. Does this usd package solve the rotation and scale issues with this? was it verified on rigged armatures with animations and skinned meshes as well, so we can have a 0,0,0 rotation and 1,1,1 scale?
    2. Is there a plan to let .blend files export as .usd instead of .fbx? Is there even a way to achieve this without editing the unity editor install script?
    3. Was this .usd import profiled against the .fbx import process for identical contents to see the performance? if working with many assets, what impact can we expect on our editor iteration time as it imports a bunch of usd files compared to previously available formats?
    4. I recall unity having a gltf format supported a while back, was the .usd format compared against it as well? out of .gltf, .usd, and .fbx, is there any pitfall to be wary of? any recommended format by unity?
    Thanks for working on making more formats be accepted by unity without manual exporting!
     
    JesOb likes this.
  3. Onigiri

    Onigiri

    Joined:
    Aug 10, 2014
    Posts:
    484
    Is there any advantages from using usd over fbx for solo dev? Should i try it?
     
    JamesArndt likes this.
  4. CarePackage17

    CarePackage17

    Joined:
    Dec 6, 2014
    Posts:
    22
    Will you update the usd-sdk GitHub repo to include the new packages, or will their code be open source at all?
     
  5. Schmunkee

    Schmunkee

    Unity Technologies

    Joined:
    Sep 4, 2013
    Posts:
    6

    Thank you for the interest, @Yoraiz0r ! We're painfully aware of those interop pain points. If you want to give the new USD packages a spin, we'd love to hear how you think the USD workflow compares to what you're doing now.

    To address your questions—

    1. You might have been looking at the documentation for the old USD experimental package. At least that's where the link goes. Documentation for the new USD Importer can be found here. I think you're referring to issues when importing .blend files into Unity. Is that right? If so, the new USD packages don't change that behaviour. Which brings me to your next question...

    2. We have no plans right now to support importing .blend files as .usd under the hood. In general, using .blend files can be a little unreliable because it means your import result is dependent upon the version of Blender. When versions of Blender have changed in the past we have seen some adverse effects to our users, until we've had the opportunity either to work with Blender, or patch the script. Unless you have real workflow benefits, we'd recommend using FBX or USD directly.

    3. Yes, indeed. We did do some benchmarking to see how import time compares between FBX and USD. Importing USDC and USDZ files is approximately 2x faster than importing the same content as FBX. With USDA results may vary.

    4. USD and glTF each have their strengths and weaknesses. glTF is great for runtime import. USD is really good for cross-tool interop. If you have a use case where durability and reusability of content across many apps and DCCs (Digital Content Creation tools) is important, USD is an excellent choice. This is a common use case for people creating digital twins, but it could be relevant to some game productions too. If you care about import times (who doesn't!?), see the answer to question 3 ;) So what is the format we recommend? It depends on your use case. If you're doing game development and want to give USD a try, I'd recommend using USDZ files, where all references are contained within the file. It gives you workflow that's very similar to what you're used to with FBX.

    Hope that helps!
     
  6. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,789
    Cool, now bundle it with the editor instead of it being a package.
     
  7. Yoraiz0r

    Yoraiz0r

    Joined:
    Apr 26, 2015
    Posts:
    82
    Oh absolutely, I'd love to give it a spin - it's an active ambition of mine to reduce complexity for working with and editing assets. One thing that tends to be painful with that is the import time, and another is iteration time. I have not worked with USD files because they haven't been relevant to me until now, but I am eager to swap if it is an improvement. To that end...

    This sounds incredible!
    This is a bit of a shame, but I understand. My question mainly originates from trying to minimize user file access scramble.
    For example, when you notice an issue with an animation and want to edit it within a DCC app, you often have to separately go find the original DCC app's file, make your changes, save, and separately export to Unity and pray you picked the right settings for unity, and watch for the reimport.

    What .blend files directly in Unity did was cut that down drastically, as you can literally double-click the model's source file to open it in blender directly, make your changes, only saving, and watching it reimport immediately. No settings for the user to fiddle with.

    I am aware that a plugin for blender could be written outside the realm of unity but that doesn't translate as well for potential team members.

    Is there any DCC app you know of that would treat USD files as native to open and save as? I'm aware its meant to be universal so the answer is likely no, but in that case I would need to figure out some adapter perhaps on Unity's end.

    Does it sound reasonable and possible at all to make a script that modifies how unity handles opening a usd file with double clicking / adjust the file save process to make it easier for users to hop into? any tips here?

    All in all though - wonderful! Thanks for working on this package!
     
    exitshadow likes this.
  8. mblain

    mblain

    Unity Technologies

    Joined:
    Aug 11, 2022
    Posts:
    11
    Thank you for your question @CarePackage17 and for your interest in our packages!

    We're not intending to include the new packages in the usd-sdk GitHub repo. At the moment we don't have any plans to make the code open source - that is something we will definitely consider in the future. In the meantime the C# code for import and export is shipped as part of the packages. All feedback is welcome!
     
  9. holo-krzysztof

    holo-krzysztof

    Joined:
    Apr 5, 2017
    Posts:
    77
    Is there a particular reason why the packages require Unity 2023?
    Our app is using 2021 LTS right now and will soon be updating to 2022, so it'll take us a long time to actually be able to use these packages.

    Out of curiosity, I tried to run the core package sample in 2022.3.15 by copy-pasting into my Packages folder, but got crashes at DLL load time. I guess something changes inside Unity/Mono in how they load shared libraries?
    Unfortunately I'm not able to debug this due to https://issuetracker.unity3d.com/is...aps-is-enabled-in-global-flags-of-windows-sdk
     
  10. mblain

    mblain

    Unity Technologies

    Joined:
    Aug 11, 2022
    Posts:
    11
    Hello @holo-krzysztof and thank you for trying our packages.

    The packages rely on functionality currently only available in 2023.1+. The package sample works as intended in 2023. However, on 2022 errors will be encountered as the expected functionality is not present.
     
  11. B_ware

    B_ware

    Joined:
    Mar 14, 2021
    Posts:
    7
    Hello Unity, I love the way you are integrating USD format, but I just have to notify you that I found with this new USD importer, the meshes containing submeshes are not imported/converted correctly, resulting in a pink artifact, but with the old usd-unity-sdk it was working correctly.
    And I don't see anymore an option to make the materials editable, I don't know if it is because of unity 2023 or this package.
     
    Last edited: Dec 19, 2023
  12. mblain

    mblain

    Unity Technologies

    Joined:
    Aug 11, 2022
    Posts:
    11
    Hello @B_ware. Thank you for trying out our new packages and taking the time to share your feedback.

    When you say "submeshes" do you mean UsdGeomSubsets or are you referring to a hierarchy of mesh prims? Perhaps you can share some more details about the structure of your USD data.
    Yes, material sub-assets are not editable in a similar way to other asset importers. If you would like to edit a material then one way to do this is to create a material variant from the source material and edit that.
     
    B_ware likes this.
  13. Schmunkee

    Schmunkee

    Unity Technologies

    Joined:
    Sep 4, 2013
    Posts:
    6
    Hi @Onigiri ,
    Great question! Yes, there are advantages, but there are also tradeoffs.

    On the benefits side, you should see better import time performance and improved compatibility with various USD centric DCC tools.

    If you do decide to give it a try as a single dev, I'd advise you to use USDZ files, to maintain maximum production safety and the flexibility to refactor your project structure.

    Just like FBX, USDZ files have the benefit of containing all their own references, which is good for production safety. USD, USDA and USDC files, on the other hand, can have references to many other USD files. Because we have prioritised determinism with our implementation, imported USD files will not work in Unity if references are not in the right place. Very large game productions will often have a lot of production safety measures in place around their content pipeline that mitigate this risk (just as large film productions do). If you're a single dev, you might experience these measures as a tradeoff, because the flexibility you're used to have with your project structure will be reduced. At least compared to FBX where you can move things around in your project hierarchy without them breaking.

    If you decide to give it a try, let us know how it goes!
     
  14. Schmunkee

    Schmunkee

    Unity Technologies

    Joined:
    Sep 4, 2013
    Posts:
    6
    If you're thinking of modelling and animation tools, the answer is no. Many DCCs have varying degrees of USD support (and they're getting better and better) but none have native USD authoring. Houdini's Solaris and Nvidia's Omniverse tools are built on USD, but they are focused on composition and rendering rather than content creation.

    Just to confirm my understanding: Do you want to double-click a USD source file in Unity in order to open it directly in a DCC where you can make adjustments to it?
     
    Yoraiz0r likes this.
  15. B_ware

    B_ware

    Joined:
    Mar 14, 2021
    Posts:
    7
    Hello!
    Thank you for the answer, you are right, I have not been enough specific.
    I mean UsdGeomSubsets, I would attach here a very simple '.usda' file here, but I am not allowed to upload it here because of the extension.

    For what concern the material editability, I thank you for pointing that solution out.
    the fact that materials are not directly editable, is it for performance?

    Keep up the good work!
    Thank you
     
  16. Yoraiz0r

    Yoraiz0r

    Joined:
    Apr 26, 2015
    Posts:
    82
    Yes! Specifically, I'm seeking to reduce an iteration cycle whenever an asset is spotted that needs adjustments, and making sure that assets can exist only in one place in the project.

    Suppose that USD files have to be authored by one other DCC app, with its own file, you'll have the issue where every time you see an asset that needs iteration (such as a fix, adjustment, or whatever) in unity, you double click it to get no result, and have to go manually look for where the source asset is.

    Similarly, whenever you do eventually find the source asset and make your adjustments and hit save, nothing happens, since you have to re-export, and you better do your re-export with the same settings every single time...

    The biggest benefit of the previously mentioned .blend file integration into unity is that it cut all those steps out of the process. You only have a .blend file in your project, double clicking a mesh or animation that needs adjustment opens that .blend file and you can immediately make changes in blender directly, then just press ctrl+s / save and watch unity reimport the asset with all the desired changes.

    No duplicity of assets in the project's version control, no unique off-site location disconnected from the unity project, just clean workflow. USD not having this means that despite it being a new 'better' format, its far slower to iteratively work with for marginal import time gains.
     
  17. fherbst

    fherbst

    Joined:
    Jun 24, 2012
    Posts:
    802
    It seems that the new packages don't have an option anymore to choose between "Proxy" and "Render" import modes. This is quite important when working with heavy USD files (ALab being a good example).

    As this is a regression to the previous packages, will that option be brought back?

    Currently having both "Display" and "Proxy" types in a file will result in double imports and ugly overlaps:
    upload_2023-12-22_2-1-17.png
    upload_2023-12-22_2-1-5.png
     

    Attached Files:

  18. mblain

    mblain

    Unity Technologies

    Joined:
    Aug 11, 2022
    Posts:
    11
    Hi Felix,
    Thank you for your message. We will take a closer look at this and let you know our findings.
     
  19. B_ware

    B_ware

    Joined:
    Mar 14, 2021
    Posts:
    7
    Hello!
    I just wanted to inform you that I was using an older version of the test file I am using.
    my bad, sorry for that.
    it works perfectly the package.
    I just have to check how it behaves with run time import, but that's another topic.

    Good Job Unity :)
     
    mblain and Schmunkee like this.
  20. fm_bifrost

    fm_bifrost

    Joined:
    Nov 22, 2023
    Posts:
    3
    Hello,
    Thank you for this update. I just finished a project with the previous importer and am now looking forward to recreate it with this new edition.
    I read the full content of the help but could not find any information about Purpose or Geometry Variants. Are those supported?
    I'm using a very simple example of a pighead made in houdini with the Component Builder, with 3 geometry variants (LOD0 to LOD2). I can't seem to find any option to switch the geometry. For reference, the old importer would simply import all 3 geometries regardless of the variant mechanism, then I'd script which I want to use.
    I hope you can help.
    Thanks
     
  21. mblain

    mblain

    Unity Technologies

    Joined:
    Aug 11, 2022
    Posts:
    11
    Hi again Felix,
    Our first release does not take the purpose attribute into account when traversing the stage on import. Adding this support is something we will consider for a forthcoming release.
    Thanks again for your message.
     
  22. mblain

    mblain

    Unity Technologies

    Joined:
    Aug 11, 2022
    Posts:
    11
    Hi @fm_bifrost. Thank you for your message and great to hear you have already used the previous importer in your project.
    Our first release of the new importer package does not take the purpose attribute into account when traversing the stage on import. We will consider support for this as part of a forthcoming release.
    We also currently don't provide settings for configuring variant sets during import. The importer will respect the authored variant selection in the source USD file. Right now you would need to edit the source USD file to switch the variant selection to another LOD.
    Thanks again for raising this and we will update our documentation to make this clearer.
     
  23. JoystickLab

    JoystickLab

    Joined:
    Mar 18, 2016
    Posts:
    14
    Is it possible to export a scene or game object as usdz in runtime using the usdz core library?
     
  24. fm_bifrost

    fm_bifrost

    Joined:
    Nov 22, 2023
    Posts:
    3
    Hi again,
    Thanks for your previous response.
    I just noticed that the geometry is horizontally mirrored upon import. This is likely linked to the left hand/right hand convention.
    On the images below you can see the position of the characters near the center of the world (1: Houdini, 2: USDView, 3: Unity). We can see that USDView matches Houdini, but the view in Unity is mirrored.
    This didn't happen in the old importer.
    mirror houdini.png mirror usdview.png mirror unity.png

    Moreover, I have another example (image 4) with a terrain and trees, where only the terrain got mirrored !
    Notion_2024-01-26_1803.png

    Is there a property that I could change on the importer to flip back the geometry on import?

    Thanks in advance for your help.
    FM
     
  25. faysalfdt

    faysalfdt

    Joined:
    Jul 11, 2023
    Posts:
    4
    Greetings any word on getting this built against Apple Silicon? We're wanting to potentially use this with the Unity Polyspatial runtime for VisionOS and need to build using the Silicon Editor
     
    ilmario likes this.
  26. Measter4

    Measter4

    Joined:
    Aug 31, 2021
    Posts:
    2
    We're starting to implement these in our workflow that has already been switched to USD on the Maya/Content side, just waiting for these, thank you! I do want to know however if there are plans for adding a USD Layer editor so we can compose whole USD stages instead of just individual files.
     
  27. mblain

    mblain

    Unity Technologies

    Joined:
    Aug 11, 2022
    Posts:
    11
    Hi @faysalfdt,
    The packages support all current Unity Editor platforms and architectures on supported Unity versions. That includes Apple Silicon.
    Please let us know if you encounter any issues.
     
  28. mblain

    mblain

    Unity Technologies

    Joined:
    Aug 11, 2022
    Posts:
    11
    Hi @fm_bifrost,
    Thank you for your post and apologies for the delayed reply. Please consider logging a bug if this is still an issue impacting your project.
     
  29. mblain

    mblain

    Unity Technologies

    Joined:
    Aug 11, 2022
    Posts:
    11
    Hi @JoystickLab,
    Apologies for the delayed response. We have not targeted runtime export with this initial release.
    We are always interested to hear more about potential use cases so please consider taking a look at our roadmap page and share your feedback.
     
    ilmario likes this.
  30. ilmario

    ilmario

    Joined:
    Feb 16, 2015
    Posts:
    71
    Personally I believe that runtime USDZ export could be nice for some purposes but runtime USDZ import is IMHO a feature that would see a significant amount of real use cases and adaptation. Modern mobile devices (Apple) already support capture and export of real objects directly into USDZ, why not support direct imports?

    Being able to import them as user generated content in a superior modern 3D format into Unity apps (runtime) is the real killer feature!

    I did not see that on the current roadmap, but I believe it is so needed it should get there sooner or later.
     
    LohanSGR and PixelDough like this.
  31. PixelDough

    PixelDough

    Joined:
    Apr 27, 2018
    Posts:
    56
    I've pretty much only been excited about USDZ support solely for runtime import, as it would make user generated content so so so much easier to support. Of course, it's a great format to support in editor, but runtime import is a must have feature for me.
     
    LohanSGR likes this.
  32. TheJavierD

    TheJavierD

    Joined:
    Jan 6, 2017
    Posts:
    51
    Must have runtime import please.
     
    LohanSGR likes this.
  33. fm_bifrost

    fm_bifrost

    Joined:
    Nov 22, 2023
    Posts:
    3
    Hi Michael,
    I reported the bug through the official channel as you suggested.

    For more visibility to other users, here's the recap and files that superseeds my previous post.

    My Houdini scene contains
    - 1 regular mesh with zeroed out transforms
    - 1 regular mesh with non zero rotation and translation
    - 1instanced objects with non-zero transforms

    I export those as a usd file. When importing them in Unity with the new USD importer presented here, the transform of the objects are wrong.For reference I also imported this USD scene into USDView and the objects are placed and oriented properly. It looks like the right hand coordinate system from USD is not translated properly to the left hand coordinate system from Unity.

    In Unity I can fix the transform by NEGATING the following transforms:
    - Positon X , Position Z
    - Rotate X
    - Scale X
    Obviously I can't do this in a scene with thousands of objects.

    The screenhsots illustrate the issue:
    - usd-transform-houini.png > shows the usd scene in Houdini
    - usd-transform-unity.ong > shows the same scene imported in Unity
    - usd-transform-before-after-manual-fix.png > shows on the left the original import, on the right the same objects with modified transforms based on the rules listed above.

    Thanks for your help.
     

    Attached Files:

  34. VRS3DGuru

    VRS3DGuru

    Joined:
    Sep 21, 2017
    Posts:
    14
    PiXYZ Plugin + USD Importer causes error of Multiple selected importers are targeting the extensions for USD. For the same error with gltFast, we are able to use a Scripting define to un-set the default importer using this "GLTFAST_FORCE_DEFAULT_IMPORTER_OFF". This removes the error and allows us to select the preferred importer at import. What would be the equivalent Scripting define symbol for the Unity USD Importer package. We need to have both PIXYZ Plugin 4 Unity and USD Importer packages in our project.
     
  35. VRS3DGuru

    VRS3DGuru

    Joined:
    Sep 21, 2017
    Posts:
    14
    Bumping above post