A Unity ID allows you to buy and/or subscribe to Unity products and services, shop in the Asset Store and participate
in the Unity community.
Introducing the new Universal Render Pipeline and High Definition Render Pipeline subforums!
Unity 2019.3 Beta is out now.
Discussion in 'External Tools' started by ans_unity, Dec 19, 2017.
I understand. Thanks for the explanation.
So, in one week since upgrading from 2017, this plugin is very unstable and we are experiencing regular editor crashes as a result of substance. This is with a mere five materials from substance source used in the project. We have now exported TGAs and removed them.
Selecting substances in the editor window regularly crashes the project.
Returning from Playmode regularly hangs Unity for extended periods of time. Restarting Unity if the hang is unusually long (>1min, which should be more than enough for 5 1k-sq substances, which shouldn't be re-baked anyway) to say "A default asset was created for foo.sbsar because the importer crashed on it last time."
Viewing thumbnails of substance assets in the project browser regularly returns black, although they render correctly in the preview window.
On-device behaviour is fine, but if you want runtime baking there doesn't actually seem to be any anymore.
I'd caution anyone updating to 2018 that substance is unstable enough that you probably want to export TGAs from Substances outside of Unity.
When I go into play mode my Substances disappear, and I get these:
AssetImporter is referencing an asset from the previous import. This should not happen.
UnityEngine.Object.get_name () (at C:/buildslave/unity/build/Runtime/Export/UnityEngineObject.bindings.cs:198)
Substance.Editor.SubstanceImporter+<>c__DisplayClass61_1.<OnImportAsset>b__1 (UnityEngine.Texture2D item)
System.Collections.Generic.List`1[UnityEngine.Texture2D].GetIndex (Int32 startIndex, Int32 count, System.Predicate`1 match) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections.Generic/List.cs:313)
System.Collections.Generic.List`1[UnityEngine.Texture2D].Find (System.Predicate`1 match) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections.Generic/List.cs:216)
Substance.Editor.SubstanceImporter+<>c__DisplayClass61_0.<OnImportAsset>b__0 (UInt32 pOutputHash, Int32 pFormat, Int32 pChannelsOrder, Int32 pWidth, Int32 pHeight, Int32 pMipCount, IntPtr pPixels, Int32 pPixelLength)
Substance.Editor.SubstanceImporter.OnImportAsset (UnityEditor.Experimental.AssetImporters.AssetImportContext ctx)
UnityEditor.Experimental.AssetImporters.ScriptedImporter.GenerateAssetData (UnityEditor.Experimental.AssetImporters.AssetImportContext ctx) (at C:/buildslave/unity/build/Modules/AssetPipelineEditor/Public/ScriptedImporter.cs:20)
I have to re-import every time after testing play mode. Very strange.
I'm very sorry for these issues you are experiencing. We are working on a new 2.3 release which is going to be released end of March. This 2.3 build drastically improves the update of substances. We have also sped up the time to come out of play mode for Substances. If you are interested in testing this build, please let me know. We are currently in private beta with 2.3.
Would you be able to contact us with a project file? I talked to our dev team and it would be great if we could take a look at the project. You can contact me at firstname.lastname@example.org.
Thanks Wes. We'll wait for the official release.
A significant problem seems to be that when iterating with your editor platform set to iOS, re-compressing PVRTC textures takes a long time. Working on a copy of the project with editor platform set to Windows or Mac makes the process much more efficient and the plugin feels better.
I'm not 100% sure, but I think that previously the Unity Editor was not PVRTC-ing generated textures for every substance tweak (including those cases where substance seems to think something has changed when exiting playmode, not sure if this is because we didn't instantiate a material and runtime code made a tiny change to it, thus making the asset dirty.)
Anyway, the take-away is that currently the plugin is far more stable if not using ios as your editor platform. You can turn compression OFF on the substance properties when iterating, but then our build won't fit on device until you turn it back on.
Can you confirm that this behaviour is different from previously (e.g. that previously textures were baked to PVRTC as part of the ios build process?) We would happily have the editor not identically match ios runtime (e.g. it doesn't show PVRTC compression artefacts, which when working with 1k/2k-square maps are rarely an issue) in exchange for stable iteration in editor whilst still using the iOS target platform.
Thanks very much for this feedback. I talked to our dev team about this and we have some ideas on ways to improve this. I have logged this feedback as a user story for us to address.
Sorry, I should have posted. After restarting my system (after a Windows update), the problems with Substance were solved and they now work correctly - no errors, no disappearances. I doubt it was actually related to the OS needing an update, but stranger things have happened I suppose.
Anyway, all good over here
I have not had time to read the entire thread. But I was looking for a way to proceedurally generate a material. And if I understood this right, the old 2017 version allowed this. Whereas the new Substance Plugin, while "live" in the editor applies the changes to the maps. Maybe I don't have this 100% correct.
But what I want is a "true" procedural texture that remains live and that I can map to other co-ordinates than a fixed UV space as you would with a 2D image map. For example projected out from object space or even world space. So it could be a tile image even that is generated on the fly to map itself to other spaces than UV.
I know we can do this in Substance Painter, for example. But the result of that gets baked down to an image and exported in this state.
I am curious if, in game play, it is possible to map procedural (mathematical node network) to the surface of geometry. So that when, for example, the mesh is stretched, the procedural texture does not reflect in stretching the image due to being locked to a UV space.
There is a very specific use case I have within the medical simulation field.
I've installed the plugin into 2017.4 and still get this error?:
Assets/T4M/Editor/T4MSC.cs(227,2): warning CS0618: `UnityEngine.ProceduralMaterial' is obsolete: `Built-in support for Substance Designer materials has been deprecated and will be removed in Unity 2018.1. To continue using Substance Designer materials in Unity 2018.1, you will need to install Allegorithmic's external importer from the Asset Store.'
How do I get rid of these warnings?
For 2017.4, you don't need to install the plugin. The Substance plugin was natively integrated in Unity 2017. It was removed from the engine in Unity 2018.
@wesm - Any update on this plugin getting out of beta? Back in February it was thought that it might be ready in April.
Yes! I wanted to post more info earlier but needed to wait to make sure the schedule was going to be correct. We had a delay when we found a crash for our 2.3 update. We seeded the latest build to our beta. We are looking at delivering 2.3.2 very soon to the asset store. This build addresses major issues we've had with upgrading projects as well as other bug fixes and overall improvements.
If you are interested in joining our beta, please let me know and I can give you or anyone who is interested access. Please join our Allegorithmic Discord and send me a PM with your username.
We are also already been working on our 2.4 release as well so the next major update will not be delayed. This update will have several features I will be able to discuss soon. However, our big feature support will be HDRP.
@wesm - Great news! Thanks! I had the feeling something was on the way.
There's a Procedural Planets kit that I've been interested in for quite a while, but it uses Substance in a more advanced way, and it hasn't worked with past versions of the Substance plugin.
Any idea if it will work with this upcoming version?
As the new external substance plugin doesn't really work that nicely (sometimes destroys prefabs, nullrefs etc), i wanted to suggest/request making it an 'official' plugin again by offering it through the package manager, developed in collaboration with unity. The previous integration worked so well, it is needed/much wanted to have it work like that again.
I have an issue in 2.3.0 that I did not have in 2.2.0. The "Generate All Outputs" textures now appear to be upside down.
Scratch that, it looks like they have always been upside down, or at least during 2.2.0 too. I just never noticed because I was using rather noisy textures before. This explains some things.
Thanks for letting us know this issue. I can confirm this as well. We will get this fixed ASAP.
Just wanted to check to see if anyone is having issues with prefabs when updating the plugin. We are getting some reports of prefabs or scenes breaking but it seems to happen on complex projects. If anyone is experiencing this and would like to participate in our private beta, please let me know.
I've been having no update problems since the introduction of 2.2.0. I did have update problems before 2.2.0, but I reported these two or three pages back and they were fixed. Perhaps they are updating from before 2.2.0? My projects however are not very complex. I do get a "material property something something < 2.3.0" warning, but nothing seems out of the ordinary.
I'll be working with Unity quite a bit for the coming months, so maybe I can help out in the private beta. They are generally low complexity projects though. I do use custom shaders a lot.
We would greatly appreciate your help in our beta. Can you join our discord group?
https://discordapp.com/invite/010JCPblJTh3d6CXe. You can then send me a message. My id is Wes McDermott and I will add you to the group.
So, I wondered if i should give Substance a try in Unity 2019.1.2f1. Installed the plugin (backup before) and..fluff.. first there was some websocket error for substance. After reloading Unity, out of nowhere Textmeshpro stopped working and the package manager vanished. I am seriously not sure what your coders are doing. Anyways, I would love to use substance for our project. I've seen that Ubisoft is having an Substance > PSD > Engine workflow. Are there any more informations out in the wild regarding this workflow?
Okey little update: Seems like Substance Plugin is working fine on an entirely new project. Going to test what happens if I add my old project into it now.
Please let us know what happens. Also, we can add you to our private plugin beta. We are needing feedback with users who have complex projects so we can find issues with prefabs or conflicts with other packages.
Of course, I already joined the Discord for Substance. Happy to help, up to you where the feedback should happen best.
Awesome! Thank you very much. I have added you to the Unity beta group on discord.
Currently trying out some stuff in the 2019 Alpha with HDRP. The following happens.
Black material after Play Mode:
1) Import a new substance into Unity or modify an existing one
2) Enter Play Mode
3) Exit Play Mode
After leaving play mode in the editor, the material that uses substance textures turns completely black until you modify the substance again or select one of its output textures in the Project folder to make it regenerate its outputs.
This does not happen when (after starting up Unity) no changes are made to already existing substances. In that case exiting Play Mode has no negative effect.
Substance in Unity 2.3.2
Also when starting up the project this error appears although the plugin is installed:
Assets/Substances/Blockout_Tiles_01.sbsar: Built-in support for Substance Designer materials has been removed from Unity. To continue using Substance Designer materials, you will need to install Allegorithmic's external importer from the Asset Store.
Thanks for posting this issue. I have filed this as a ticket and our team is looking into this now.
Yet another error.
I created a second sbsar with 3 graphs in it. Two graphs were meant to be used as actual textures. The third was just a generator to create rocks and hide the complexity of their generation nodes.
After importing this substance into Unity 2019.3.0a4 the editor complained about that generator graph being used in multiple places and not being able to guarantee its uniqueness - whatever that means. The complete error message is lost - I'm trying to remember here what happened yesterday.
After fiddling around with that graph and entering and exiting play mode I noticed that my older terrain material did not link to the textures of my first imported sbsar anymore.
And to top that my second imported sbsar (with the 3 subgraphs) was now in an unreadable state in the editor - Unity had no clue how to interpret that asset. I closed Unity. I restarted Unity. Instant crash. Unity closed.
After deleting the second sbsar and its meta file from the project via Windows Explorer I restarted Unity successfully.
So in a nutshell: the plugin is quite unstable in this Alpha version of Unity and seems to require a specific setup of the sbsar - otherwise asset import problems occur, delinking of textures occurs... and maybe worse stuff.
A question regarding terrain and normal maps of imported substances:
The HDRP terrain material asserts that the normal map is not in the correct format and must be of import type "normal map". Isn't the plugin supposed to be doing that already? Can I do this myself somewhere?
Edit: btw. thanks for watching/monitoring this thread, Wes
Thanks for posting these issues. Can you please post the exact errors you are getting in the Unity console window? In order to address this we would need the sbs file. Would you be able to share that with me?
Also, I can add you to our Unity private beta if you are interested. Please let me know.
In this case, you can still use the normal map. We are not using the Unity dxtnm compression. We have spoken to Unity about this and I think we will be able to offer this compression mode in a user preference. Our normal map is compressed using BC5 which is higher quality, but Unity doesn't recognize it by default.
I have upgrade my Unity to ver. 2018.4.2f1 and needed Allegorithmic plugin, but after I import the plugin I get this error:
Assets\Allegorithmic\Plugins\Substance\Livelink\Editor\Scripts\MeshLinkEditor.cs(21,33): error CS0433: The type 'WebSocket' exists in both 'SmartFox2X, Version=184.108.40.206, Culture=neutral, PublicKeyToken=null' and 'websocket-sharp, Version=220.127.116.11661, Culture=neutral, PublicKeyToken=5660b08a1845a91e'
How can I go round with this?
I have now update my SmartFox2X.dll but with same results:
Assets\Allegorithmic\Plugins\Substance\Livelink\Editor\Scripts\MeshLinkEditor.cs(21,33): error CS0433: The type 'WebSocket' exists in both 'SmartFox2X, Version=18.104.22.168, Culture=neutral, PublicKeyToken=null' and 'websocket-sharp, Version=22.214.171.124661, Culture=neutral, PublicKeyToken=5660b08a1845a91e'
This is a known issue. We have a ticket for this. It has to do with the livelink functionality which we will be removing as there is a new solution coming. Does this affect anything in your project? Can you continue to use the plugin?
Thanks for your quick answer!
So good that it is a solution going on with the problem I have.
Will it be fixed until the next update?
I am developing and building my world right now and so far I have no use of SmartFox2X.dll so I have temporarily removed the plugin so unity works flawlessly, otherwise with SmartFox2X.dll it is not possible to play thanks to red error mark I get.
No problem at all
We are working on updates to complete rework Live Link. The solution we have now is not good and very basic. I can't give an ETA yet, but this will be resolved in the future and we will have a better solution for live link in general.
Thank you for your time and answer!
Is the Substance Plugin safe to use in a new 2019.2 LWRP project?
You can use the plugin with LWRP. We don't have an automatic setup for this with materials but the substance generated outputs work without issue. Please see this section of the docs. https://docs.substance3d.com/pages/...orkingwithHDRP/LWRP-LightweightRenderPipelines
We have updated the Unity plugin on the asset store to version 2.3.4. Please see the release notes here.
Using the plugin with Unity 2019.2 will produce the following error:
InspectorSubstanceImporter.OnInspectorGUI must call ApplyRevertGUI to avoid unexpected behavior.
This error can be cleared and will not affect the functionality of the plugin
Substance Materials breaking
Substance materials that contain a custom output with a blank usage will break on import. Also, Substance materials containing duplicate usages will break.
Older sbsar files from GameTextures.com are not currently compatible with the Substance in Unity plugin. These materials which contain unsupported Usage outputs are breaking. Before using the plugin, be sure to make a backup of your project.
Thanks for the update.
Any update on when il2cpp scripting will work on android?
I'm so sorry Wes, I picked up some work pretty soon after that and completely forgot about this. Unfortunately I'm not expecting to use Unity again very soon, currently up to my armpits in web tech.
Hi, all sbsar materials are pink and I get this error
Assembly 'Assets/Allegorithmic/Plugins/Substance/Substance Engine/Editor/Substance.Editor.dll' will not be loaded due to errors:
Unable to resolve reference 'Substance.Reflection'. Is the assembly missing or incompatible with the current platform?
Reference validation can be disabled in the Plugin Inspector.
I'm running Unity 2019.1.9 on Windows.
Good morning, @wesm! I have just resumed using the Substance plugin for Unity after having been away for a while (due to my workload being almost 100% programming lately, nothing related to Substance per se).
I made two new materials in the latest version of Substance Designer yesterday and imported them into Unity 2019.2.3,, after having installed the current version of the plugin from the Asset Store (2.3.4, iirc).
Things worked correctly initially, except for the one OnInspectorGUI() error that is documented as a known, and harmless, issue. However, when I tried to edit the Substance Graph properties in Unity, I got some fatal errors and the .sbsar file's icon changed to reflect that Unity no longer associated it with the Substance plugin. Sometimes reimporting it in place fixed the issue, sometimes I had to delete it and reimport from scratch (which was okay as it wasn't yet on any scene objects).
After some re-reading of the documentation, I believe my issue may have been the known problem with duplicate output usages, and herein lies my question for you. I've worked around the problem, but I want to better understand the situation so I can determine if I've just worked around a known bug, or if I've found a new one that I should report to the dev team.
My .sbsar file was a single package containing two material graphs, let's call them A and B. The output of A is a single PBR material in its own right, but it is also an input to graph B which uses it as a background and overlays its own content in the foreground.
The outputs from A and B are each a material master node connected to the usual set of output nodes. The usages of these outputs are of course duplicated between graph A and B, but not within either single graph. Also, I configured B to expose most of the inputs from B's instance of the A material as a settings group for B, so the environment designers could have control over the background as well as the foreground when using B. A couple of A's parameters are hardwired in B because B needs them a certain way.
When I started having the errors, my first thought after re-reading the plugin 2.3.4 Release Notes was that this is what you meant by duplicate output usages. So I broke off A as a separate package, published it to its own .sbsar file, and imported it into Unity. No problems; it worked as intended.
Back in Substance Designer, I copied all the generating parts of A onto graph B, but without A having its own output nodes -- in other words, I embedded A into graph B without exposing it as a standalone material. I published this new .sbsar, and again it worked in Unity.
But while I was merging A into B for this last step, I happened to notice that B had a custom output node called "smoothness" that was a simple inversion of "roughness." I had made that special output originally because I had planned to export the bitmaps to Unity rather than trying the beta plugin, and I was going to use GIMP to merge that smoothness map into the alpha channel of the metallic map. Since the plugin takes care of the channel packing (or obviates it internally...either way, no longer an issue), I deleted that custom output. Since Designer's list of "usage" types doesn't include "smoothness", I had marked it as "glossiness", and there was already a "glossiness" output.
I apologize for the long-winded explanation, but I wanted to make sure you have all the data. My question is, which of these two things fixed the known issue with duplicate usage? And very specifically, does the current version of the Substance plugin for Unity support having a single Substance package with more than one output material, as long as they are on separate graphs?
I've been, and remain, a big fan of Substance technology and tools. I absolutely adore what Allegorithmic has brought to the creative workplace. Within that context, though, the constructive feedback I'd like to offer is that I think the Unity plugin would benefit from some additional "defensive coding" to more gracefully handle problems when they occur. I was seeing transient errors about array indices out of range and null object references, which suggests that the programmers need some conditional logic or try...catch blocks around code that relies on externally-supplied data.
Our project is too large for me to send it to you in its entirety, but if you need me to create a standalone test bed to replicate the issue, I still have my original failing .sbs file and could make an otherwise-empty project or just send you that file by PM.
Finally, I should let you know that the link from the Asset Store page to the upgrade instructions is outdated and goes to the following "page not found" error: https://docs.substance3d.com/display/integrations/Upgrading+Projects. When someone is in the Asset Publisher portal correcting that, perhaps they could consider adding a link to the plugin documentation ToC as well?
Thanks for listening. I was very glad to get back into Substance this week, because I love this tool set and have missed working with Substance! Keep up the great work.