Coder Social home page Coder Social logo

unity-technologies / usd-unity-sdk Goto Github PK

View Code? Open in Web Editor NEW
489.0 48.0 74.0 733 MB

Integration of Pixar's Universal Scene Description into Unity. UPDATE: This package has been superseded by our new bundle of USD packages. Please see README & link below for further details.

Home Page: https://forum.unity.com/threads/new-openusd-packages-now-available.1524583/

License: Apache License 2.0

Batchfile 0.01% C# 57.94% Python 0.23% C++ 38.80% ShaderLab 0.06% CMake 0.18% SWIG 2.78%

usd-unity-sdk's Introduction

Important

Update - December 12 2023

We have just released a bundle of packages that provide Unity's next generation USD support. These supersede this package and are available for Unity 2023.1+. Further details can be found in our forum announcement.

The new packages can be installed by name via Unity's Package Manager.

Package name What it does Further Details
com.unity.importer.usd USD Import manual
com.unity.exporter.usd USD Export manual
com.unity.usd.core1 USD C# SDK manual

1. 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.

USD Unity SDK: USD Experimental Package for Unity

This repository contains the source code for the com.unity.formats.usd package. It includes a set of libraries designed to support the use of USD in C#, as well as code to import and export USD files into the editor. The goal of this package is to make it maximally easy to integrate and explore Universal Scene Description.

Animal Logic's ALab USD Sample in the Unity Editor

Animal Logic's ALab USD Sample in the Unity Editor.

Documentation

For full documentation of this package, including usage, see the package docs.

Features

The following is a brief listing of currently supported features:

  • Importing and exporting USD:
    • Import as GameObject, Prefab, or Timeline Clip
      • File formats: .usd, .usda, .usdc, .usdz
    • Export Game Objects to USD
      • File formats: .usd, .usda, .usdc, .usdz
      • Export of Transform Overrides
    • Export via Recorder package
  • Composition:
    • Variant Selection
    • Payloads
      • Load All and Individual
    • Layer stacks
  • Geometry:
    • UV Set
    • Vertex Colour
  • Instancing:
    • Point Instancing
    • Scenegraph Instancing
  • Primitive Types:
    • Meshes:
      • Arbitrary Primvars
      • Vertex Colors
    • Materials:
      • Standard Shader and Limited HDRP and URP Support
  • Cameras
  • Lightmaps:
    • Automatic Lightmap UV Unwrapping
  • Animation:
    • Timeline Playback:
      • Skeletal Animation via USDSkel
      • Animated Meshes
    • Timeline Recording Track via Unity Recorder Package
  • General:
    • High and Low Level Access to USD API via C#

Known Limitations

We do not currently support the following:

  • Apple Silicon (MacOS users must use Intel Editor)
  • Geometry:
    • Multiple UV Sets
    • Importing mesh UVs for a prim without a material attached
  • Composition:
    • Purposes
  • Primitive Types:
    • Camera
      • We do not currently import and export all physical camera settings
    • Materials:
      • Transparency Settings eg Alpha Clipping, Double Sided are not imported for HDRP and Built in (these can be set manually)
      • Imported maps override imported single values, eg presence of ColorMap will stop single Color being imported, same for Smoothness/ Roughness.
    • Lights
  • Animation:
    • Blend Shapes
  • General:
    • Custom prims

Due to conflicting USD plugins, this package may have unexpected errors when installed side-by-side with NVidia's Omniverse Connector package.

License

The USD Unity SDK is licensed under the terms of the Apache license. See LICENSE for more information.

Contribute

See CONTRIBUTING.md

Build

See BUILDING.md

usd-unity-sdk's People

Contributors

barath121 avatar clusty avatar cpredmann avatar etherelric avatar hybridherbst avatar jcowles avatar jminor avatar judubu avatar lee-aandrew avatar lucillecaillaud avatar mfe avatar michaeljblain avatar mirceaispas avatar samuelschmidt-brinx avatar secticide avatar thomas-tu avatar vickycl avatar vkovec avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

