Energy conservation of diffuse term

Started by
17 comments, last by SergeyAS 10 years, 8 months ago

I guess materials that absorb light in especially strange

Note that energy conserving means that the material's output is <= 100%, not == 100%. A material that absorbs light and doesn't show it back is very common smile.png
What is not common though, is a material that can output more than incoming light.

I'm a bit curious about this. Since real-life materials are perfectly capable of absorbing light and then re-emitting it as energy other than visible light, what does it really mean to have a material that doesn't conserve energy? I guess materials that absorb light in especially strange, angle-sensitive ways are probably rare, but it seems plausible that some arrangement of microfacets could potentially be described by materials which are obviously "wrong."

Fluorescense is a great example of materials that can output more energy than its incoming energy. That's because they add an additional source of power other than incoming light (i.e. chemical reactions). Note that conservation of energy (as in the universe as a whole) is preserved, since they're just releasing energy they had been storing in some other form; but for the given time an observer was watching, he or she will have observed that outgoing light > incoming light.
Burning ashes could be another example. The extra light emitted by the ashes comes from heat.
In games, we just call those emissive materials and don't usually care about "correctness". Though this is starting to change (since Physically Based BRDFs + HDR + GI = We can use real life values, like sun's measured power, a bulb's measured power, etc)
Advertisement

I guess materials that absorb light in especially strange

Note that energy conserving means that the material's output is <= 100%, not == 100%. A material that absorbs light and doesn't show it back is very common smile.png
What is not common though, is a material that can output more than incoming light.

I'm a bit curious about this. Since real-life materials are perfectly capable of absorbing light and then re-emitting it as energy other than visible light, what does it really mean to have a material that doesn't conserve energy? I guess materials that absorb light in especially strange, angle-sensitive ways are probably rare, but it seems plausible that some arrangement of microfacets could potentially be described by materials which are obviously "wrong."

Fluorescense is a great example of materials that can output more energy than its incoming energy. That's because they add an additional source of power other than incoming light (i.e. chemical reactions). Note that conservation of energy (as in the universe as a whole) is preserved, since they're just releasing energy they had been storing in some other form; but for the given time an observer was watching, he or she will have observed that outgoing light > incoming light.
Burning ashes could be another example. The extra light emitted by the ashes comes from heat.
In games, we just call those emissive materials and don't usually care about "correctness". Though this is starting to change (since Physically Based BRDFs + HDR + GI = We can use real life values, like sun's measured power, a bulb's measured power, etc)

Good point; I meant to include materials that emit more light than they receive as well as the inverse but neglected to do so, and I realize that both cases do not change the total amount of energy, only the total amount of light (or visible light).

In any case I agree that the core requirement is that the integration of light emitted over all angles is generally no greater than the amount of light received; I do also think that in practice, when people refer to energy-conserving materials, they typically are also suggesting a more holistic, physically-based approach. For instance, one can imagine satisfying the core requirement (light out <= light in) with outdated, ad hoc, and generally "bad" shading methods just by scaling or clamping the parameters and/or output, but people would probably not be especially impressed with such an "energy-conserving" material that met the definition in only the narrowest sense.

-~-The Cow of Darkness-~-

Specular formulas simulate lighting coming with a particular polarity pattern while Diffuse lighting simulate lighting coming with polarization patterns on a different axis.

When a light wave (polarised or not) hits a surface, it's reflected and refracted. Specular simulates the reflected parts, and Diffuse simulates the refracted parts.

Light that's polarised in different ways is still partially reflected and partially refracted (so: requires both diffuse and specular formulas).


When a light wave (polarised or not) hits a surface, it's reflected and refracted. Specular simulates the reflected parts, and Diffuse simulates the refracted parts.
Light that's polarised in different ways is still partially reflected and partially refracted (so: requires both diffuse and specular formulas).

I wouldn't really call it "refracted", it's more a notion of incoherent scattering. In other words, "specular" means "not scattered", whereas refraction *is* a form of local specular reflection. This distinction isn't particularly important in everyday computer graphics but there are some physical effects that apply to specularly reflected light, but not scattered light (and vice versa), so I think the notion of coherence between reflected rays for specular/diffuse light is really the distinctive feature we are trying to quantize here.

