Skip to main content
Community Manager
March 10, 2022

Newly revamped Substance 3D plugin for Unity

  • March 10, 2022
  • 25 replies
  • 15154 views

Hi everyone!

We are excited to announce that we've released a soft launch of the newly revamped Substance 3D plugin for Unity. The plugin lets users load, apply, and tweak Substance 3D parametric materials directly in Unity.

If you're interested in testing out the plugin, you can download it directly from the Unity asset store: Substance 3D in Unity.

Stay tuned for the official release.

If you have questions or comments, please reach out to us here. Thanks!

    25 replies

    Participating Frequently
    August 30, 2022

     

    Please give us an option to disable this automatic updating.

    It makes development impossible once you have more than 20 or so sbars in your project since you have to stop and wait anytime you do anything. Changed a line in your code? Wait 30 seconds. Want to enter play mode to test it? That takes another 30 seconds. Want to open a different scene? That's another 30 seconds even though I have changed nothing related to substance in any of these cases. I would also like to mention I'm running a 5950X with 32GB and an enterprise SSD, so if it's that bad for me I can't even imagine what kind of nightmare it must be on lower end hardware.

    I had to resort to isolate the plugin in a separate project that I only dare to open when I have to modify graph settings and then manually copy the generated materials and textures over to my main project. It's very painful but at least I don't lose around 3 hours each day just waiting for these pointless updates.

    I wish I could just go back to the old plugin but that has become so broken in modern Unity versions that it's incapable of putting the roughness texture into the alpha channel of albedo or metal in the builtin RP which means I would have to manually fix that in photoshop for every single material which would be even more painful.

    Please stop making developers choose between broken deprecated and broken preview versions of your products. I know that's the example Unity is setting but I just can't take it anymore.

    Community Manager
    September 19, 2022

    Hi, thank you for your feedback. We'll investigate this further.

     

    Participant
    August 25, 2022

    I'm trying out this plugin right now. It seems like some settings are not imported correctly I have downloaded the SBSAR file of Earthenware Wall Tiles from the Substance library. Even though I can adjust all sliders and such, the height doesn't seem to work properly. The tile height variation doesn't do a thing in Unity 2021.3.8f1 HDRP version. I'm using DirectX with shader HDRP/Lit.
    As you can see in the file with library there is a real variation in the tile heights, etc. As you can see in the material preview in Unity, there is NO variation whatsoever and in the editor there is a VERY SLIGHT variation, hardly noticeable.

    This is with the graph settings exactly as they are in the library webplayer.

    Oh, and I have this error:
    Assertion failed on expression: 'i->previewArtifactID == found->second.previewArtifactID'
    UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

    Inspiring
    August 26, 2022

    Thanks for reporting this issue. We'll investigate this further. 

    Participating Frequently
    August 25, 2022

    Got another major bug, trying to import any preset file in a graph will fail and cause an infinite spam of these two error messages:

    ArgumentException: Value does not fall within the expected range.
    Adobe.Substance.SubstanceNativeHandler..ctor (System.String filePath) (at Assets/Adobe/Substance3DForUnity/Runtime/Scripts/SubstanceNativeHandler.cs:51)
    Adobe.Substance.Engine.OpenFile (System.String path) (at Assets/Adobe/Substance3DForUnity/Runtime/Scripts/Engine.cs:103)
    Adobe.SubstanceEditor.SubstanceEditorEngine.InitializeInstance (Adobe.Substance.SubstanceGraphSO substanceInstance, System.String instancePath) (at Assets/Adobe/Substance3DForUnity/Editor/Scripts/SubstanceEditorEngine.cs:338)
    Adobe.SubstanceEditor.SubstanceEditorEngine.LoadAllSbsarFiles () (at Assets/Adobe/Substance3DForUnity/Editor/Scripts/SubstanceEditorEngine.cs:521)
    Adobe.SubstanceEditor.SubstanceEditorEngine.Update () (at Assets/Adobe/Substance3DForUnity/Editor/Scripts/SubstanceEditorEngine.cs:118)
    UnityEditor.EditorApplication.Internal_CallUpdateFunctions () (at <5f40cdb07bd44d76a23dad985a4ec283>:0)
    
    Unable to instantiate substance material with null assetPath.
    UnityEngine.Debug:LogError (object)
    Adobe.SubstanceEditor.SubstanceEditorEngine:InitializeInstance (Adobe.Substance.SubstanceGraphSO,string) (at Assets/Adobe/Substance3DForUnity/Editor/Scripts/SubstanceEditorEngine.cs:334)
    Adobe.SubstanceEditor.SubstanceEditorEngine:LoadAllSbsarFiles () (at Assets/Adobe/Substance3DForUnity/Editor/Scripts/SubstanceEditorEngine.cs:521)
    Adobe.SubstanceEditor.SubstanceEditorEngine:Update () (at Assets/Adobe/Substance3DForUnity/Editor/Scripts/SubstanceEditorEngine.cs:118)
    UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()

     Reproducible in 2021.3.8f1 / Windows 10.

    Inspiring
    August 26, 2022

    Hi, We are currently working on a fix for this issue. A new update will be available soon on the Unity asset store. Thanks for your patience.

    Participating Frequently
    August 11, 2022

    Hi,

    I'm really liking the new plugin this far, but a good portion of the sbars that worked fine with the old Allegorithmic plugin are no longer usable and produce this error instead:

    ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
    Parameter name: index
    System.Collections.Generic.List`1[T].get_Item (System.Int32 index) (at <c2a97e0383e8404c9fc0ae19d58f57f1>:0)
    Adobe.SubstanceEditor.Importer.SubstanceImporterEditor.OnPreviewSettings () (at Assets/Adobe/Substance3DForUnity/Editor/Scripts/Importer/SubstanceImporterEditor.cs:393)
    UnityEditor.PropertyEditor.DrawPreviewAndLabels () (at <5f40cdb07bd44d76a23dad985a4ec283>:0)
    UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <e262c2d839014c8090373617ef295bab>:0)
    UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)

    Here is one of those affected sbars as an example: https://ambientcg.com/view?id=PaintedMetalSubstance001

    Tested under 2021.3.8f1 on Windows 10.

    Inspiring
    August 11, 2022

    Hi, 

    Thanks for reporting this. We are aware of this issue and are currently taking action on providing a fix for it. Please expect an update from us soon. 

    Participant
    August 3, 2022

    Good day,

     

    Are there plans to make it comptible with WebGL? 

     

    Thanks!

    Community Manager
    August 9, 2022

    Good day to you too! Not at the moment. But could you please share your use cases? (This would help us to investigate this topic further.)

     

    Thanks

    Participant
    July 13, 2022

    When importing my own .sbsar materials into Unity 2021.3.5f1, the following error gets thrown:

    Asset import failed, "Assets/Resources/material.sbsar" > ExecutionEngineException: String conversion error: Illegal byte sequence encounted in the input.
    Adobe.Substance.SubstanceNativeHandler.CreateOutputCopy (System.Int32 graphID, System.Int32 outputID) (at Assets/Adobe/Substance3DForUnity/Runtime/Scripts/SubstanceNativeHandler.cs:221)

    The material is not imported and an empty folder is generated.
    However, this bug is not present for assets downloaded from Substance 3D Assets (adobe.com) Are there any special export settings that I am missing so that my materials can be correctly imported by Unity?

    Participant
    July 13, 2022

    Attaching a sample material which cannot be imported.

    Community Manager
    July 19, 2022

    Hi, There could be various reasons why you might be running into this issue as this is a custom Substance asset. Thanks for sharing your asset here, this would help investigate on our end. 

    Participant
    June 13, 2022

    "Fail to update substance output: target Unity texture is not RGBA32" when importing a Sampler .sbsar file

    Community Manager
    June 14, 2022

    Thanks for reporting this issue. We're currently investigating this. 

    Participating Frequently
    June 3, 2022

    With the latest 0.0.100 update on Unity 2021.3 I'm able to import an sbsar, but after the editor reloads I see an error message relating to each output texture, and the material just looks metallic:

    Fail to update substance output: target Unity texture is not RGBA32.
    UnityEngine.Debug:LogError (object)
    Adobe.Substance.SubstanceGraphSO:UpdateOutputTextures (intptr) (at Assets/Adobe/Substance3DForUnity/Runtime/Scripts/Unity Objects/SubstanceGraphSO.cs:247)

     

    Also another snag that I'm hitting is that Substance graphs don't have assigned output textures after performing an AssetDatabase.Refresh(). I'm trying to have an automated script in Unity import an .sbsar and then iterate the texture outputs in order to bake the textures into a static Unity texture, but I end up getting an error where SubstanceGraphSO.Output is null. The solution for me currently is to do a refresh, manually intervene to wait for the substance to catch up with the renders, then continue the automation script. `MaterialUtils.AssignOutputTexturesToMaterial(graph)` doesn't seem to get it done for me, and I've been rooting around the API trying to figure out what I can do here, but any promising leads seem to either use interop pointers or are internalized classes.

    That was really just a long-winded way of asking if there are any current or planned APIs available to emulate the old APIs `mySubstance.RenderSync()`?

    Participant
    May 26, 2022
    Participant
    May 26, 2022
    quote

    Hi everyone!

    We are excited to announce that we've released a soft launch of the newly revamped Substance 3D plugin for Unity. The plugin lets users load, apply, and tweak Substance 3D parametric materials directly in Unity.

    If you're interested in testing out the plugin, you can download it directly from the Unity asset store: Substance 3D in Unity.

    Stay tuned for the official release.

    If you have questions or comments, please reach out to us here. Thanks!


    By @Shwetha23063442qtvs
    quote

    Hi everyone!

    We are excited to announce that we've released a soft launch of the newly revamped Substance 3D plugin for Unity. The plugin lets users load, apply, and tweak Substance 3D parametric materials directly in Unity.

    If you're interested in testing out the plugin, you can download it directly from the Unity asset store: Substance 3D in Unity.

    Stay tuned for the official release.

    If you have questions or comments, please reach out to us here. Thanks!


    By @Shwetha23063442qtvs

    https://diepreye.lightning.force.com/lightning/o/Account/home

    Shared from the Salesforce mobile app