Search Unity

  1. Unity 2018.3 is now released.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. We've updated our Terms of Service. Please read our blog post from Unity CTO and Co-Founder Joachim Ante here
    Dismiss Notice
  4. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    Dismiss Notice
  5. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice

An Update on Substance Format Support in Unity

Discussion in 'External Tools' started by ans_unity, Dec 19, 2017.

  1. wesm

    wesm

    Allegorithmic Community Manager

    Joined:
    Feb 24, 2014
    Posts:
    271
    We have been getting some reports of this issue. We have this fixed internally for our 2.2 update. However, we can't seem to repro this at all with the 2.1 builds. Can you please let me know more information about how you got this error?

    PC or Mac?
    Using IL2CPP?
    Which build platform (ios, android, pc)?
    Do you get the error right when the plugin is added to a project?

    When you say upgraded, did you have a project with Substance plugin and then open in the updated 2018.2.16f1 version? Or are you creating a new project with 16f and importing the substance plugin?

    Cheers,
    Wes
     
  2. jeffreymlynch

    jeffreymlynch

    Joined:
    Jun 27, 2017
    Posts:
    1
    I'm receiving the same error using 2018.2.16f1. I'm using IL2CPP as the scripting backend for a PC build. It happens when you first import Substance.

    ******UPDATE #1*****
    The Substance import seems to work when on the default settings for a new project (i.e. .Net 3.5 Equivalent Scripting Runtime, Mono Scripting Backend). I will try changing it to IL2CPP and see if that messes with it.

    ******UPDATE #2*****
    Okay, so IL2CPP worked just fine. I believe I've isolated the problem to the act of switching over to the .NET 4.x Equivalent Scripting Runtime. Apparently, Substance does appreciate the switch from 3.5, and lets you know that incessantly in the editor console :( Hope this helps you find a fix, since I really enjoy using the more modern C# syntax of 4.x However, I enjoy using Substance in Unity more, so I'll develop in 3.5 until a compatibility patch is released. :)
     
    Last edited: Nov 21, 2018
  3. radiantboy

    radiantboy

    Joined:
    Nov 21, 2012
    Posts:
    729
    Hi,

    I removed substance plugin from my project and it went away so for now I will keep it that way :)

    Answers:

    PC
    IL2CPP - Actually not sure if I am using that, how can I tell ?
    Build platform windows pc
    yes I got error as soon as I upgraded unity to .16f1, it wasnt happening before (I did not update substance plugin(!), maybe that was a stupid thing to do)
    The project is a long term project ive been working on for many years, so not fresh.

    I hope substance can regain some of its traction, seems like a lot of people are pissed with it these days :) But we still know it is AWESOME really. Thanks.
     
  4. wesm

    wesm

    Allegorithmic Community Manager

    Joined:
    Feb 24, 2014
    Posts:
    271

    This error is coming from an API rule change that Unity made, affecting 2018.2.15f and higher, where an API function call is not permitted to be called from a constructor. The error can appear when our C++ plugin (which contains Allegorithmic's rendering framework) is accessed for the 1st time. From the editor side: it happens when clicking on a Project Browser graph entry. From the script side: it happens the 1st time one of our script function is used.

    I can't seem to reproduce this error and not all users are getting the error, so the API function rule may not be consistently enforced on the Unity side at this time. However, we know this is an issue and have updated our plugin to adhere to the proper API rule denoted by Unity and this issue will be fully resolved in our 2.2 update. We wanted to get a hotfix out for this ASAP for our 2.1 plugin, however the API rule ended up having us do sizable rework, so we had to push this fix to our 2.2 update.

    With that said, I am trying to find out the circumstances where this error will arise. Please let me know what steps you took that produced the error. For example, did you start with a working project with substance plugin and just upgraded? Did you start with a new project and the error appeared right when you imported the plugin?

    We are very sorry for this issue. We know it's extremely frustrating for our users and it's really tough on us as well with these constant changes to the API that can happen between minimal point releases. At this time, we are advising users to stay on 2018.2.14f for the 2.1 plugin. With 2.2, we will be supporting all of 2018.2 and 2018.3.

    Cheers,
    Wes
     
  5. wesm

    wesm

    Allegorithmic Community Manager

    Joined:
    Feb 24, 2014
    Posts:
    271
    Thanks very much for the info.

    We definitely understand you guys are rightfully upset. We totally agree with you and we are working hard to get the plugin out of beta. In many ways, we are in the same boat as the constant API changes without warning are often causing us many issues with the plugin. We end up spending time playing catch up on patches then completing the features.

    Please rest assured, we love Unity and we love our users. As a Subtance/Unity user myself, I know that can sound like empty words when there are so many issues, but please know we are working hard to get everything with the plugin working great. We will get there : )

    Cheers,
    Wes
     
  6. wesm

    wesm

    Allegorithmic Community Manager

    Joined:
    Feb 24, 2014
    Posts:
    271
    Awesome! Thanks very much for info : ) This is extremely helpful. We do have this fixed internally with our 2.2 build and this fix will officially roll out for 2.2.

    Cheers,
    Wes
     
    jeffreymlynch likes this.
  7. wesm

    wesm

    Allegorithmic Community Manager

    Joined:
    Feb 24, 2014
    Posts:
    271
    Thanks to @jeffreymlynch, We can now confirm the error will happen with the Scripting Runtime Version is set to .NET 4x. You can safely use 2018.2.15f and higher with the scripting runtime version set to .NET 3.5 equivalent.

    We will have this fixed in the 2.2 update.

    Cheers,
    Wes
     
    jeffreymlynch likes this.
  8. Tenebris_Lab

    Tenebris_Lab

    Joined:
    May 23, 2017
    Posts:
    35
    I have a question,

    We have a scriptable object that has a list of materials. We compile this list of materials into an assetbundle. In the previous built in version of substance we were able to assign assetbundles directly to the materials within the sbar file.

    Like So...


    Code (CSharp):
    1. //Remove Bundle Tag From Pack
    2.             string path = AssetDatabase.GetAssetPath(pack);
    3.             AssetImporter assetImporter = AssetImporter.GetAtPath(path);
    4.             assetImporter.assetBundleName = "";
    5.             //Tag Each Material
    6.             foreach (Material asset in pack.materials)
    7.             {
    8.                 path = AssetDatabase.GetAssetPath(asset);
    9.                 assetImporter = AssetImporter.GetAtPath(path);
    10.                 assetImporter.assetBundleName = AssetBundleName;
    11.                 EditorUtility.SetDirty(asset);
    12.                 Debug.Log("Converted: " + asset.name);
    13.             }
    I have just done a major upgrade to 2018 including substance plugin. But now I am unable to set the assetbundle of the material assigned to the scriptable object using the above script.

    Any pointers?
     
  9. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    577
    Any ETA on that update? I have the same issue, I'm also on .Net 4.
     
  10. wesm

    wesm

    Allegorithmic Community Manager

    Joined:
    Feb 24, 2014
    Posts:
    271
    Hi,

    I don't have an ETA I can give just yet. I know that is frustrating. It will be in Dec, but I don't have the exact date just yet.

    Cheers,
    wes
     
    Rowlan likes this.
  11. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    577
    No problem, it's not frustrating at all. Information is everything. At least I know now it won't come this week and probably not next week and it pays off to work around this until the patch arrives. Thanks for the info, very much appreciated! :)
     
  12. wesm

    wesm

    Allegorithmic Community Manager

    Joined:
    Feb 24, 2014
    Posts:
    271
    Hi Everyone,

    We are going into beta now and will have 2.2 available in early January. We had planned to have it roll out in December, but we ran into errors with .NET4 and needed to make sure these issues were addressed before we released.

    Here is the changelist for the 2.2 update:

    Core Substance Plugin
    • Updated Substance Engine

    • Unity 2018.3 support

    • .NET 4.x support

    • Unity Pro skin GUI readability improvements

    • Fixed a bug where attempting to render Substances while changing parameters at runtime would only cause two to be able to rendered at a time

    • When importing a package that contains old Substance files, the plugin will now let the user know that it contains old Substance data and delete the package files when Unity is attempting to import them (this is so the user does not have to delete everything manually if it came in broken)

    • Added an 'About' button in the Substance menu to show Substance plugin related build information

    • Added mouse-over tooltips in the Substance GUI to show exposed Substance parameter names

    • Added Navigation buttons in the Substance GUI to link to Substance graph and materials

    • Added new icons for the Substance graph/material/textures in the Content Browser

    • Updated the Substance thumbnails in the content browser

    • Removed the .mat from the front of Substance material names

    • Added the ability to rename Substance graphs and materials

    • When changing Substance graph resolution, the apply/revert popup will no longer appear forcing the user to commit the change at that moment

    • Fixed a bug where the Reflection process would only use the default Substance resolution, instead of one defined by the user

    • Added a mouseover warning to the Substance GUI that informs the user if the color space is set to Gamma

    • Changed functionality of Substance graph instances: Users can now create graph instances in a Substance without being prompted for each created instance in the Substance graph GUI

    • Graph, and corresponding material, have the same object name.

    • Support material's output assignments.

    • Fixed sRGB handling (linear color space must be enabled).

    • Fixed "Standard (roughness setup) shader handling.
    Scripting
    • Added function to duplicate Substance graph instances through script: Duplicate()

    • Added function to query procedural input information via C#, returns an array of 'InputProperties' elements: GetInputProperties()

    • Added function to check if an input exists in a graph, returns true/false: HasInput(string inputName)

    • Added function to check if a visibleif input is visible, returns true/false: IsInputVisible(string inputName)

    • The rendering scheme has been re-designed. As such, RenderSubstancesAsync() has been deprecated, this has been changed to graphName.RenderAsync()

    • Hide functions not meant for script support.

    • Implemented Singleton

    • Re-designed rendering queue handling,

    • Re-designed transitions between editor & play modes,

    • Changed log mechanism

    • Improved loaded Substance memory management,

    Known Issues in 2.2.0
    Core Substance Plugin
    • User must disable 'Enable Bitcode' in the Build Settings menu in Xcode to build for iOS

    • Substance object previews in the Content Browser show up black when the build target is set to Android/iOS

    • The Alpha button and Mip Map preview slider are missing on the non-Substance texture GUI after importing the Substance plugin

    • The user has to use powers of two to define a Substance graph resolution through script

    • Substance materials are not persistent when exported/imported using a Unity package

    • Substances do not work with Asset Bundles

    • Substances are not restored back to their original state when going back from play to editor after changing them at runtime

    Scripting
    • Scripting does not work at runtime if the project is set to x86 in the build settings

    • Currently cannot use il2cpp scripting backend
     
    Crossway and optimise like this.
  13. wesm

    wesm

    Allegorithmic Community Manager

    Joined:
    Feb 24, 2014
    Posts:
    271
    Hi Everyone,

    We have released Substance in Unity 2.2 and it's live now on the Unity Asset Store. This update includes a ton of bug fixes and some new features detailed below in the release notes. We now have support for Unity 2018.3 as well as .NET4. Thank you for your patience. We know it took a long time to get this release out. We will be doing more frequent updates from here on out.

    Please be sure to check out our full documentation. https://support.allegorithmic.com/documentation/integrations/unity-2018-170459323.html

    Substance in Unity 2.2 change list
    Release Date: Jan 10, 2019

    Core Substance Plugin

    - Updated Substance Engine
    - Improved code stability
    - Unity 2018.3 support
    - .NET 4.x support
    - Substance Source support in 2018.3
    - Substance Source coloring issue has been fixed
    - The graph, and corresponding material, now have the same object name
    - Added Unity Pro skin GUI readability improvements
    - Added support for material's output assignments
    - Fixed a bug with sRGB handling
    - Fixed a bug where an user could could delete all instances of a graph
    - Fixed a bug where attempting to render Substances while changing parameters at runtime would only cause two to be able to rendered at a time
    - When importing a package that contains old Substance files, the plugin will now let the user know that it contains old Substance data and delete the package files when Unity is attempting to import them (this is so the user does not have to delete everything manually if it came in broken)(edited)
    - Added an 'About' button in the Substance menu to show Substance plugin related build information
    - Added mouse-over tooltips in the Substance GUI to show exposed Substance parameter names
    - Added Navigation buttons in the Substance GUI to link to Substance graph and materials
    - Added new icons for the Substance graph/material/textures in the Content Browser
    - Updated the Substance thumbnails in the content browser
    - Removed the .mat from the front of Substance material names
    - Added the ability to rename Substance graphs and materials
    - When changing Substance graph resolution, the apply/revert popup will no longer appear forcing the user to commit the change at that moment
    - Fixed a bug where the Reflection process would only use the default Substance resolution, instead of one defined by the user
    - Added a mouseover warning to the Substance GUI that informs the user if the color space is set to Gamma
    - Changed functionality of Substance graph instances: Users can now create graph instances in a Substance without being prompted for each created instance in the Substance graph GUI

    Scripting

    - We have hidden some functions not meant for script support
    - Added function to duplicate Substance graph instances through script: Duplicate()
    - Added function to query procedural input information via C#, returns an array of 'InputProperties' elements: GetInputProperties()
    - Added function to check if an input exists in a graph, returns true/false: HasInput(string inputName)
    - Added function to check if a visibleif input is visible, returns true/false: IsInputVisible(string inputName)
     
  14. XCPU

    XCPU

    Joined:
    Nov 5, 2017
    Posts:
    89
    Having trouble downloading the new 2.2, seem I always get the 2.1
    Importing from inside Unity also gives the Old version 2.1 too.
    Been updating other assets but this one is giving some troubles.
     
  15. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    577
    I just toyed around for a few hours with the new substance plugin version and unity 2018.3.1 and have to say: it's awesome. Great job guys :)
     
    wesm, transat and hopeful like this.
  16. Grimbly

    Grimbly

    Joined:
    Mar 29, 2014
    Posts:
    1
    After watching the "Substance in Unity 2018.1 Scripting" video on YouTube I was left with a few questions I was hoping might be answered. I tried asking them on the video but perhaps this is a more appropriate place for a quicker response/discussion for them.
    1. What happened to the link for the "substance_api.zip" shown around 6:39 in the video? Is there a new location for a complete API reference for the plugin?
    2. What are Substance.Engine.dll and substance_sse2_blend.dll used for if you only need to reference Substance.Game.dll to modify the .sbsar?
    3. Do you always have to modify the materials through a .sgo or can you just modify the .sbsar directly? Are there limitations to modifying it directly vs using the .sgo?
    4. Could something like this animated lava (https://share.allegorithmic.com/libraries/629) be achieved through the scripting API and played out in realtime if it were on a small texture around 200px x 200px?
    5. When using this plugin what would be packaged and actually need to ship with the game?

    That's all for now I think :)
     
  17. Crossway

    Crossway

    Joined:
    May 24, 2016
    Posts:
    358
    I can't upgrade my project to Unity 2018.3.1 because it stuck on .sbsar import everytime! I'm using last version.
     
  18. wesm

    wesm

    Allegorithmic Community Manager

    Joined:
    Feb 24, 2014
    Posts:
    271
    Can you contact me at wes.mcdermott@allegorithmic.com and send me your sbs file? Are you using any custom outputs in the sbsar?

    Cheers,
    wes
     
    Crossway likes this.
  19. wesm

    wesm

    Allegorithmic Community Manager

    Joined:
    Feb 24, 2014
    Posts:
    271
    Hi,

    Sorry for the late response on this.

    1. We removed the zip file at it was getting really out of date. You can see all of the latest info on scripting here.
    https://support.allegorithmic.com/documentation/display/integrations/Scripting+in+Unity

    2. The Engine and sse2( CPU engine) our used for the Substance Engine. The engine is what computes the textures from the graph. The Game.dll is the scripting API.

    3. The SGO is a graph in the sbsar file. When you are scripting, you are modifying the parameters of the SGO.

    4. You can animate textures through the API. However, it will be very expensive per frame since a texture is being generated. Animation is best done in the shader. You could use the substance to generate the textures that are then animated by the sahder.

    5. The substance engine and assemblies are shipped, but only if you are referencing the SubstanceGraph's within scripts/monobehaviors. If you are not using any of the Substance.Game API in script, then only textures are shipped and the substance dlls are removed.

    Cheers,
    Wes
     
  20. Crossway

    Crossway

    Joined:
    May 24, 2016
    Posts:
    358
    I send an email to you.Thanks.
     
  21. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    355
    Hi @wesm, HDRP Live Link still not available yet?
     
  22. wesm

    wesm

    Allegorithmic Community Manager

    Joined:
    Feb 24, 2014
    Posts:
    271
    We don't have official support for HDRP yet. We will definitely support this, but our focus is on the core plugin for now. We are working to make sure the core plugin is out of beta and fully production ready. We will then be adding new features such as HDRP.

    Cheers,
    Wes
     
    optimise likes this.
  23. wesm

    wesm

    Allegorithmic Community Manager

    Joined:
    Feb 24, 2014
    Posts:
    271
    Hey everyone,

    I'm sure you will soon or have already hear the news that Allegorithmic is joining Adobe. Today, we officially announced that we’ve joined Adobe and you can read about it here:

    https://www.allegorithmic.com/blog/allegorithmic-joining-adobe-family

    This is a tremendous opportunity for the Substance toolset. We are all very excited about the new journey ahead. If you have any questions, please let us know or feel free to message me directly.

    https://theblog.adobe.com/adobe-acquires-allegorithmic-substance-3d-gaming/

    Cheers,
    wes
     
    optimise likes this.
  24. f1chris

    f1chris

    Joined:
    Sep 21, 2013
    Posts:
    224
    I'm sure it's a good day for stock holders but a sad day for all developers. We've seen what Adobe did with Mixamo by example.
     
    JamesArndt likes this.
  25. wesm

    wesm

    Allegorithmic Community Manager

    Joined:
    Feb 24, 2014
    Posts:
    271
    The plan is to heavily accelerate the development of the Substance tools. Here is an excerpt from Sebastien Deguy (founder of Allegorithmic) post, which can be found here: https://medium.com/@sebastien.deguy...en-deguy-my-peter-jackson-moment-7dd64ba1d1f1

    In order to do this, Adobe is building an expanded team to focus on the incredible opportunities in 3D and immersive design, and is offering me to become Vice President, 3D & Immersive, reporting to author / entrepreneur / investor / executive Scott Belsky⁴, Chief Product Officer and Executive Vice President, Creative Cloud at Adobe.

    Seb is not going anywhere and all of the very same teams are still behind the Substance products.

    Cheers,
    Wes
     
  26. f1chris

    f1chris

    Joined:
    Sep 21, 2013
    Posts:
    224
    I have no doubt Allegorithmic team will continue to be dedicated and create great and innovative products like you did already. I'm just not confident how Adobe integrates companies on the long term. Futur will tell !

    Cheers
     
  27. wesm

    wesm

    Allegorithmic Community Manager

    Joined:
    Feb 24, 2014
    Posts:
    271
    Totally understand : ) Please let me know if you have any questions. We are all very happy and excited at Allego. Adobe has been working and investing in us for a few years now.

    Cheers,
    Wes
     
  28. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    355
    I see. Btw can u make sure the plugin is working when Unity 2019.1 enters beta 1 phase to make sure the plugin not support Unity 2018.3 disaster not happen again?
     
  29. wesm

    wesm

    Allegorithmic Community Manager

    Joined:
    Feb 24, 2014
    Posts:
    271
    Yes! We are actively discussing this. We definitely don't want to repeat 2018.3 again as well as not having a plugin during the entire 2018 beta.

    Cheers,
    Wes
     
    Lars-Steenhoff likes this.