usd-unity-sdk's Issues

Loading Alembic Cache files

Does the USD build included here come with the Alembic plugin? There's an Alembic.dll, but when I try to load an .abc file I get an error message:

ApplicationException: USD: Cannot determine file format for @C:\Users\bonus\Documents\ANIMVR\Import\Custom\test.abc?target=usd@
USD.NET.Unity.DiagnosticHandler.OnError (string) (at C:/src/usd/usd-unity-sdk/src/USD.NET.Unity/DiagnosticHandler.cs:46)
pxr.DiagnosticHandler.SwigDirectorOnError (string) (at C:/src/usd/usd-unity-sdk/src/USD.NET/generated/usdCs/DiagnosticHandler.cs:100)
(wrapper native-to-managed) pxr.DiagnosticHandler.SwigDirectorOnError (intptr) <IL 0x0002a, 0x00152>
pxr.UsdStage.Open (string) (at C:/src/usd/usd-unity-sdk/src/USD.NET/generated/pxr/usd/usd/UsdStage.cs:113)
USD.NET.Scene.Open (string) (at C:/src/usd/usd-unity-sdk/src/USD.NET/serialization/Scene.cs:155)

I know I can convert .abc files to .usd with usdcat, but I think it would be useful if our users could load both file types.

Instanceable true on reference breaks mesh (FTV-206)

When m_usdTimeOffset is set during runtime, referenced meshes with instanceable=true set, break and are randomly duplicated throughout the scene and usd hierarchy.

Examples can be provided.

Have successfully removed instanceable=true and have fixed the breaking meshes.

Breaks mesh on m_usdTimeOffsetChange

   def Xform "domeHero_001" (
        instanceable = true
        prepend references = @/path/to/asset.usd@
    )
    {
        float xformOp:rotateY = -267.4804
        double3 xformOp:translate = (0, 1128.6803799705747, 0)
        uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateY"]
    }

Acts as intended

   def Xform "domeHero_001" (
        prepend references = @/path/to/asset.usd@
    )
    {
        float xformOp:rotateY = -267.4804
        double3 xformOp:translate = (0, 1128.6803799705747, 0)
        uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:rotateY"]
    }

Value types in Sample objects should be nullable (FTV-212)

For example, XformSample has a Matrix4x4 object, which is always written for every sample because it is not nullable.

This may make reading values trickier, so a unit test should be added to verify the round-trip API works as expected, without additional complications.

Standard shader "pops" when opening the inspector (FTV-252)

When importing a USD file with Preview Surface shading, some standard shader attributes will "pop" as soon as you click on the mesh and view the material properties in the inspector. The Apple ARKit body tracking example exhibits this bug (robot.usdz in the download on this page):
https://developer.apple.com/documentation/arkit/capturing_body_motion_in_3d

My assumption is that these properties require shader keywords that are either missing or changed after the original shader import code was written. Note that StandardShaderImporter does already attempt to do the right thing WRT keywords:

USDZ Runtime Export (FTV-200)

Is there any plans to make this work at runtime (IE outside of the editor) so we can have user created USDZ files. Also it seems like the animation did not work when I tried exporting to USDZ. For example https://www.vectary.com/ is actually charging you to export to USDZ which is absurd.

USD.NET.Scene throws exceptions for non-exiting prims (FTV-210)

When a prim doesn't exist, USD.NET.Scene attempts to cache a null UsdPrim, which will cause it to be cached multiple times, which ultimately throws Dictionary exceptions that the entry already exists.

While this is a user/coding error, it is also a confusing error message.

Move USD plugins /share folder to StreamingAssets

As it is right now the plugin info meta data in /share will not get copied to the build directory automatically when building the standalone player. Copying the folder manually works, but it's an extra step that can be avoided by putting the /share folder into SharedAssets.
This would require fixing up the relative paths in the plugInfo files and changing the path used in UsdInit.

