so im trying to understand pbr, and make it relatable to the real world, and im stuck on the energy conservation theory.
it says, the how much reflective light a material has, is directly proportional to how little diffuse light it has.
so a highly reflective material has a darker diffuse, and a non reflective have brighter.
this doesnt work in the real world for me.
say i have a white rubber ball, not very reflective. i dip it in water and now its very reflective, but clearly the diffuse colour hasnt changed right? how does this make sense?
Replies
There's actually some more complicated stuff that happens when something gets wet but this is a layman's explanation I guess.
So, if you have a chrome ball, which is 100% reflective, and you mistakenly set the diffuse/albedo value to 50% (for pure metals, diffuse/albedo is typically zero), a shader that has an energy conservation function would automatically darken your diffuse to zero.
Energy conservation does not in any way state that a material must reflect 100% of the light. Most insulators (non-metals) adsorb or scatter some of the light so it's very plausible to have a material that has a diffuse value of 50% and a reflectivity value of 4%, or any number of a huge range of possibilities, as long as diffuse + specular doesn't = greater than 100%.
I think it's also important to clarify between diffuse reflections (scattered, indirect reflections, the color of most insulators) and specular reflections (direct reflections, what we typically refer to as reflections in rendering), otherwise Eric's sentence "The reflection on a shiny white ball is much less bright than the reflection on a shiny black ball." can be rather confusing. Both a white and black rubber ball have the same specular reflection intensity, but differing diffuse reflection intensities.
As capablewizard points out, it's also very important to understand the difference between specular reflection intensity, and surface roughness/glossiness. Most insulators have specular reflectivity in a pretty narrow range, around 4%, however, a good deal of variation in terms of the look of the specular reflections depends on how smooth or glossy the surface is. The smoother the surface, sharper the highlight, the rougher the surface, the more the rays are reflected in random directions, which creates larger, blurrier highlights. Energy conservation applies here too! Even though the specular reflection intensity is the same on two types of plastic, one smooth, and one rough, the rough one will appear to have dimmer reflections, as the reflections are spread over a larger area. Most modern PBR shaders will account for this, so you don't have to manually adjust the reflectivity content, only the gloss/roughness map.
More here:
http://www.marmoset.co/toolbag/learn/pbr-theory
http://www.marmoset.co/toolbag/learn/pbr-practice
1. specular
2. angle of the specular reflection, based on the glossiness of the surface. if its wide its more spread out and thus weaker (energy conservation)
3. diffuse
different materials have different amounts of specular reflections and diffuse reflections. metals have high amount of specular, and thus, lower diffuse (energy conservation)
is this correct?
if so, the maps we use in a pbr workflow would be,
diffuse; the colour of the light after it bounced around underneath the surface
gloss: the angle of specular reflections (microsurface)
metalness: amount of specular vs diffuse
is this also correct?
so the total light output is lower for the black ball? same spec, lower diffuse? so the spec doesnt change in strength or angle if only the diffuse is different right? sounds really obvouis when i wrote this now, a black ball is less bright than a white ball basically
I wrote about it here.
http://polycount.com/discussion/133040/color-theory-question
Yep.
"if so, the maps we use in a pbr workflow would be,
diffuse; the colour of the light after it bounced around underneath the surface
gloss: the angle of specular reflections (microsurface)
metalness: amount of specular vs diffuse
is this also correct?"
A PBR system doesn't have a specific set of inputs. Unreal 4 for instance uses Albedo, Roughness (same as gloss but inverted) and Metalness. Other engines use Diffuse (or albedo), Gloss and Specular. The difference between the Metalness and Specular workflows are outlined in the tutorials I linked above, but here is another that goes into more detail: http://www.marmoset.co/toolbag/learn/pbr-conversion
"so the total light output is lower for the black ball? same spec, lower diffuse? so the spec doesnt change in strength or angle if only the diffuse is different right? sounds really obvouis when i wrote this now, a black ball is less bright than a white ball basically"
Yep, pretty much. The black ball absorbs more of the light, which is why a car with a black interior left out in the sun will be hotter than a car with a white interior, and why painting a black roof white can help reduce cooling costs. The specular reflectivity does not tend to vary for insulators of the same material type, metals of various sorts have higher variances, pure metals tend to reflect in the 70-100% range.
Here is an example, both have specular intensity set to 0.04 and gloss set to 0.09:
follow up question:
a big difference with the pbr workflow is that you cant pick the diffuse values yourself anymore you have to base it somewhat on scanned data and such.
why? if i paint a wall in real life, i get to pick whatever diffuse i want right? why is this not true for the pbr workflow?
in one of the pbr texture conversion tutorials you had a gun, and wrote "this diffuse is to dark, clearly made for a specific light condition". how do you know thats just not a dark painted gun?
Obviously Earthquake wrote the article, but I'd guess he was referring to the real world reference of the plastic on the gun. Effectively what he's saying is - when I compare the plastic in marmoset to the plastic in this photo I have of the gun in real life, it's too dark. Paint can be any albedo you want really, so long as you mimic the physical properties of the material. A red matte paint and a blue matte paint will probably have an extremely similar spec and gloss, so in this example changing the albedo is probably fine.
So, how do you tell if your textures are too dark? In the case of that gun from the tutorial, it was a lesson we learned over the course of the project, that we we're constantly turning up the brightness with the lighting system to compensate for textures that were painted too dark. Even if that sort of workflow works out in the end, you're going to see a drop in texture quality because you have less range to store the values in if most values are below 127 or so. Plus, tweaking lighting conditions to match assets can easily result in a big time sink.
You can also compare to a macbeth/ color chart, which has known values for certain materials. See: https://en.wikipedia.org/wiki/ColorChecker - Note that black is is not 0,0,0 but rather about 20% brightness (sRGB), black here corresponds to black paint essentially. There are few real world materials that get anywhere close to actual black, by that I mean do not reflect a portion of the light that hits the surface.
So there is a range of usable values you should generally stick to, unfortunately there isn't one universal source with enough examples for various material types, so you'll have to do some experimentation and use logic/extrapolation to find good values.