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

So,  actually did like your instruction and this is the result:
-Cubemap Glossy reflection and trilinear checked.
-The result is so much glossy.
-Please help. :D

Hi,

I replied to your post on the Unity forums. Can you please send me the Painter project? I will take a look and see what can be done with the settings. I will talk with the devs and we will need to change the correction curve. Please send to wes.mcdermott@allegorithmic.com.

Cheers,

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

So,  actually did like your instruction and this is the result:
-Cubemap Glossy reflection and trilinear checked.
-The result is so much glossy.
-Please help. :D

Hi,

I replied to your post on the Unity forums. Can you please send me the Painter project? I will take a look and see what can be done with the settings. I will talk with the devs and we will need to change the correction curve. Please send to wes.mcdermott@allegorithmic.com.

Cheers,

wes
-Thank for your help :D
-I'm uploading. But the project is nothing more than a fill layer with Painter built-in PBR material selected and your instruction.
:D

So,  actually did like your instruction and this is the result:
-Cubemap Glossy reflection and trilinear checked.
-The result is so much glossy.
-Please help. :D

Hi,

I replied to your post on the Unity forums. Can you please send me the Painter project? I will take a look and see what can be done with the settings. I will talk with the devs and we will need to change the correction curve. Please send to wes.mcdermott@allegorithmic.com.

Cheers,

wes
-Thank for your help :D
-I'm uploading. But the project is nothing more than a fill layer with Painter built-in PBR material selected and your instruction.
:D

Oh, that's ok. I just want to be able to work with the project and test some different adjustments to the roughness curve in Painter.

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

Oh, that's ok. I just want to be able to work with the project and test some different adjustments to the roughness curve in Painter.

Cheers,
Wes
[/quote]
-Here you go :D
https://mega.co.nz/#!dhlmgKzL!u9PjlRb4xKxXEFnTaNLqjQM3dO0Lw35ZuPCjc1vuK6w
-Thanks you.
Last Edit: May 01, 2015, 05:51:53 pm

Oh, that's ok. I just want to be able to work with the project and test some different adjustments to the roughness curve in Painter.

Cheers,
Wes
-Here you go :D
https://mega.co.nz/#!dhlmgKzL!u9PjlRb4xKxXEFnTaNLqjQM3dO0Lw35ZuPCjc1vuK6w
-Thanks you.
[/quote]

Hi,

I checked the files. I think that using the gloss curve correction is no longer valid. I will update the thread. I have a suspicion that in Unity 5.0.1p2, they could have removed the gloss curve remap. They mentioned they were going to do this. I am trying to validate it with Unity.

In 5.0.1p2, they are now defaulting the secondary albedo color to white, which is correct. So now, you should just export your textures without correction. However, it looks like its shifted a bit towards not as glossy as Painter. This can also be impacted by the BRDF (not GGX) and the difference of Painter using importance sampling and Unity using a mip-glossed cube map.

However, the reflection probe still has a major impact on glossiness. By default, its set to 128, which is producing an incorrect gloss on this scene. I set the reflection probe to 1024 and it looks better.

1. Add reflection probe, set the resolution to 1024
2. Player Settings > Linear Gamma
3. Turn off Built-in Lighting
4. Use same HDR environment - Cube map - Glossy Reflection - Trilinear filter

Cheers,

Wes

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

I'm a little confused... been having fits trying to export maps from SD 4.6.2 to work in Unity. 

I use the sbars only for prototyping the environment, and will need to export bitmaps to build atlases...  I'm finding that straight metallic & roughness exports are not, uhm... fitting Unity's implementation and I'm not totally understanding what I need to do to those channels from SD to generate an appropriate map.

from what I've read so far.. is it just a matter of doing a RGBA merge on those two (metallic into RGB, and roughness into A), or do I need to invert roughness into the merge?

Are there any level adjustments or other tweaks that need to be made?  or have I totally misunderstood what Unity is actually doing with those channels?

I'm a little confused... been having fits trying to export maps from SD 4.6.2 to work in Unity. 

I use the sbars only for prototyping the environment, and will need to export bitmaps to build atlases...  I'm finding that straight metallic & roughness exports are not, uhm... fitting Unity's implementation and I'm not totally understanding what I need to do to those channels from SD to generate an appropriate map.

from what I've read so far.. is it just a matter of doing a RGBA merge on those two (metallic into RGB, and roughness into A), or do I need to invert roughness into the merge?

Are there any level adjustments or other tweaks that need to be made?  or have I totally misunderstood what Unity is actually doing with those channels?

Hi Troy,

Yeah, its definitely confusing with Unity's implementation : ) If you are using the Substance plugin, it will handle the texture pack for you. So you don't need to worry about it. If you use the metal/rough workflow, then the substance unity plugin will place the metallic map in the alpha of the roughness map. It will also invert the roughness map to create what Unity refers to as smoothness. The smoothness map is actually a glossiness map, which is the invert of roughness. You shouldn't need to do anything here for publishing an sbsar file for use in Unity.

