Search Unity

  1. Get all the Unite Berlin 2018 news on the blog.
    Dismiss Notice
  2. Unity 2018.2 has arrived! Read about it here.
    Dismiss Notice
  3. We're looking for your feedback on the platforms you use and how you use them. Let us know!
    Dismiss Notice
  4. Improve your Unity skills with a certified instructor in a private, interactive classroom. Learn more.
    Dismiss Notice
  5. ARCore is out of developer preview! Read about it here.
    Dismiss Notice
  6. Magic Leap’s Lumin SDK Technical Preview for Unity lets you get started creating content for Magic Leap One™. Find more information on our blog!
    Dismiss Notice
  7. 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:
    747
    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:
    7
    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:
    659
    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:
    235
    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:
    235
    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:
    317
    Why my substance materials are disabled? I can't change parameters anymore.
     
  8. wesm

    wesm

    Allegorithmic Community Manager

    Joined:
    Feb 24, 2014
    Posts:
    235
    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:
    317
    Thanks. Is there any link to get fix faster that asset store?
     

    Attached Files:

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

    wesm

    Allegorithmic Community Manager

    Joined:
    Feb 24, 2014
    Posts:
    235
    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:
    7
    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:
    235
    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:
    235
    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:
    317
    Still can't select shader type! it's disabled.
     

    Attached Files:

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

    wesm

    Allegorithmic Community Manager

    Joined:
    Feb 24, 2014
    Posts:
    235
    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:
    7
    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:
    7
    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:
    317
    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:
    235
    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:
    317
    Thanks. I hope Unity will fix this big issue soon.
     
  21. imphenzia

    imphenzia

    Joined:
    Jun 28, 2011
    Posts:
    395
    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:
    659
    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