Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

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

Discussion in 'Asset Importing & Exporting' started by UrsaCory, Jan 13, 2022.

  1. UrsaCory

    UrsaCory

    Joined:
    Aug 25, 2020
    Posts:
    5
    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:

    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.
     
  2. cguertin

    cguertin

    Unity Technologies

    Joined:
    Aug 20, 2019
    Posts:
    83
    Hey @UrsaCory, some extra questions for you:
    1. Which Unity version are you using?
    2. Which operating system are you using?
    3. In you case #1, does the DllNotFoundException error still appear if you remove/uninstall Simplygon from the project?
    4. 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!
     
  3. UrsaCory

    UrsaCory

    Joined:
    Aug 25, 2020
    Posts:
    5
  4. cguertin

    cguertin

    Unity Technologies

    Joined:
    Aug 20, 2019
    Posts:
    83
    I spotted this message in the Simplygon documentation:
    upload_2022-1-14_10-49-18.png

    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:
    1. Add USD package 3.0.0-exp.1 to your project (if not already installed)
    2. Restart Unity editor (to be extra safe ;))
    3. 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.
     

    Attached Files:

  5. UrsaCory

    UrsaCory

    Joined:
    Aug 25, 2020
    Posts:
    5
    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:

    upload_2022-1-14_12-34-56.png

    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 https://github.com/Unity-Technologies/usd-unity-sdk/issues/287
     
  6. UrsaCory

    UrsaCory

    Joined:
    Aug 25, 2020
    Posts:
    5
    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:

    upload_2022-1-31_12-22-8.png
     

    Attached Files:

  7. Sean__R

    Sean__R

    Joined:
    Oct 1, 2014
    Posts:
    106
    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.
     
  8. UrsaCory

    UrsaCory

    Joined:
    Aug 25, 2020
    Posts:
    5
    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.
     
  9. KingKadriK

    KingKadriK

    Joined:
    Jul 1, 2015
    Posts:
    15
    Same error = "Simplygon failed to load: DLLOrDependenciesNotFound Simplygon.dll not found"

    Resolved => Just Restart the computer after installation....
     
    Last edited: Dec 22, 2022
  10. marcospgp

    marcospgp

    Joined:
    Jun 11, 2018
    Posts:
    194
    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.
     
  11. Onee_

    Onee_

    Joined:
    Nov 27, 2022
    Posts:
    1
    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.
     
  12. Captain_ZedaXross

    Captain_ZedaXross

    Joined:
    Apr 1, 2023
    Posts:
    11
    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