from what I've read so far.. is it just a matter of doing a RGBA merge on those two (metallic into RGB, and roughness into A), or do I need to invert roughness into the merge?

In case where you are only creating textures and exporting maps from SD, then you would need to pack them. You would use the RGBA-Merge node to place the metallic in the alpha of the roughness. You would also need to invert the roughness using the invert grayscale node.

The level adjustments is tricky. From my tests using Unity 5.0.1p3, I think they have removed the gloss curve or have changed it to a point where I wouldn't do any remapping in SD. It seems to be working better now without any adjustments. The real issues is in their reflection probes. Changing the resolution of the probe has a dramatic effect on the smoothness. I would recommend to pick a resolution for the probe and never change it as it will impact the smoothness value. I have found that using a value of 1024 seems to work. If this is too high, then you can try 256-512. These values should not impact the result too much. I wouldn't recommend using the default 128.

So, you can keep the roughness without remapping, but set the reflection probe to higher than 128.

Cheers,
Wes

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

i ended up piping metallic into R and roughness (inverted) into A...  close enough results; however, I did have to do some leveling and still could not get it perfect.

The wall section to the left of the down arrow is mapped while the section on the right is generated with the sbar.  ( i did not have to use the roughness curve adjustment sbar you provided, but I did try different combinations :D).  I'm not 100% satisfied, things just seem a tad off.


i ended up piping metallic into R and roughness (inverted) into A...  close enough results; however, I did have to do some leveling and still could not get it perfect.

The wall section to the left of the down arrow is mapped while the section on the right is generated with the sbar.  ( i did not have to use the roughness curve adjustment sbar you provided, but I did try different combinations :D).  I'm not 100% satisfied, things just seem a tad off.



Hi,

Things are definitely off with the Unity shaders. The biggest issue comes down to BRDF they are using is Blinn-phong and Substances uses GGX, so you can't get a perfect match of the highlights.

Please take a look at these posts on the Unity forum.
http://forum.unity3d.com/threads/unity-5-shaders-low-quality.313553/page-2

Also, here is a good thread on how to revert the Unity Standard shader back to GGX.
http://forum.unity3d.com/threads/using-ggx-instead-of-blinn-phong.323827/#post-2103011

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

Hi,

Things are definitely off with the Unity shaders. The biggest issue comes down to BRDF they are using is Blinn-phong and Substances uses GGX, so you can't get a perfect match of the highlights.

Please take a look at these posts on the Unity forum.
http://forum.unity3d.com/threads/unity-5-shaders-low-quality.313553/page-2

Also, here is a good thread on how to revert the Unity Standard shader back to GGX.
http://forum.unity3d.com/threads/using-ggx-instead-of-blinn-phong.323827/#post-2103011

Cheers,
Wes

Thank you Wes, I really appreciate your guidance and time.

On a side note, which may be completely unrelated (not certain), I also needed to invert my normal maps generated with SD in Unity (e.g.:  set to -1 vs. 1 [default])... another oddity about that standard shader.

regardless, thanks again Wes.. much appreciated.

Guys, could anyone who got everything working in unity share a unity project file please?

Guys, could anyone who got everything working in unity share a unity project file please?

Hi,

I updated the first post with a new guide and project file.

Cheers,

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

Hi, I've got a little problem with transparency.

Alpha on texture look like ok, effect should be only on glass. Alpha effect should not be on rest part of my model. I've tried many options but nothing work. I'm using standard shader on transparent mode. Rest options are like in tutorial and it's working with no transparent models.
I found this one is 32 bits, without transparent channel was 24.
Last Edit: January 24, 2016, 10:07:04 pm

Its hard to tell from not seeing your model. But 2 things to try:

1) Use "fade" in the standard shader instead of transparent
2) If that doesn't work try splitting the model in 2 (the transparent part and the opaque part)
3) If splitting doesn't fix it. Give each the parts from point 2 a different material, one which is opaque and one which is fade/transparent

I have found in unity its always better to split models into separate objects/materials if they use transparecy. (sometimes you get issues with zbuffer and its pivot centre point if you have many areas using transparency)

If you are still struggling and you are able to send the model I can have a look for you.
Last Edit: January 24, 2016, 10:25:34 pm

Hi, I've got a little problem with transparency.

Alpha on texture look like ok, effect should be only on glass. Alpha effect should not be on rest part of my model. I've tried many options but nothing work. I'm using standard shader on transparent mode. Rest options are like in tutorial and it's working with no transparent models.
I found this one is 32 bits, without transparent channel was 24.

I have found that you'll need to use TWO textures, only one of which can be fade or transparent.

Unity won't handle the transparency correctly otherwise, and you can't at all layer two "transparent" materials on top of each other.  Even if the transparency is set to 0.