NullReferenceException on USD export

I was attempting to export the blacksmith environment (Bridge_small_02 scene):

https://assetstore.unity.com/packages/essentials/asset-packs/the-blacksmith-environments-39948

...and got a NullReferenceException:

NullReferenceException: Object reference not set to an instance of an object
Unity.Formats.USD.MeshExporter.ExportMesh (Unity.Formats.USD.ObjectContext objContext, Unity.Formats.USD.ExportContext exportContext, UnityEngine.Mesh mesh, UnityEngine.Material sharedMaterial, UnityEngine.Material[] sharedMaterials, System.Boolean exportMeshPose) (at D:/Storage/3D/Unity/usd-unity-sdk-1.0.0-preview.4/package/com.unity.formats.usd/Runtime/Scripts/IO/Geometry/MeshExporter.cs:162)
Unity.Formats.USD.MeshExporter.ExportMesh (Unity.Formats.USD.ObjectContext objContext, Unity.Formats.USD.ExportContext exportContext) (at D:/Storage/3D/Unity/usd-unity-sdk-1.0.0-preview.4/package/com.unity.formats.usd/Runtime/Scripts/IO/Geometry/MeshExporter.cs:147)
Unity.Formats.USD.SceneExporter.ExportImpl (UnityEngine.GameObject root, Unity.Formats.USD.ExportContext context) (at D:/Storage/3D/Unity/usd-unity-sdk-1.0.0-preview.4/package/com.unity.formats.usd/Runtime/Scripts/IO/Scene/SceneExporter.cs:220)
Unity.Formats.USD.SceneExporter.Export (UnityEngine.GameObject root, Unity.Formats.USD.ExportContext context, System.Boolean zeroRootTransform) (at D:/Storage/3D/Unity/usd-unity-sdk-1.0.0-preview.4/package/com.unity.formats.usd/Runtime/Scripts/IO/Scene/SceneExporter.cs:158)
Unity.Formats.USD.SceneExporter.Export (UnityEngine.GameObject root, USD.NET.Scene scene, Unity.Formats.USD.BasisTransformation basisTransform, System.Boolean exportUnvarying, System.Boolean zeroRootTransform, System.Boolean exportMaterials, System.Boolean exportMonoBehaviours) (at D:/Storage/3D/Unity/usd-unity-sdk-1.0.0-preview.4/package/com.unity.formats.usd/Runtime/Scripts/IO/Scene/SceneExporter.cs:128)
Unity.Formats.USD.UsdMenu.ExportSelected (Unity.Formats.USD.BasisTransformation basisTransform, System.String fileExtension, System.Boolean exportMonoBehaviours) (at D:/Storage/3D/Unity/usd-unity-sdk-1.0.0-preview.4/package/com.unity.formats.usd/Editor/Scripts/Behaviors/UsdMenu.cs:180)
UnityEngine.Debug:LogException(Exception)
Unity.Formats.USD.UsdMenu:ExportSelected(BasisTransformation, String, Boolean) (at D:/Storage/3D/Unity/usd-unity-sdk-1.0.0-preview.4/package/com.unity.formats.usd/Editor/Scripts/Behaviors/UsdMenu.cs:184)
Unity.Formats.USD.UsdMenu:MenuExportSelectedWithChildren() (at D:/Storage/3D/Unity/usd-unity-sdk-1.0.0-preview.4/package/com.unity.formats.usd/Editor/Scripts/Behaviors/UsdMenu.cs:67)

