Author Topic: Energy Conservation  (Read 7489 times)

I'm not sure if I should post this here or in the feature requests section, but it looks to me that pbr shaders in SD don't conserve energy.
This makes the whole process of creating maps a bit difficult for me, as everytime I add some color information for example, the reflection add on top of it, resulting in extremely washed out colors in viewport.
If it is there instead, please forgive me, it's only one day I'm playing with SD, but I couldn't find anything in the forum about it :)

Both PBR shaders in the 3d view should respect energy conservation. Can you post a screen shot of the issues you have ?
Last Edit: May 31, 2014, 08:19:30 pm

I made a quick comparison with Marmoset.
Marmoset is on the left, Substance Designer is on the right.
There we go:

Diffuse very dark, Black Specular (CORRECT)

Diffuse very dark, White Specular (CORRECT ...more or less)

Diffuse very Bright, White Specular (WRONG)

...from what I can see, while Marmoset is conserving the energy, in Substance Designer the specular is adding on top of the diffuse... unless I have done something wrong of course :D


I forgot to specify that I'm working with the PBR Specular-Glossiness model.
Last Edit: June 01, 2014, 11:35:37 am

One more example:

There are probably two separate problems :
  • The specular/gloss pbr shader indeed does not seem to properly enforce energy conservation. That should be easily fixed, but meanwhile you'll need to make sure your metals have a black color (or very dark) for diffuse
  • Judging from the headset colors, your texture colors appear brighter in Designer's viewport than in Marmoset's, probably because there is a color space mismatch somewhere. Most likely your diffuse texture is in sRGB but it is set up as being linear in Designer's shader's parameters. Or conversely your texture is in linear space, but for some reason Marmoset expects it to be sRGB.

Hi Cyrille,  thank you very much for your answer, I will check Marmoset textures color space when I'll be back at home.

Happy to know the bug will be fixed (please note that the metallic/roughness shader too has the same bug the the metallic parameter is black) :)

For now I'm using a little hack: I multiply the inverted specular map on top of the diffuse map... it's not super-correct (also because I need to remember to unplug it when exporting the textures), but it helps.

please note that the metallic/roughness shader too has the same bug the the metallic parameter is black

Well, yes, but you should not be able to perceive it that strongly because the material model we use in that case ensures the specular reflection for non metals is very low (0.04). I suppose what you find offending in the images you posted is the fact that the sphere in the "non-metals" cases is overexposed, which is probably due to the two additional point lights in the scene. You can't see them on your perfectly glossy metals because the reflection of a point light on a perfect mirror is invisible.
Last Edit: June 02, 2014, 02:49:37 pm

Hum, strange, in the last image I posted I did put both point lights color to black...

No you're right: while it wasn't a problem with the point lights, the metallic/roughness shader was just quite bright because of the HDRI image.
In other words, yes the metallic/roughness is correct, while the specular/glossiness seems to be broken.

Thank you for your support!
Last Edit: June 02, 2014, 03:30:26 pm

Hi. Was this issue ever fixed? I made a post on Polycount about this but I thought I'd bump this thread as well.
Chris Stone
Weapons Artist @ Treyarch

Yes, it was fixed in Designer 4.4.
Regarding your question on Polycount, I don't think I understand. Do you have more diffuse than expected, or more specular, or both, is the material too glossy or too rough ?
Would it be possible to post screenshots comparing what you have in Designer and what you see on the other viewport using the same model, same textures, same viewpoint (as much as possible/convenient) same setting and same environment/lighting ? Thanks.

Edit: Added these to the Polycount forum as well, sorry for cross posting.
Substance Designer

Toolbag 2

Chris Stone
Weapons Artist @ Treyarch

I am still unsure what you are expecting though. I can see several differences between the renders, but I don't know which one bugs you most.
  • the textures details are way blurrier in the screenshot from Designer, which could be caused by a combinaison of things : the most likely cause is the fact that our viewport does not do anisotropic filtering yet. The antialiasing and DOF post processes can also be the cause if they were not switched off. It is possible also that the resolution of the textures was reduced before display, either because the max-texture size parameter has been reduced or because your graphics card is runnning out of VRAM.
  • the diffuse color on the clear plastic part is different in all three cases. This could be due to different environments, or different expectations from the viewports wrt colorspaces of the textures (sRGB vs linear)
  • the black panel plastic seems less glossy in Designer than in 3DO and maybe less in 3DO than in Marmoset. Again, I'm not sure whether this could be due to different environment, differences in the shader (Phong vs GGX) or difference in the glossiness curve applied in the shader.

Sorry for answering questions with more questions ;)
So what it boils down to is
  • What differences exactly do you expect to be reduced ? All 3 snapshots seem pretty different to me
  • Is it the same environment in all 3 cases ?
  • Which shader are you using in Marmoset ? I know they added GGX recently, which is the one which would give the closest reflections to what we have in Designer.
  • Have you switched off the point light sources in your scene in Designer ? (for the sake of comparison at least, it would be better)
  • Have you switched off the post effects in Designer ? (again, better for the sake of comparison)

PS : Congrats for the cool model btw
Last Edit: July 23, 2014, 06:50:45 pm

1. I switched the environment, but I'm still having more or less the same problem.
2. I am not using CGX, maybe I should switch
3. Point light sources disabled
4. Post effects off
5. I am using a 780GTX with 3GB. Hopefully it is not running out of RAM

Yea, I guess my issue is that the black plastic and the red reflective metal piece seem to be really washed out compared to 3DO and Toolbag 2 (CryEngine as well but no screens from that).

Okay, as I was writing this, I came up with a solution that matches the other viewports better.

1. Multiply the Albedo map with the INVERSE of the specular map for Albedo channel.
3. Push the multiple through a "Replace Color Range" with target color set at ~104.
2. Use "Replace Color Range" with the Glossiness and set it at ~185 as the target color.

Edit: Oh and thank you :D. I'm just starting out with all of this new software (coming from V-Ray/Maya) so it seems I have a lot to learn.

Edit 2: From reading these forums, it seems like every software has its own maps curves; however, do you think it would be possible to add a PBR Spec/Gloss shader to Substance Designer 4 that matches other renders better? At least in the PBR Spec/Gloss, it seems to be pretty different from everyone else. 

Image 1: Substance Designer without fixes

Image 2: Substance Designer with fixes

Image 3: Toolbag 2

Last Edit: July 23, 2014, 07:39:07 pm
Chris Stone
Weapons Artist @ Treyarch