Simplygon Plugin Not Working with USD Package 3.0.0-exp.2

Hello,

I’ve been using Simplygon via the Unity plugin tool. I have two possibly related issues.

1:

Simplygon works in one Unity project, but not another. I get this error:

DllNotFoundException: UsdCs
pxr.UsdCsPINVOKE+SWIGExceptionHelper…cctor () (at Library/PackageCache/com.unity.formats.usd@3.0.0-exp.1/Dependencies/USD.NET/generated/UsdCs/UsdCsPINVOKE.cs:164)

I’ve checked to make sure both have the same settings. They use the same rendering pipeline, the same .NET target, etc. I’ve even made sure the installed dependencies are the same. I’m just not able to find the cause of the bug. Unfortunately, the bug is in the main project. I created a test one to compare.

2:

In the minimalist test project that the Simplygon plugin works in, upgrading the USD package to com.unity.formats.usd@3.0.0-exp.2 breaks the plugin. I get this error with no more info:

7806924--987012--upload_2022-1-13_13-3-28.png

Dropping back to com.unity.formats.usd@3.0.0-exp.1 fixes it.

Any insight would be greatly appreciated.

Hey @UrsaCory , some extra questions for you:

  • Which Unity version are you using?

  • Which operating system are you using?

  • In you case #1, does the DllNotFoundException error still appear if you remove/uninstall Simplygon from the project?

  • In your case #2, do you still get the error if you restart Unity after upgrading the USD package to 3.0.0-exp.2? (the Unity editor needs to be restarted after changing USD package version in order to properly reload certain libraries)

Thanks!

Thank you for the quick response.

  1. 2021.1.15f1
  2. Win 10
  3. That error appears as a result of starting a Simplygon reduction operation, so I can’t really say.
  4. 3.0.0-exp.2 and the Simplygon plugin don’t work together. The error is different from the DLL error, though. See https://simplygon.zendesk.com/hc/en-us/community/posts/4409593428497-Fail-to-process-LOD1-

I spotted this message in the Simplygon documentation:

I am not aware of any specific issues with USD 3.0.0-exp.2 and I couldn’t find any reported bugs in our database related to Simplygon. It sounds like this might be an issue on their side that isn’t supporting our latest USD changes. Unfortunately there isn’t much we can do to help on our end, my suggestion would be to reach out to the Simplygon support team for more details.


But that still doesn’t explain the DllNotFoundException you are getting USD 3.0.0-exp.1 on the main project. Just to validate if the issue is coming from the USD package, could you try importing a single USD file in that project and let me know if you are getting any errors? You can try the following:

  • Add USD package 3.0.0-exp.1 to your project (if not already installed)

  • Restart Unity editor (to be extra safe ;))

  • In the top Unity menu, go to USD -> Import as GameObjects and select a USD file to import (you can use the torus.usd that I attached in a zip to this message).

If all goes well, you should now be seeing a new torus object in the scene but let me know if it that’s not the case and also include any errors that might be logged.

7809813–987606–torus.zip (4.36 KB)

Thanks again for the quick response. Upgrades to the USD package translate directly into making my work smoother.

After following steps 1-3, importing torus.usd also triggers the error:

torus.usd unpredictably works in the new, minimal project I set up to track down the Simplygon/USD interaction issue.

my suggestion would be to reach out to the Simplygon support team for more details.

I’d left a comment on their support forum, but also just now created a ticket.

Relatedly, I tried to run Simplygon on the model from the minimal, working project. I got some duplicate-key errors. Some of the meshes in the FBX have the same name, so that might be it. (Pretty common in converted Revit files.) I created an issue with the console log at ArgumentException: An item with the same key has already been added. (USDU-243) · Issue #287 · Unity-Technologies/usd-unity-sdk · GitHub

I was never able to resolve the DllNotFoundException message in the original project. As a workaround, I created a whole new project. It was working for a week or so. Now I’m getting the DllNotFoundException in the new project. Currently, the only solution I have is to periodically recreate the whole project.

It’s not a Simpygon issue. Attempting to export the small torus.usd file from above also triggers this error:

Were you able to get a skinned USD into Unity? If so, can please provide some instructions?

  1. I exported a character from Maya 2022.3 as USD: skinned mesh and blendshapes turned on in the USD export.
  2. I imported the USD character into Unity 2020.3 LTS. I do not see a mesh for the character, but the bones seemed to be in Unity.

Hi Sean__R,

No. I’m initially able to load the simple torus.usd file, but twice the project has somehow gotten corrupted. In the end to get the job done I had to move all USD-based work out of Unity.

Same error = “Simplygon failed to load: DLLOrDependenciesNotFound Simplygon.dll not found”

Resolved => Just Restart the computer after installation…

Has anyone had success running Simplygon with a URP project?

Nothing seems to work correctly for me, and additionally WASD movement stops working in the scene view after attempting to optimize a gameobject.

It seems like that the USD package is built in x86_64, but the unity we use is an Apple Silicon version whose architecture is arm64, so some dynamic library load failed.

Yes I have my Simplygon working properly in URP project, however I cannot build the project as for some reason to build the project you require the DLL file to be included in the project.

Cross Check:

  1. Make sure you have the license for SimplyGon (Go to the file you installed SimplyGon to and there you’ll find the Get License application and just get the free version
  2. Make Sure that your System Variable Path to SimplyGon folder is set properly
  3. Download USD 3.0.0-exp.1
  4. Restart your System