Author Topic: Difference Between "Unity 4 Diffuse + Gloss" and Diffuse, Gloss  (Read 4535 times)

I'm a bit confused as to how Substance Painter is generating the unity4_diffgloss.png file.

You'd think it would be the same thing as diffuse.png, and gloss.png with the alpha. But they're different.

Here are the two sets below (the levels nodes do nothing). On the left is diffuse.png (top) and gloss.png (bottom). On the right is the unity4diffgloss split into rgb and a, diffuse on top and gloss on bottom. Why are these different?

Also, why is the diffuse so dark? I realize that there's a difference between diffuse+specular and PBRs, but Substance Painter can take the PBRs and generate diffuse+specular from them (I've also tried the base color/metallic/roughness node in Designer, and it comes up with the same outputs as Painter) This is what the object looks like in Substance Painter. Even with the light only hitting the back of the object, it's not nearly the black diffuse that is generated. I'm just looking for something that looks relatively the same as in Painter.


I will have the developers take a look at this thread. In the meantime, I'll see what I can answer : )

You have two sets of the textures. It sounds like the ones on the right are generated through Painter. Where are the maps on the left coming from?

The dark diffuse is due to the texture representing metal. IN PBR spec/gloss, metal has no color value so it is black in the diffuse map. The color comes from the specular map which holds the metal reflectance value. Metal has no color. It should be diffuse black. The refection of the light bouncing off is what gives it brightness and color depending on the glossiness setting.


Head of Substance Demo Art Team
Twitter: The3DNinja

Okay great, I wasn't aware that metals didn't actually have a diffuse color, and it was only the specular. That seems to solve the problem - but there are still some issues.

All 4 textures above are generated via Painter. Another way to look at the two pairs of textures above is like this:

The left one is unity4_diffgloss.png. The right one is diffuse.png for the RGB channels, and gloss.png for the alpha channel. They're very different.

Here are the two in Unity (using a Bumped Specular shader)

Drastically different. The unity4_diffgloss.png is on the right, and the other one is on the left. From what I can tell, the unity4_diffgloss appears relatively the same as it does in Painter. The one "manually" generated, on the left, using Designer, is much more black (because the diffuse is black, after all).

From what I can tell from this, either unity4_diffgloss.png is not using the same diffuse and gloss maps that are exported, or diffuse.png and gloss.png are wrong somehow, or unity4_diffgloss.png is running through a more complicated pipeline that isn't simply using diffuse as the rgb channels, and gloss as the alpha channel.

The reason for all this is that I need to effectively generate the unity4_diffgloss.png texture (assuming it's correct), but after running it through compositing in Designer (add height maps, etc).
Last Edit: October 17, 2014, 11:40:30 am

Here's another thing that's confusing. Below, the left image is diffuse.png, the middle image is gloss.png, and the right image is unity4_diffgloss.png.

Where is that color information in unity4_diffgloss.png coming from?

Here's another thing that's confusing. Below, the left image is diffuse.png, the middle image is gloss.png, and the right image is unity4_diffgloss.png.

Where is that color information in unity4_diffgloss.png coming from?


I think the confusion is in how the metal/rough conversion is working. If you have a metal (metal/rough workflow), the metal reflectance value is a color and can be tinted e.g. copper. In metal/rough, this reflectance value is placed in the base color. On conversion, the metal has no diffuse color, so it is black in diffuse. The metal reflectance value is then moved to specular map as in spec/gloss PBR, the reflectance value for metal is in the specular map along with dielectric reflectance values.

What you are seeing in the specular map, which has color (looks to be a metal reflectance value) in the specular map. Substance Painter is soon getting the PBR Spec/Gloss shader soon you won't have to worry about conversion.


Head of Substance Demo Art Team
Twitter: The3DNinja

Well that still doesn't really answer my question. My confusion is that unity4_diffgloss has color, and neither diffuse.png or gloss.png have color. I want to know how unity4_diffgloss is generated in Painter.

Looking forward to the spec/gloss shader, anyway.

The current unity4 export does not just put the glossiness map into the diffuse alpha, it makes some mixes to approximately fit with the standart (non PBR) shader in unity 4.

As Wes said, in a pbr workflow, metalic parts, once converted to diffuse/specular would give black areas which would not be rendered very nicely with the unity4 standart shader.

We made this until more options (like remapping channels as you want) are added to the export window.

However, their might be a problem here since unity4_diffgloss.png should not contain any color information.
Could you send us your project ?
Product Manager - Allegorithmic

Alright cool I'll send that over. I'd love to know what those "mixes" are, so that I can recreate them in Designer.

I think one thing that's been confusing for me is PBR Diffuse/Specular vs Blinn Diffuse/Specular, and that they're completely different.

Their is a missing sRGB conversion missing in the Unity4 preset. It'll be fixed in next update.

For your information here is what is done for the unity 4 export, it is totally arbitrary and is not based on any "physical" rule as it targets a non physical shader in unity 4:

rgb = basecolor
alpha = metallic * 0.5 + (1.0 - roughness) * 0.5

We'll probably get rid of that when we'll add a non physical diffuse/specular shader.

Product Manager - Allegorithmic