Anyway, on topic, yes, the point is that the total energy reflected off a surface patch is less than (or equal to) the total energy falling on it. We don't care about "energies" of particular light rays, they could be incredibly large. If you shine a laser in your eye - don't do this, by the way - it's going to be super bright, with an intensity exceeding hundreds of watts per steradian, yet that laser has a finite amount of power (e.g. half a watt) being converted into light. Now widen the beam.. and it doesn't look as bright anymore. So what we're really interested in is how much power is radiated from a given surface *in every direction*, not just a single one, which involves summing up (or integrating) over the sphere or hemisphere of directions.


I'm a bit curious about this. Since real-life materials are perfectly capable of absorbing light and then re-emitting it as energy other than visible light, what does it really mean to have a material that doesn't conserve energy? I guess materials that absorb light in especially strange, angle-sensitive ways are probably rare, but it seems plausible that some arrangement of microfacets could potentially be described by materials which are obviously "wrong."

That's because your typical BRDF doesn't handle those sorts of effects. Basically, most computer graphics renderers assume that the flow of light in a scene has entered a steady state, that is, it is constant and unchanging as long as the geometry remains the same, which leaves no obvious way to simulate fluorescence and other time-dependent effects (it can be done, though, especially when ray tracing). In this sense the notion of "energy conservation" dictated by those renderers can be somewhat limited physically.

“If I understand the standard right it is legal and safe to do this but the resulting value could be anything.”


When a light wave (polarised or not) hits a surface, it's reflected and refracted. Specular simulates the reflected parts, and Diffuse simulates the refracted parts.
Light that's polarised in different ways is still partially reflected and partially refracted (so: requires both diffuse and specular formulas).

I wouldn't really call it "refracted", it's more a notion of incoherent scattering. In other words, "specular" means "not scattered", whereas refraction *is* a form of local specular reflection.

Slight nit-pick, but isn't it "refracted/diffuse" in that the incoming light enters the surface before coming back out of the surface, thereby picking up the colour of the underlying object - as opposed to the reflected light which never enters the surface and thereby remaining the pure light colour?


When a light wave (polarised or not) hits a surface, it's reflected and refracted. Specular simulates the reflected parts, and Diffuse simulates the refracted parts.
Light that's polarised in different ways is still partially reflected and partially refracted (so: requires both diffuse and specular formulas).

I wouldn't really call it "refracted", it's more a notion of incoherent scattering. In other words, "specular" means "not scattered", whereas refraction *is* a form of local specular reflection. This distinction isn't particularly important in everyday computer graphics but there are some physical effects that apply to specularly reflected light, but not scattered light (and vice versa), so I think the notion of coherence between reflected rays for specular/diffuse light is really the distinctive feature we are trying to quantize here.

Not to beat a dead horse, but in a strict sense I think I actually agree with Hodgman. I think "specular" reflection is when a ray is reflected perfectly off of a surface (meaning in only in precisely one direction) whereas any other type of "reflection" is refraction -- at least insofar as the ray/rays leave in multiple directions (or alternately in a nond-eterministic way over a distribution).

Like I mentioned, this definition of specular excludes "rough specular" type materials (but not really, as they are ultimately just an approximation of many different microfacets, each of which are perfect mirrors). It's also common to use "specular" to refer to any material where the perceived luminance varies by viewing angle, in which case diffuse refers only to "ideal" diffuse materials; I think this is closer to the definition you're using, especially if we also add to the "diffuse" label materials where the perceived luminance is allowed to vary by viewing angle, but not as a function of the angle that light enters (Minnaert, etc.).

-~-The Cow of Darkness-~-

I wouldn't really call it "refracted", it's more a notion of incoherent scattering. In other words, "specular" means "not scattered", whereas refraction *is* a form of local specular reflection.

If you're looking at light hitting the surface as a wave that's encountering a change in IOR, then refraction is correct. Fresnel's laws say that some of the wave is reflected and some is refracted -- those are the two options.
For the reflected portion of the light wave, the angle of incidence and angle of reflection are always equal, which makes it a "specular reflection". This light can't be discoloured by the surface due to absorption, because it never enters the surface.

