Author Topic: Substance Painter and Unity 5 PBR Workflow  (Read 45233 times)

Hi,

For using Substance Painter exported maps with Unity 5, please take a look at this guide.
https://support.allegorithmic.com/documentation/display/SPDOC/Unity+5

Also, here is a sample scene.
https://www.dropbox.com/s/ime98cgc0bmn4yh/scfiCrate_unity5.zip?dl=0

Cheers,

Wes
Last Edit: August 11, 2015, 08:44:39 pm
Integrations Product Manager / Training
wes.mcdermott@allegorithmic.com
Twitter: The3DNinja

Hey, did you post wrong version of that Unity_curve material? Because object look even smoother than normal.
           With curve:

           Without:

That actually means it would look even far more wrong in Unity.

Yeah I am wondering the same. When I import the unity_curve sbsar to painter it only imports as a generator (as opposed to a filter).

It also looks over glossy when you use it as a generator.

Hey, did you post wrong version of that Unity_curve material? Because object look even smoother than normal.
           With curve:

           Without:

That actually means it would look even far more wrong in Unity.

Hi,

It sounds like the issue is that you need to set the roughness channel pass thru.

Here are the steps:
1. Create a standard layer and select the roughness channel using the drop down box at the top of the layer stack. With roughness selected, change the blending mode to Pass thru(Pthr).

2. Select the layer and add a filter. For the filter, choose the imported unity_roughness_curve.

With the roughness channel set to pass thru, the rough will not be too shinny. It will look a little more shiny as this filter is acting as a curve and not just a gamma shift.

Please let me know if the resulting exported maps using this correction are not looking right. You need to be sure that the reflection probe resolution is set to 128 or 256. This curve will not look correct under resolutions over than 128 or 256. The default resolution for the probe is 128 in unity.

Cheers,

Wes
Integrations Product Manager / Training
wes.mcdermott@allegorithmic.com
Twitter: The3DNinja

Hi,

Another thing to try is to not use the correction. Instead, set unity up as indicated in the first post and leave the reflection probe setting to 128. You may get a good match with this set up and not need to use correction.

Please let us know what you get with your scenes.

Cheers,
Wes
Integrations Product Manager / Training
wes.mcdermott@allegorithmic.com
Twitter: The3DNinja

Is there any way at all to load Unity's Standard Shader(s) into Substance Designer directly?

The hoops I'm having to jump through to get metallic/roughness(smoothness) merged and inverted seems so unnatural. I'm not sure if I'm missunderstanding the complete differences in SD output vs Unity Requirements or if I truly have to work somewhat blind within SD hoping it eventually looks correct within Unity. It feels to me like there's a large disconnect between Substance PBR expectations & ouput and Unity's expectations & input.

Between having to use tri-planar on each and every output and having to do hacky RGB-A merging (inverting) for Unity it makes what should seem like a simple example turn into quite a mess.