I got the error when attempting to export the top-level "Environment" object in the hierarchy. I'm sure it's erroring because there's some entities that it can't export properly (I don't expect it to work on everything!), but it would be nice if it could perhaps print an error, and then continue on with exporting what it can. While it does indeed create a USD export, it seems to only contain what it traversed before the error - in my case, it only had Environment/Ferns, and, ie, nothing from Environment/Boardwalks, or anything else.

unity-sdk-1.0.0-preview.4 release
OS: Windows 10
Unity: 2019.1.0b8

Add support for baking animation to texture

Workflow:

  • Import a USD file with vertex animation (not UsdSkel)
  • Select the animated game object in Unity
  • Click "bake to animation texture"

Uses:

  • Animate object using this texture via custom shader / Shader Graph
  • Create effects from this via VFX Graph

Support for Cameras/Curves/etc

Hi everyone,

Maybe I'm missing something, but it seems to me that the only schemata that are exposed (also via the native API) are XForm and Mesh.

Is that something that's easy to add? If yes, I'd be happy to contribute more schemata as I need them.

Cheers, Dario

usdview no longer runs without --defaultsettings

When I run usdview, I get the following:

Traceback (most recent call last):
  File "C:\src\usd\_build-monolithic-py\lib\python\pxr\Usdviewq\stageView.py", line 2131, in glDraw
    if not self._getRenderer():
  File "C:\src\usd\_build-monolithic-py\lib\python\pxr\Usdviewq\stageView.py", line 907, in _getRenderer
    self._handleRendererChanged(self.GetCurrentRendererId())
  File "C:\src\usd\_build-monolithic-py\lib\python\pxr\Usdviewq\stageView.py", line 914, in _handleRendererChanged
    self._rendererDisplayName = self.GetRendererDisplayName(rendererId)
  File "C:\src\usd\_build-monolithic-py\lib\python\pxr\Usdviewq\stageView.py", line 932, in GetRendererDisplayName
    return self._renderer.GetRendererDisplayName(plugId)
pxr.Tf.ErrorException:
        Error in 'pxrInternal_v0_19__pxrReserved__::UsdImagingGLEngine::GetRendererDisplayName' at line 654 in file C:\src\usd\USD\pxr\usdImaging\lib\usdImagingGL\engine.cpp : 'Failed verification: ' HdxRendererPluginRegistry::GetInstance(). GetPluginDesc(id, &pluginDescriptor) ''

When I run with "--clearsettings", I get this message:

INFO: ClearSettings requested, but there were no settings currently stored.

Running with "--defaultsettings" fixes the problem, but I must ALWAYS use this option now.

Here are my state and state.json files (zipped):
state.zip

Normals update after opening standard shader (FTV-197)

When normals are authored, it seems the shader must be opened in the inspector UI to trigger some sort of update on the material. This is likely due to missing keywords on the material, which can be verified via the debug inspector mode by looking at the keywords before and after the mesh visually changes.

The model attached exhibits this behavior.

robot.zip

usdTimeOffset double speed (FTV-207) (USDU-241)

When setting m_usdTimeOffset in game, playback seems to be double speed.

Not sure if this is intentional and I'm setting the time wrong, but this seems to add m_usdTimeOffset to itself. Have tested and removing Line 631 plays back at normal speed. m_usdTimeOffset is being set with Time.time - startTime

This can be reproduced by comparing with usdview playback and experiencing fast playback in unity.

SetTime(m_usdTimeOffset, this, saveMeshUpdates: true);

Building just the USD.NET for use in C# console application

Hello! I have a personal project that I want to utilize the C# binding that you guys created to create a single USD.NET.dll to be referenced in my console application but every time I use an endpoint, it gives me .NET Exception Handling โ€“ System.BadImageFormatException message...

I think it might be CLR difference... so I have attempted to follow your build instruction and able to complete making nonpython and python builds of USD library... but the parts after that, I get additional errors... and cannot proceed anymore.

Could you guys point me to the right direction on how to build a USD.NET.dll that can be used in console application?

Point vs Vertex normals (FTV-199) (USDU-227)

It looks like the 'import' normals option doesn't interpret point vs vertex normals correctly. Unity expects the number of normals to equal the number of points. So in houdini, add a vertex split SOP (set to "N" and promote) after your normal sop. Then delete the N vertex attr. I sent a test USD file to @jcowles with a test case

Remove implicit "kVersion" metadata

Currently the SDK will write kVersion metadata whenever a prim is authored. Pixar's advice on this is that versioning is not necessary, since the reader is expected to handle missing data gracefully.

At the very least, we should author kVersion once per layer, rather than authoring it on every UsdPrim.

USDZ Texture reading support (FTV-202)(USDU-230)

Is USDZ import currently supported? I've noticed that USDZ is not a registered extension on the filesystem import selection, however you can manually import if you change the selection to "All Files". Loading a USDZ model with this method is a fair bit slower than loading an equivalent USD model, and I've noticed that materials will at times not import correctly compared to a USD counterpart as well.

Occlusion maps don't seem to work

Import the Apple ARKit body tracking example robot.usdz in the download on this page:
https://developer.apple.com/documentation/arkit/capturing_body_motion_in_3d

Change the material to "Import Preview Surface"

Notice that adjusting the occlusion map slider on the main mesh does nothing, even when the material has an occlusion map. Setting the value to a solid white/black textures also does nothing.

Current view in Unity after import:
image

View in QuickLook:
image
image

Close up of joints in XCode:
image

FaceVarying UVs look wrong (FTV-173) (USDU-228)

There appears to be a bug in ImportMesh.UnrollFaceVarying, this may or may not be related to indexed UVs.

A test case from an external user looks wrong when imported, however breaking the mesh into polygon soup with no shared vertices results in the correct UV mapping, so some part of the unrolling process is failing.

For context: FaceVarying UVs in USD indicates that for every face, there exists one UV per vertex in the face. For example, a mesh with two triangles with two shared vertices (e.g. vertexCount == 4, indexCount = 6), will result in 6 UVs, not 4. The motivation for doing this is UV seams, where there is a break in the UV topology, but not in the mesh topology (which is desirable because unwelding the mesh topology would affect tessellation of the mesh during subdivision). Finally, because indexing UVs is typically still a win, a separate index array is optionally provided for UVs.

Documentation attribute

It would be nice to expose a documentation attribute for use when declaring Sample/Schema data types, for example:

class MyData : USD.NET.SampleBase {
  [Documentation("Indicates the software version number")]
  int version;
}

Which would use the built-in documentation metadata available on all USD prims and properties.

USD v0.8.2 files aren't readable by USD v0.8.1

This incompatibility is known to the USD team (reported in the release notes).

USD.NET will be upgraded to v0.8.2. At the same time, the env setting USD_WRITE_NEW_USDC_FILES_AS_VERSION should be set to "0.0.1" (if not set already) to increase compatibility with older versions of USD.

(reported by @daseyb)

Add support for quick USDZ export

Select any game object in the editor, then menu: USD > Export to USDZ

This should support Standard, HDRP and LWRP physically based materials, translating them to UsdPreviewSurface.

UsdzExport doesn't work in Build when using IL2CPP, causes Exception (FTV-248)

When scripting backend is set to Mono, I can export USDZ fine from a Windows Desktop build (haven't verified completeness yet, but I do get an USDZ file with geometry in it).

When the scripting backend is set to IL2CPP instead, calling ExportUsdz results in exceptions:

Registering plugins: D:/git/schreibkugel/development/Builds/usdzTest/WritingBall_Data/Plugins/share/
UnityEngine.Logger:LogFormat(LogType, String, Object[])
UnityEngine.Debug:LogFormat(String, Object[])
Unity.Formats.USD.InitUsd:Initialize()
Unity.Formats.USD.UsdzExporter:ExportUsdz(String, GameObject)
RuntimeExport:Update()
 
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 48)

NotSupportedException: To marshal a managed method, please add an attribute named 'MonoPInvokeCallback' to the method definition. The method we're attempting to marshal is: pxr.UsdCsPINVOKE+SWIGExceptionHelper::SetPendingApplicationException
  at pxr.UsdCsPINVOKE+SWIGExceptionHelper..cctor () [0x00000] in <00000000000000000000000000000000>:0 
  at pxr.UsdCsPINVOKE..cctor () [0x00000] in <00000000000000000000000000000000>:0 
  at pxr.PlugRegistry.GetInstance () [0x00000] in <00000000000000000000000000000000>:0 
  at Unity.Formats.USD.InitUsd.Initialize () [0x00000] in <00000000000000000000000000000000>:0 
  at Unity.Formats.USD.UsdzExporter.ExportUsdz (System.String usdzFilePath, UnityEngine.GameObject root) [0x00000] in <00000000000000000000000000000000>:0 
  at RuntimeExport.Update () [0x00000] in <00000000000000000000000000000000>:0 
Rethrow as TypeInitializationException: The type initializer for 'pxr.UsdCsPINVOKE.SWIGExceptionHelper' threw an exception.
  at pxr.UsdCsPINVOKE..cctor () [0x00000] in <00000000000000000000000000000000>:0 
  at pxr.PlugRegistry.GetInstance () [0x00000] in <00000000000000000000000000000000>:0 
  at Unity.Formats.USD.InitUsd.Initialize () [0x00000] in <00000000000000000000000000000000>:0 
  at Unity.Formats.USD.UsdzExporter.ExportUsdz (System.String usdzFilePath, UnityEngine.GameObject root) [0x00000] in <00000000000000000000000000000000>:0 
  at RuntimeExport.Update () [0x00000] in <00000000000000000000000000000000>:0 
Rethrow as TypeInitializationException: The type initializer for 'pxr.UsdCsPINVOKE' threw an exception.
  at pxr.PlugRegistry.GetInstance () [0x00000] in <00000000000000000000000000000000>:0 
  at Unity.Formats.USD.InitUsd.Initialize () [0x00000] in <00000000000000000000000000000000>:0 
  at Unity.Formats.USD.UsdzExporter.ExportUsdz (System.String usdzFilePath, UnityEngine.GameObject root) [0x00000] in <00000000000000000000000000000000>:0 
  at RuntimeExport.Update () [0x00000] in <00000000000000000000000000000000>:0 
UnityEngine.Logger:LogException(Exception, Object)
UnityEngine.Debug:LogException(Exception)
Unity.Formats.USD.InitUsd:Initialize()
Unity.Formats.USD.UsdzExporter:ExportUsdz(String, GameObject)
RuntimeExport:Update()
 
(Filename: currently not available on il2cpp Line: -1)

ApplicationException: Failed to create: C:\Users\felix\AppData\Local\Temp\zc0u9qvy.z7q\test.usdc
  at USD.NET.Scene.Create (System.String filePath) [0x00000] in <00000000000000000000000000000000>:0 
  at Unity.Formats.USD.UsdzExporter.ExportUsdz (System.String usdzFilePath, UnityEngine.GameObject root) [0x00000] in <00000000000000000000000000000000>:0 
  at RuntimeExport.Update () [0x00000] in <00000000000000000000000000000000>:0 

Prefab edits are reset on play (FTV-244)

Note: this bug only applies to prefabs, importing as a GameObject works as expected.

Repro:

  1. Import Kitchen USD as prefab
  2. Transform any object
  3. Run the project

On run, the chair will return to the original position, but it should be transformed.

IDisposable/using pattern for temporary time changes (FTV-211)

It's often necessary to change the authoring time temporarily while writing to a scene, typically because some data should be written to the default time, for example:

var originalTime = scene.Time;
scene.Time = null;
scene.Write(...);
scene.Time = originalTime;

However, if an exception is thrown, the time will not be restored. The "using" pattern would be much more robust:

using (TimeBlock time = new TimeBlock(scene, null)) {
  scene.Write(...);
}

Also see:
https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/using-statement

USDZ: Path of .usd file does not match textures in the archive (FTV-172)

All the texture paths inside the .usdc are wrong: the .usdc file is deeply nested inside the .usdz archive:

zipinfo Ship.usdz 
Archive:  Ship.usdz
Zip file size: 6325147 bytes, number of entries: 10
-rw----     0.0 fat  2299670 bx stor 19-Mar-29 15:09 var/folders/hp/tvmr6jkj1mjdqt8pbc75mzqc0000gn/T/r92fcki2.fkm/Ship.usdc
-rw----     0.0 fat   822375 bx stor 19-Mar-29 15:09 bottle_normal.jpg
-rw----     0.0 fat   373417 bx stor 19-Mar-29 15:09 cap_albedo.jpg
-rw----     0.0 fat   218357 bx stor 19-Mar-29 15:09 cap_normal.jpg
-rw----     0.0 fat   102534 bx stor 19-Mar-29 15:09 plaque_albedo.jpg
-rw----     0.0 fat    39391 bx stor 19-Mar-29 15:09 plaque_normal.jpg
-rw----     0.0 fat   924287 bx stor 19-Mar-29 15:09 sea.jpg
-rw----     0.0 fat   712797 bx stor 19-Mar-29 15:09 ship_albedo.jpg
-rw----     0.0 fat   234308 bx stor 19-Mar-29 15:09 support_albedo.jpg
-rw----     0.0 fat   596101 bx stor 19-Mar-29 15:09 support_normal.jpg

but textures are referenced like so:

def Shader "_MainTex"
{
  uniform token info:id = "UsdUVTexture"
  float4 inputs:bias = (0, 0, 0, 0)
  float4 inputs:fallback = (0, 0, 0, 1)
  asset inputs:file = @cap_albedo.jpg@
  float4 inputs:scale = (1, 1, 1, 1)
  float2 inputs:st = (0, 0)
  float2 inputs:st.connect = </full_scene/Materials/cap_albedo__7684/PreviewSurface/uvReader.outputs:result>
  token inputs:wrapS = "black"
  token inputs:wrapT = "black"
}

The issue is likely related to path normalization issues, that I believe were addressed in this commit:
PixarAnimationStudios/OpenUSD@7541eb8

In addition, rather than using our own USDZ archiver, we should use the utility function in UsdUtils referenced in the change above.

Finally, usdchecker should be used to validate USDZ files produced from Unity.

Bones do not match bindpose (FTV-228)

Importing a skinned mesh into Unity results in the error "Bones do not match bindpose." The same USD file (exported from Maya) correctly shows the bones and mesh in usdview (no errors). A simple test is attached here in USD ascii format: a cube skinned with two joints, one of which animates over 10 frames.

cube-two-joint-test_002.zip

UsdSkel export fails when rig root is the model root (FTV-198)

When the root of the rig is the model root, the model cannot be represented correctly in USD because the model root must be of type UsdSkelRoot and the rig root must be of type UsdSkelSkeleton.

To fix this, a scope could be introduced, though as simple as this sounds, from experience I've scene that it tends to cause surprising bugs and pipeline problems. Still, for users of USDZ just attempting to export a single model, this might not be a bad option.

At the very least, we should report the problem clearly, so the user understands why the rig does not animate correctly once exported.

Worse, the current export chooses UsdSkelSkeleton as the model root, which results in an invisible model because the purpose is also set to "guide" on the skeleton root, which makes it not renderable.

An asset has been posted by a user here:
https://forum.unity.com/threads/usd-for-unity-updates.646645/#post-4514533

Segfault accessing null prim/attribute

If the prim or attribute below do not exist, this should throw an exception, it should not segfault:

stage.GetPrimAtPath(primPath).GetAttribute(attrName).Get(0);

The current crash will take down the Unity Editor.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.