The rest of the wave (the part that isn't reflected) only has one other option - to be refracted (i.e. transmitted through the IOR boundary). The angle of transmission is bent slightly (meaning it's not "specular"), though this is irrelevant to us when rendering solids.
Once this light has been refracted/transmitted into the opaque object, then scattering/diffusion/absorption can occur. It bounces around inside the object, mostly being absorbed but with parts of it managing to make it back to the surface again to be re-emitted in some random direction.

So it's also valid to say that diffuse lighting equations account for scattered/diffuse light, but scattered/diffused light is refracted light (the only way that light can get into the diffuser, assuming it's not emissive, is to be transmitted/refracted through it's surface).

The Lambert diffuse model ignores specular reflection (all light is refracted/transmitted into the surface), it's then assumed to be perfectly diffused (every possible exitance angle has equal probability), and if you use a white "diffuse texture", then it's assumed that no absorption occurs and that all of this refracted light eventually makes it back out.
Likewise, the Phong specular model ignores diffusion/refraction (all light is reflected off the surface without entering it at all).
To account for all of the light that hits the surface - the reflected portion and the refracted/transmitted portion, you need to combine both these BRDF's together (or use another BRDF that does account for both "diffuse" and "specular" light).

During the diffusion process inside the surface, it's also usually assumed that the polarisation of this light also becomes randomly distributed (it becomes "unpolarized" light, or has mixed polarisation). Whereas on the other hand, reflected light doesn't really interact with the surface, so it's assume that it's polarization is essentially unchanged. Most renderers ignore polarization though, and simply assume that all light is an equal mix of all possible polarizations.


The Lambert diffuse model ignores specular reflection (all light is refracted/transmitted into the surface), it's then assumed to be perfectly diffused (every possible exitance angle has equal probability), and if you use a white "diffuse texture", then it's assumed that no absorption occurs and that all of this refracted light eventually makes it back out.

And we come full circle!

-~-The Cow of Darkness-~-

Lout(y) = Integral( BRDF(x,y) * Visibility(x) * Lin(x) * cos(angle between x and normal) * dx ) over hemisphere

Energy conservation it's just

Integral( Lout(x) * dx ) <= Integral( Lin(x) * dx ) (here out and in flux density values are)

You can substitute constant Lin and Visibility equaling to 1. And in the case of diffuse term BRDF is just albedo.

It'll be

Integral( Lout(x) * dx ) <= Integral( Lin(x) * dx ) (condition of not emission)

Integral( Integral( BRDF(x,y) * Visibility(x) * Lin(x) * cos(x,n) * dx ) * dy ) <= Integral( 1 * dx )

Integral( BRDF(x,y) * 1 * 1 * cos(x,n) * dx ) * Integral( 1 * dy) <= 2 * Pi

Integral( BRDF(x,y) * cos(x,n) * dx ) * Integral( 1 * dy) <= 2 * Pi

diffuse BRDF is just constant

Integral(a * cos(x,n) * dx ) * 2 * Pi <= 2 * Pi

a * Integral(cos(x,n) * dx ) <= 1

a * Pi <= 1

a <= 1 / Pi

it's constraint for albedo

Like this way you can check different BRDF.

And also when you use direct light source in Integral over hemisphere its integration is changed by computing by single ray via delta function.

Lin(x) = delta(xlight directoin - x) * c, where c is flux density of light source, being measured in Watt / m2 units, and delta func is measured steradian-1.

Then

Lout(y) = Integral( BRDF(x,y) * Visibility(x) * Lin(x) * cos(x,n) * dx )

Lout(y) = Integral( BRDF(x,y) * Visibility(x) * delta(xlight directoin - x) * c * cos(x,n) * dx )

Lout(y) = BRDF(xlight directoin,y) * Visibility(xlight directoin) * c * cos(xlight directoin,n)

where Visibility(xlight directoin) is filtered sample from shadow map (for example).

This topic is closed to new replies.

Advertisement