[disclaimer: I'm teaching myself substance designer & substances at the moment so if there's an easier way or I'm ignorant of ways to make this work better please let me know]

example:

Is there any way at all to load Unity's Standard Shader(s) into Substance Designer directly?

The hoops I'm having to jump through to get metallic/roughness(smoothness) merged and inverted seems so unnatural. I'm not sure if I'm missunderstanding the complete differences in SD output vs Unity Requirements or if I truly have to work somewhat blind within SD hoping it eventually looks correct within Unity. It feels to me like there's a large disconnect between Substance PBR expectations & ouput and Unity's expectations & input.

HI Clive,

If you are publishing a substance material for use in Unity, the substance plugin will automatically invert the roughness and place it in the alpha of the metallic map for use with the Unity 5 standard shader. So in SD, you work with outputs and don't need to manually channel pack any of the outputs.

Unity has adopted a different PBR workflow than most. They are using a smoothness map which is actually a glossiness. This map is an invert of the roughness. Its strange that they are using a "gloss" map for both metal and specular workflows. In their attempt to make it easier, they have in turn ended up confusing users.

The inconsistency between SD and Unity micro-surface (rough or smoothness maps) are due to the different BRDF that unity has chosen. They are doing this as to create a close approx. with their desktop and mobile builds. It uses Blinn-phong BRDF which is not good. However, they will once again enable GGX BRDF.

Unity also has a very bad bug where if you change the reflection probe resolution, it is changing the smoothness map interpolation. This affects all texture tools. If you used photoshop to create a smoothness map and then changed the reflection probe resolution, you would get different specular values.

We are talking with Unity on these matters and they are aware of the fixes and changes they need to make. Unfortunately, this is out of our hands.

However, if you follow the guidelines I posted above, you should be able to get a close match for now. For exporting to unity using using the sbsar file, you don't need to pack any channels using RGBA merge. The substance plugin will handle the conversion and mapping automatically.

The usage of the tri planar will be to remove any seams where a texture is projected in UV space. The triplanar setup is more involved process than using it in Substance Painter. I will check to see if there are plans to automate this process further.

Please let me know if I misunderstood your question or if you have any questions on the workflow to Unity.

Cheers,

Wes
Integrations Product Manager / Training
wes.mcdermott@allegorithmic.com
Twitter: The3DNinja

Thank you for the detailed answer. It's great to hear that within unity the substance plugin will auto correct Unity's (ab)use.
Unfortunately though I'm using several SD5 features that are currently not supported (eg: Tri Planar amongst others, thus the yellow highlights due to my SD4 engine selection to show these) -- so, I'm having to export textures, for now, hoping that Unity's substance plugin will in fact catch up during my own development cycle.

The tri-planar for each channel isn't so bad once I figured out how to embed a "sub" substance which does that for me once, neatly, which I'm re-using everywhere.

Thanks again for the great detail in your answer.

Hi Clive, the latest patch build has sd5 support.  Google it-- I'm on my iPad half asleep atm :)

Also check out a Tri planar thread in I think the unity sub forum here for another fix you'll need to implement to get Tri olanar working in unity
Last Edit: April 17, 2015, 07:37:29 pm

Hi Wes & Others!

I'm not sure where I'm going wrong here.  The modeler who originally set up this substance (of which I've added a lot to), did it expecting it to be used in the Unity Standard Specular shader.  I don't know why, but that's what he chose.  I've added a roughness output, and used the node linked above, but I'm getting vastly different results in Unity vs SD.

Any idea where I may be making mistakes?

Thanks!!!

Unity has adopted a different PBR workflow than most. They are using a smoothness map which is actually a glossiness. This map is an invert of the roughness. Its strange that they are using a "gloss" map for both metal and specular workflows. In their attempt to make it easier, they have in turn ended up confusing users.

And that´s exactly, what has been going on ever since Unity started working on their new "Standard" Shader.

Hi Wes & Others!

I'm not sure where I'm going wrong here.  The modeler who originally set up this substance (of which I've added a lot to), did it expecting it to be used in the Unity Standard Specular shader.  I don't know why, but that's what he chose.  I've added a roughness output, and used the node linked above, but I'm getting vastly different results in Unity vs SD.

Any idea where I may be making mistakes?

Thanks!!!

Hi Andrew,

The specular/gloss shader is just another PBR workflow. Its essentially the same data but its represented a bit differently. For instance, spec/gloss uses a glossiness map which is an invert of the roughness map the metal roughness workflow. If you just add the roughness output, but don't supply any roughness data, then the roughness will not work. If you have a specular and gloss map already, you will need to manually create the base color and roughness maps. We don't have a method to convert from Spec/Gloss to metal/rough.

You are creating a substance material? Do you have the sbs file and is the data in specular and glossiness or have you also created roughness and base color?

Cheers,

Wes
Integrations Product Manager / Training
wes.mcdermott@allegorithmic.com
Twitter: The3DNinja

Unity has adopted a different PBR workflow than most. They are using a smoothness map which is actually a glossiness. This map is an invert of the roughness. Its strange that they are using a "gloss" map for both metal and specular workflows. In their attempt to make it easier, they have in turn ended up confusing users.

Yeah : ) Its been a real moving target since the first Unity 5 beta. I think it has become a real mess and they have a lot of bugs with the shader. At this point, I don't think their implementation is good. From the discussions we have had, it sounds like they will be improving it. Lets hope so : )

Cheers,

Wes

And that´s exactly, what has been going on ever since Unity started working on their new "Standard" Shader.
Integrations Product Manager / Training
wes.mcdermott@allegorithmic.com
Twitter: The3DNinja

So,  actually did like your instruction and this is the result:
---In painter:


---In unity:




---In painter:


---In unity:




---Painter export setting:


---Unity lightning setting:


-Cubemap Glossy reflection and trilinear checked.
-The result is so much glossy.
-Please help. :D