When trying to export a USD file with animation enabled I get a weird error

@sybren this is probably for you, with builbot build of 2.83, if I try to export a USD file I get an error about a plugin not being available:

USD Export: unable to find suitable USD plugin to write X:\Export\test_usd

How can I solve it to be able to export the animated USD?

usd is very picky on the file extension, if you do not pick the right one, you’ll get an error like that, try using test_usd.usda , test_usd.usdc or just test_usd.usd

1 Like

Yup, what @LazyDodo said. The exact format (ASCII or binary USD) is determined by the file’s extension.

1 Like

I made it work finally, I’m not sure what did I do, but it seems to work now, the only problem is that in Unity I receive an error regarding normals import.

Would be useful if I give you the error message here and a sample file with that error?

Because so far the example USD files work fine in Unity, but the Blender exported ones have that problem and I have to disable normal import and set it to compute, so no normals are imported.

Please do :slight_smile:

OK, I’ll be working with those later, I’ll upload it in a while and post it here, the file is pretty simple.

I was not able to upload this before today, here is the erro I get in Unity and the file to download, the error disappear as soon as I compute the normals instead of importing them.


IndexOutOfRangeException: Index was outside the bounds of the array.
Unity.Formats.USD.MeshImporter.BuildMesh_ (System.String path, USD.NET.Unity.MeshSample usdMesh, UnityEngine.Mesh unityMesh, Unity.Formats.USD.MeshImporter+GeometrySubsets geomSubsets, UnityEngine.GameObject go, UnityEngine.Renderer renderer, Unity.Formats.USD.SceneImportOptions options) (at Library/PackageCache/com.unity.formats.usd@1.0.2-preview.1/Runtime/Scripts/IO/Geometry/MeshImporter.cs:429)
Unity.Formats.USD.MeshImporter.BuildMesh (System.String path, USD.NET.Unity.MeshSample usdMesh, Unity.Formats.USD.MeshImporter+GeometrySubsets geomSubsets, UnityEngine.GameObject go, Unity.Formats.USD.SceneImportOptions options) (at Library/PackageCache/com.unity.formats.usd@1.0.2-preview.1/Runtime/Scripts/IO/Geometry/MeshImporter.cs:248)
Unity.Formats.USD.MeshImportStrategy+<Import>d__5.MoveNext () (at Library/PackageCache/com.unity.formats.usd@1.0.2-preview.1/Runtime/Scripts/IO/Geometry/MeshImporter.cs:150)
Rethrow as ImportException: Error processing mesh </Room_Curtains_AN/Cylinder_012>
Unity.Formats.USD.<Import>d__5:MoveNext() (at Library/PackageCache/com.unity.formats.usd@1.0.2-preview.1/Runtime/Scripts/IO/Geometry/MeshImporter.cs:156)
Unity.Formats.USD.<BuildScene>d__9:MoveNext() (at Library/PackageCache/com.unity.formats.usd@1.0.2-preview.1/Runtime/Scripts/IO/Scene/SceneImporter.cs:526)
Unity.Formats.USD.SceneImporter:BuildScene(Scene, GameObject, SceneImportOptions, PrimMap, Boolean) (at Library/PackageCache/com.unity.formats.usd@1.0.2-preview.1/Runtime/Scripts/IO/Scene/SceneImporter.cs:299)
Unity.Formats.USD.SceneImporter:ImportUsd(GameObject, Scene, PrimMap, Boolean, SceneImportOptions) (at Library/PackageCache/com.unity.formats.usd@1.0.2-preview.1/Runtime/Scripts/IO/Scene/SceneImporter.cs:276)
Unity.Formats.USD.SceneImporter:ImportUsd(GameObject, Scene, PrimMap, SceneImportOptions) (at Library/PackageCache/com.unity.formats.usd@1.0.2-preview.1/Runtime/Scripts/IO/Scene/SceneImporter.cs:243)
Unity.Formats.USD.UsdMenu:UsdToGameObject(GameObject, Scene, SceneImportOptions) (at Library/PackageCache/com.unity.formats.usd@1.0.2-preview.1/Editor/Scripts/Behaviors/UsdMenu.cs:376)
Unity.Formats.USD.UsdMenu:MenuImportAsGameObjects() (at Library/PackageCache/com.unity.formats.usd@1.0.2-preview.1/Editor/Scripts/Behaviors/UsdMenu.cs:221)

Had this issue in 3.0… but if you are exporting USD, doesn’t it automatically add the extension? Seems like I had to manually type/add it…

Yup, you have to type the extension yourself.

Unable to export in 3.4 with the same error. How do we know which usd extension to choose? Shouldn’t all three work and only fail at the other end if the format is incompatible?