Search Unity

  1. Improved Prefab workflow (includes Nested Prefabs!), 2D isometric Tilemap and more! Get the 2018.3 Beta now.
    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. Let us know a bit about your interests, and if you'd like to become more directly involved. Take our survey!
    Dismiss Notice
  4. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice
  5. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

An Update on Substance Format Support in Unity

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

  1. syscrusher

    syscrusher

    Joined:
    Jul 4, 2015
    Posts:
    849
    I have a hunch that you might want to investigate. I haven't had this problem with Substance, but recently I needed to restore a Unity project from a backup on a Windows 10 NTFS disk. I keep my backups two different ways, and what I found is that Unity is incredibly finicky about case-sensitive filesystems in the Windows version. Thankfully, one of my two backup methods didn't have that issue.

    This may be relevant to you for one of three reasons:
    1. If your two devices have different filesystems (such as one NTFS and one FAT), whether both on the same o.s. or on different o.s., then this might be the problem you're seeing.
    2. If you're using a Mac, and you moved from one Mac with case-sensitive volumes to another with case-insensitive volumes (or vice-versa), you might see the same issue I did.
    3. If you used a case-sensitive archive tool to compress your data for transfer, you may have this problem. This is in fact what happened to me. Again, I had an alternate backup method that worked, so my data was safe.
    Again, I know this is a long shot, but since the Allegorithmic folks didn't have an initial diagnosis for you, and this sort of thing (but not with Substance) happened to me, I thought you might want to check into it. Apologies if this is a dead end for you.
     
    radiantboy likes this.
  2. Nicate

    Nicate

    Joined:
    Jul 18, 2018
    Posts:
    9
    After a "Publish .sbsar file as previous" in Substance Designer, I encountered (in Unity) a

    Code (csharp):
    1. Assertion failed: Cancelling DisplayDialog because it was run from a thread that is not the main thread: Opening file failed <redacted>.sbsar: Het proces heeft geen toegang tot het bestand omdat het door een ander proces wordt gebruikt.
    which is Dutch for "the process cannot access the file because it is in use by another process".

    However, on closer inspection it seems the substance was still fully imported.

    The only thing different from regular usage in this case was that the editor was in play mode.
     
    syscrusher likes this.
  3. radiantboy

    radiantboy

    Joined:
    Nov 21, 2012
    Posts:
    676
    Thanks very much I highly appreciate the advice :) I will check into that.
     
  4. pojoih

    pojoih

    Joined:
    Mar 30, 2013
    Posts:
    155
    Why do you put a "mat." in front of every material name?? Now I have to remap every damn ProceduralMaterial in my project after the 2018 upgrade, because the On Demand remapping feature of the fbx importer, which searches for the correct material name is useless now. That's just stupid!
     
  5. wesm

    wesm

    Allegorithmic Community Manager

    Joined:
    Feb 24, 2014
    Posts:
    244
    No problem : ) I can completely understand the frustration.

    We are doing our best to make this transition smooth, but indeed there are lots of issues. The team is working to get this fixed ASAP. We've had a lot of issues with how the meta files are handled and that is what is causing the break. Unfortunately, there isn't a test system in place so we can test delivery from the Asset Store before it is released. During this beta phase, the meta files are breaking with each update we post. The team is working hard to resolve this. I know the road is very bumpy now, but please hang in there. Much smoother road is on the horizon.

    The plugin is still in beta, so we don't recommend using it on commercial work. I hate to sound like a broken record, but we will have this all resolved with great substance support in Unity. It's just taking a lot of time.

    Cheers,
    Wes
     
  6. wesm

    wesm

    Allegorithmic Community Manager

    Joined:
    Feb 24, 2014
    Posts:
    244
    We will fix this. I added a ticket for us to remove the .mat and just use the name of the sbsar file.

    Cheers,
    Wes
     
    pojoih likes this.
  7. Crossway

    Crossway

    Joined:
    May 24, 2016
    Posts:
    324
    Why my substance materials are disabled? I can't change parameters anymore.
     
  8. wesm

    wesm

    Allegorithmic Community Manager

    Joined:
    Feb 24, 2014
    Posts:
    244
    Hi,

    This is the result of an issue we found in 2018.2. We have a hot fix incoming to address this.

    Cheers,
    Wes
     
    Crossway likes this.
  9. Crossway

    Crossway

    Joined:
    May 24, 2016
    Posts:
    324
    Thanks. Is there any link to get fix faster that asset store?
     

    Attached Files:

    • HH.png
      HH.png
      File size:
      14.2 KB
      Views:
      51
  10. wesm

    wesm

    Allegorithmic Community Manager

    Joined:
    Feb 24, 2014
    Posts:
    244
    I'm sorry, but we don't have a distribution method other than the asset store for the plugin. We will be releasing this hotfix soon, followed up by a planned larger update with mobile support.

    I'll post back as soon as I have more information on the hotfix release date.

    Cheers,
    Wes
     
    Crossway likes this.
  11. Nicate

    Nicate

    Joined:
    Jul 18, 2018
    Posts:
    9
    Code (csharp):
    1.  
    2. NullReferenceException: Object reference not set to an instance of an object
    3. Substance.Game.Substance.GetChangedSubstancePaths () (at <1c8d849402bd45fbbc7729a858adad22>:0)
    4. Substance.Game.SubstanceMain.StateChange (UnityEditor.PlayModeStateChange state) (at <73d3aeb248aa4455be059d8925fa2f66>:0)
    5. UnityEditor.EditorApplication.Internal_PlayModeStateChanged (UnityEditor.PlayModeStateChange state) (at C:/buildslave/unity/build/Editor/Mono/EditorApplication.cs:285)
    6. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
    7.  
    I was editing a shader (code, in VS) that makes use of substance plugin generated textures. It's possible it's unrelated to that, or that it happened in the background while I was busy in VS.
     
  12. wesm

    wesm

    Allegorithmic Community Manager

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

    We just released a hotfix for 2018.2. The update is live on the Asset Store. This doesn't contain any new features. This update is a fix for the issue in 2018.2 where the Substance Material and Parameter GUI was grayed out.

    We are also preparing a much larger release which will contain mobile support for Android and iOS. We wanted to get this hotfix out ASAP since the plugin was not working in 2018.2.

    Cheers,
    Wes
     
    f1chris and Crossway like this.
  13. wesm

    wesm

    Allegorithmic Community Manager

    Joined:
    Feb 24, 2014
    Posts:
    244
    I reported this issue to the dev team. They are working on the API. Currently we have exposed in the API functions the plugin uses for the editor controls. These functions are not official API at this time, so we still have work to do on this. Thank you for reporting the issue. I am reporting everything and the dev team looks at each of this issues.

    Cheers,
    Wes
     
    Crossway likes this.
  14. Crossway

    Crossway

    Joined:
    May 24, 2016
    Posts:
    324
    Still can't select shader type! it's disabled.
     

    Attached Files:

    • S.png
      S.png
      File size:
      15.3 KB
      Views:
      43
  15. wesm

    wesm

    Allegorithmic Community Manager

    Joined:
    Feb 24, 2014
    Posts:
    244
    Hi,

    Yes, this still a known issue. The parameters for the substance are working, but the shader select is not. This is something we need to get Unity's help on as it's not an issue caused by the plugin itself. We are investigating this.

    Cheers,
    Wes
     
    Crossway likes this.
  16. Nicate

    Nicate

    Joined:
    Jul 18, 2018
    Posts:
    9
    You can always make a new material with another shader and set it up manually with the substance textures.
     
  17. Nicate

    Nicate

    Joined:
    Jul 18, 2018
    Posts:
    9
    Hi, sorry, I missed your reply. What I meant was that I was writing a shader in HLSL, using the textures as an input. I was not using any plugin API at the time.
     
  18. Crossway

    Crossway

    Joined:
    May 24, 2016
    Posts:
    324
    Any progress on this? I can't use SP anymore because of this issue. I need to use Uber shader with Substance shaders.
     
  19. wesm

    wesm

    Allegorithmic Community Manager

    Joined:
    Feb 24, 2014
    Posts:
    244
    We don't have an update yet. We are talking with Unity devs on this and it requires a solution on their end. However, you can create a new material, use any shader and manually apply the substance generated textures to the shader input. This works and the substance textures are updated by the substance graph object. I show this workflow here for HDRP support. https://support.allegorithmic.com/documentation/pages/viewpage.action?pageId=172818842

    Cheers,
    Wes
     
    Crossway likes this.
  20. Crossway

    Crossway

    Joined:
    May 24, 2016
    Posts:
    324
    Thanks. I hope Unity will fix this big issue soon.
     
  21. imphenzia

    imphenzia

    Joined:
    Jun 28, 2011
    Posts:
    399
    I'm trying to get the equivalent of GetGeneratedTexture() to reference the generated texture but I can't find that in the API documentation - how can I reference a SubstanceGraph generated texture from script?
     
  22. radiantboy

    radiantboy

    Joined:
    Nov 21, 2012
    Posts:
    676
    Great cant wait for that day :) However I upgraded unity and they all went purple again, argh. Ive removed them all for now, would be great to get them back in sometime in 2018, they were easily the best looking textures.
     
  23. futurlab_peterh

    futurlab_peterh

    Joined:
    Jan 23, 2018
    Posts:
    2
    Hi I'm upgrading a project from 2017.3.1p2 to 2018.2.2f1, following the instructions from https://support.allegorithmic.com/documentation/display/integrations/Upgrading+2017.x+projects

    The first part of the process seems to work fine; but after installing the Asset Store plugin on 2018.2.2f1, I get this message when trying to reimport a material:

    Is there any fix or workaround for it?
    Cheers
    Pete
     
  24. Crossway

    Crossway

    Joined:
    May 24, 2016
    Posts:
    324
    Seems the Unity guys not going to fix this issue any time soon. That's awful.
     
  25. wesm

    wesm

    Allegorithmic Community Manager

    Joined:
    Feb 24, 2014
    Posts:
    244
    We definitely know this is a huge pain. We now have a solution in place! However, I do have some good and bad news. The good news is that for the next update (2.1) we are no longer dumping all of the substance plugin files in the plugins folder. Everything is now placed in an allegorithmic folder. The bad news is that this will unfortunately break projects again. There is nothing we can do to resolve issues where the GUID files change. However, after the next 2.1 update, projects will no longer break after updating.

    More to come! We are also looking at revising the release schedule so we don't go so long between updates. We are looking at doing smaller, increment updates more frequently rather than waiting for large feature sets to be implemented before an update. This way, we can have more regular fixes to you in a shorter amount of time.

    Cheers,
    Wes
     
    Crossway, Rowlan and Gen_Scorpius like this.
  26. f1chris

    f1chris

    Joined:
    Sep 21, 2013
    Posts:
    212
    Is Unity stalling the release of the Mobile plugin as well ?
     
  27. TheMonkeysaur

    TheMonkeysaur

    Joined:
    May 2, 2017
    Posts:
    45
    Hi, I have been using Substance / Unity for a while and I keep finding myself having to duplicate the generated material and then apply the duplicate to my object, because I cannot change the shader or parameters on the generated material (they are greyed out).

    When I do this, I had hoped that at least my duplicated material could be protected from changes made in Substance Painter, but it also refreshes with any changes made, if I want to itterate through different variants of one substance, and save multiple materials in Unity as I go, I seem to have to use an entirely seperately imported mesh.

    Any tips would be appreciated.
     
  28. wesm

    wesm

    Allegorithmic Community Manager

    Joined:
    Feb 24, 2014
    Posts:
    244
    Hi,
    Are you using the live link with Painter?

    Cheers,
    Wes
     
  29. Crossway

    Crossway

    Joined:
    May 24, 2016
    Posts:
    324
    Please inform us whenever Unity fixed the issue that we couldn't change material type.
    I'm stuck on this. Don't want to lose even on more day.

    Thanks.
     
  30. TheMonkeysaur

    TheMonkeysaur

    Joined:
    May 2, 2017
    Posts:
    45
    Yes
     
  31. wesm

    wesm

    Allegorithmic Community Manager

    Joined:
    Feb 24, 2014
    Posts:
    244
    Hi,

    We were able to fix the issue where there shader option is grayed out. We are still working on the ability to support different shaders in the generated substance material and this should be fixed in our next update.

    For a workaround, you can create a new material, set any shader and drag in the substance outputs. This works without issue. Basically, you are just not using the material we create. Instead you use your own material and shader, which is then driven by the substance textures. Please check this section in the docs for an example where I show working with HDRP. https://support.allegorithmic.com/documentation/pages/viewpage.action?pageId=172818842

    Cheers,
    Wes
     
    Last edited: Aug 29, 2018
    Rowlan likes this.
  32. wesm

    wesm

    Allegorithmic Community Manager

    Joined:
    Feb 24, 2014
    Posts:
    244
    Just to make sure I understand, you want to change the shader on the material that is linked with Painter?

    Cheers,
    Wes
     
  33. TheMonkeysaur

    TheMonkeysaur

    Joined:
    May 2, 2017
    Posts:
    45
    Change the shader, or even just edit the default shader parameters. Since duplicating the material allows me to edit the shader parameters, or the shader itself, I just end up doing that and applying the duplicate to my object. Perhaps when the link with Painter is severed the shader options become available on the default material, I'm not sure.

    Most of all I would like to be able to "decouple" the duplicate I make of the material linked with Painter so I can keep it as is before carrying on making changes which I would like only to be applied to the default material and not to the duplicate I made of it.

    I've also noticed that whenever I play my project in Unity, if I am using a material linked with Painter, the metallic resets itself to 1, unless the link to Painter is disconnected.

    Thanks.
     
  34. TimeWalk-org

    TimeWalk-org

    Joined:
    Nov 3, 2014
    Posts:
    6
    How does one reliably find any assets related to Substance Designer/Allegorithmic? I have gone through all of my shaders and materials and deleted everything made with SD, but I am still getting this warning: "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.
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)". I know it's just a warning, but it makes me suspect I still have vestigial Allegorithmic assets in my project...
     
  35. wesm

    wesm

    Allegorithmic Community Manager

    Joined:
    Feb 24, 2014
    Posts:
    244
    This warning should be for any sbsar files you have imported into your project. The warning appears when an sbsar file is imported. When you deleted substances, did you do so only for the scene or could any files be left in the project?

    Cheers,
    Wes
     
  36. Crossway

    Crossway

    Joined:
    May 24, 2016
    Posts:
    324
    Thanks. I'll be waiting for the next version to be able to change shader type.
     
  37. John-Chen350

    John-Chen350

    Joined:
    Jan 14, 2015
    Posts:
    52
    It's a very frustrating thing that after dropping Substance support half year ago, its support in mobile platform is still yet to come..
     
  38. f1chris

    f1chris

    Joined:
    Sep 21, 2013
    Posts:
    212
    I do agree. It was close to release then nothing. I even stopped asking after they didn’t replied back last time I asked what was going on with the mobile plugin.
     
  39. wesm

    wesm

    Allegorithmic Community Manager

    Joined:
    Feb 24, 2014
    Posts:
    244
    Hey Guys,

    I completely understand the frustration.We have a big release coming very soon, which includes mobile support for iOS and Android. I will post back with the full release notes as soon as I am permitted.

    Cheers,
    Wes
     
    SamEats3d and Ostwind like this.
  40. f1chris

    f1chris

    Joined:
    Sep 21, 2013
    Posts:
    212
    Thx for the quick feedback to calm us down ;-)
     
  41. wesm

    wesm

    Allegorithmic Community Manager

    Joined:
    Feb 24, 2014
    Posts:
    244
    Hello : )

    We are preparing a new update to release in the very immediate future! Here are the release notes for the 2.1 update.

    Unity 2.1.0 Release Notes

    - Added iOS mobile support

    - Added Android mobile support

    - Improved Reflection process (upgrading projects from Unity 2017 to 2018)

    - Improved Substance plugin update process (from 2.1.0 onward)

    - The Substance plugin now has its own folder when it is imported (/Assets/Allegorithmic/Plugins)

    - Added Unity scripting define symbol

    - Added to API: ListInputs() function to list input parameters in a Substance graph

    - Added to API: GetGeneratedTextures() function

    - Materials used in Prefabs now update correctly after the Reflection process

    - Fixed an issue where the shader dropdown was grayed out on the Substance material

    - Fixed an issue where parameters weren't grouping correctly on a Substance graph

    - Fixed an issue where changing the shader would reset the material settings after applying updates on a Substance

    - Fixed an issue where closing the editor/building a project would reset texture wrap/filter modes/aniso level​
     
    hopeful likes this.
  42. wesm

    wesm

    Allegorithmic Community Manager

    Joined:
    Feb 24, 2014
    Posts:
    244
    thylaxene likes this.
  43. Nicate

    Nicate

    Joined:
    Jul 18, 2018
    Posts:
    9
    Just a heads-up to everyone: Updating to 2.1.0 (even using the steps listed in the linked documentation) will cause custom materials that use Substance textures to lose all those texture references. Or at least mine did.
     
    f1chris likes this.
  44. wesm

    wesm

    Allegorithmic Community Manager

    Joined:
    Feb 24, 2014
    Posts:
    244
    Thanks for posting this issue. We have this fixed for our 2.2 release.

    Cheers,
    Wes
     
  45. Nicate

    Nicate

    Joined:
    Jul 18, 2018
    Posts:
    9
    Alright, I'll hold out for that release XD