Search Unity

Official Substance Workflows

Discussion in 'General Discussion' started by smcclelland, May 2, 2017.

?

What is your Substance workflow?

  1. I use Substance Procedural Materials (.sbs/sbsar) in my project.

    36 vote(s)
    64.3%
  2. I use Substance Painter to author textures only.

    17 vote(s)
    30.4%
  3. Other (Please explain)

    3 vote(s)
    5.4%
  1. smcclelland

    smcclelland

    Administrator

    Joined:
    Dec 19, 2016
    Posts:
    147
    Hello Unity users!

    The UX team is doing a workflow investigation into how you are using Substance in your projects and want to hear your input! We're most curious about the workflows you're using around materials - are you using Substance Designer and bringing the SBS files directly into Unity? Are you using Substance Painter to author your texture maps and then use them with Unity's standard materials? Are there other awesome workflows you're using? Let us know!

    Cheers,
    Unity UX Team
     
    wccrawford likes this.
  2. HemiMG

    HemiMG

    Joined:
    Jan 17, 2014
    Posts:
    911
    Even when I only had Substance Designer, I was just exporting textures to use in Unity rather than using SBS files directly. Since I much prefer to work in Substance Painter, that's definitely the way I'm going now. I think the idea of suing SBS files directly is pretty cool, I'd be nice to have a car get more dirty as it drives over a dirt track or whatever. As of yet I just haven't worked on a project that would really take advantage of that.
     
  3. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    10,151
    Yep, this pretty much exactly describes my workflow as well.
     
    AlanMattano and smcclelland like this.
  4. smcclelland

    smcclelland

    Administrator

    Joined:
    Dec 19, 2016
    Posts:
    147
  5. 3agle

    3agle

    Joined:
    Jul 9, 2012
    Posts:
    508
    We use Substance (Specifically B2M) in our current projects.
    We've had a few issues with using them effectively in our workflow.

    A quick explanation of workflow:
    Art assets imported into unity (FBX)
    New prefabs auto generated from import
    Art team create B2M based materials
    materials applied to prefabs

    The biggest time waster we have is when the models update, some changes won't flow down into the prefabs, which means they then have to be overwritten. This removes the applied substances, so they have to be manually re-applied.
    We've integrated a method of replacing the materials a bit more easily, but it's still a pain.

    The other issue, which is less workflow and more functionality, is that there are functions in the Unity substance API that apply preset files to the substance, in the version we use, there are some properties of the B2M substances that cannot be saved and loaded by this function, which makes it largely useless for us. Note that this is in Unity 5.3.6, however I have not seen anything in patch notes to suggest this has been updated?

    In terms of 'awesome workflows' I did create a tool that processes model imports, analyses the materials, and provides a UI to generate substance versions of the materials if not already in the project. This is quite a good tool when setting up a project with brand new models. One slight issue it has is that it requires the models to be imported twice... This is mainly a prefab issue (a running theme). The prefabs we auto-create (PrefabUtility.CreatePrefab), do not register in the AssetDatabase right away, which means the database needs refreshing to then start applying the substances, which effectively doubles the import time of models, not ideal and suggest a bug in Unity perhaps (I would always assume that once PrefabUtility.CreatePrefab is called, you should be able to retrieve the prefab using the AssetDatabase, without having to reimport.).
     
    smcclelland likes this.
  6. Martin_H

    Martin_H

    Joined:
    Jul 11, 2015
    Posts:
    4,436
    I'm using Unity 5.5 and Substance Designer 6 graphs seem not to be supported in the Substance plugin of 5.5. Which version of Unity supports all recent SD6 features?
    I was going to experiment with using a Substance Graph to manipulate a flowfield texture for pathfinding. My hope was, that I could benefit from running the calculations in a substance graph to benefit from multithreading without needing to do any of the heavy lifting myself. I could just do it with custom shaders on the GPU, but my last test indicated my game being still GPU limited, so I thought there's a chance of being better off with using the substance engine for this. Also I get nicer previews of what's going on when working in SD on a substance graph.
     
  7. smcclelland

    smcclelland

    Administrator

    Joined:
    Dec 19, 2016
    Posts:
    147
    Interesting. So you're using the raw texture outputs from B2M then and piping them into the Unity PBR material or are you then routing the B2M outputs into a Substance material?

    Just to clarify I understand you correctly - in your prefab example you generate the materials in Unity outside of the prefab and then apply them to the prefab which results in the connection getting lost when the prefab is updated?
     
  8. 3agle

    3agle

    Joined:
    Jul 9, 2012
    Posts:
    508
    We use B2M directly within Unity as an sbar. We automatically use the diffuse texture of an imported material to generate a new instance of the B2M substance. This is then named the same as the original material and matched to a same named preset file. The substance material then gets applied to the prefab, replacing the original.

    On the prefab issue, you are correct, these are procedural materials generated in the .sbar that we apply to the prefab. Then they get overwritten by updates to the prefab (which have to happen since the updates don't trickle down from the model prefab properly, this is the real issue). Like I said, we can and do work around it, but it's very irritating.
     
  9. smcclelland

    smcclelland

    Administrator

    Joined:
    Dec 19, 2016
    Posts:
    147
    Excellent, thanks for the clarification. I've jotted a note down with regards to the behaviour between the prefabs and .sbar's and will talk to our scene management team (prefabs folks) about this.
     
    3agle likes this.
  10. Elzean

    Elzean

    Joined:
    Nov 25, 2011
    Posts:
    584
    I used both, for character i prefer going into substance painter otherwise i usually use substance designer and import the sbsar in unity.
    Having low size textures is also great when using git.

    Currently working on asset pack, it's a good solution to offer options to the end user.

    Also trying to use it in a way to let the user input his own texture into my atlas as i tried to explain here:
    https://forum.unity3d.com/threads/stylized-fantasy-village.467805/#post-3055687
    The entire scene you may see in that previous topic is using substance.

    Annoying limitation are:
    -no 4k
    -changing shader type is slow
    -can't drag substance output into a substance input directly (have to export as bitmap)
    -substance looks better inside substance designer, i know it probably the way unity render things...
    -on that same note, it's not easy to be consistent in normal strength, what looks fine in SD look too strong in Unity and i often have to adjust that either in unity material or reduce in SD (which make the SD result a bit wrong but better in unity)
    -would love to see the recent substance designer 6 features supported


    When talking about substance i often see question about the difference it has with a shader, many users don't realize the advantages of it or what it does. Unity examples are old and focus on runtime change of substances but that seemed to confuse people a bit :p
     
    Last edited: May 15, 2017
    Lex4art and Martin_H like this.
  11. GoesTo11

    GoesTo11

    Joined:
    Jul 22, 2014
    Posts:
    604
    I don't really know what I am doing but I've used a few different workflows.
    1. I've taken substances from Allegorithmic and dropped them onto models that I created with Probuilder in Unity.
    2. I've exported textures from Substance Painter to use in Unity.
    3. I've edited textures in Substance Painter and then added procedural effects in Substance Designer and then used the Substances in Unity.
    4. I've created Substances in Substance Designer for use in Unity.
     
  12. tswalk

    tswalk

    Joined:
    Jul 27, 2013
    Posts:
    1,109
    the problem I've had all along is that they were not animated or animate-able (?word?) for Windows Store Apps... is this also still the case for UWP project that you are not able to use procedural substances?

    I think their reason was always because Windows only had like 2% market share.
     
  13. Elzean

    Elzean

    Joined:
    Nov 25, 2011
    Posts:
    584
    Also recently found out that a substance use on a prefab like grass to use as terrain detail does not work.
     
  14. StaggartCreations

    StaggartCreations

    Joined:
    Feb 18, 2015
    Posts:
    2,262
    I have a serious problem with Substance abuse. I gradually started utilizing Substance for pretty much any texturing purpose, down to trail renderers, lens flares, particle effects and screen overlays. I also find that I'm sometimes able to transfer some shader functions to Substance, such as exponentiating values, or blending textures.

    My main gripes with the Substance integration in Unity are:
    • Substances do not support custom material inspectors (I believe this was fixed in Unity 5.6). Either shader or Substance parameters disappear, sometimes crashing the editor.
    • Exporting bitmaps to a folder (Using the menu under the gear in the material inspector) does not overwrite the existing files. Instead it creates new .TGA with an additional " (Clone)" suffix.
    • Cannot use them with terrain. RTP also requires you to bake them to static bitmaps.
    • Generation process runs on CPU rather than GPU, which makes animating substances not feasible. Animating a water ripples effect at 1024px eats up ~30ms (although this is a very specific case).
    • Substances that are not directly used in scene are not build according to the set building behaviour. I had this issue with a particle effect being used for the first time. Work around was to go through all Substance materials at start up and call the RebuildTextures() function. I suppose it's desirable to not build unreferenced materials, but it's worth noting.
    • 16 bit is not supported, meaning the Tri-Planar node cannot be used in a Substance.
    Also would like to point out that .SBS have no use in Unity, as they are Substance Designer project files. SBSAR files are the result of building a Substance into a Unity usable format ;)
     
    Martin_H likes this.
  15. Elzean

    Elzean

    Joined:
    Nov 25, 2011
    Posts:
    584
    I have been exporting bitmap from a substance using the gear recently and didn't notice this behavior (it was overwriting existing files in my case), are you sure this issue can't come from something else ?
     
  16. StaggartCreations

    StaggartCreations

    Joined:
    Feb 18, 2015
    Posts:
    2,262
    Just checked, seems to work fine in 5.5. But not 5.4. So disregard that note :p
     
    Elzean likes this.
  17. Deleted User

    Deleted User

    Guest

    I actually use them as a real-time function, for example adding water puddles / rain drops when the TOD / weather system kicks in and for my base target platform I limit the texture size.. Wish substances would work with the terrain system but exporting them / creating a new shader works for now.
     
    Billy4184 likes this.