<p>The formula you are seeking (and implying with the examples of a match and a lamp) is really a Radiosity formula - at which point we have to stop using the term "ambient light", as with Radiosity, everything (light source and surfaces of all scene objects including) is just energy, only converted to the monitor's RGB values at the last [rendering] stage.</p>

<p>As a 10,000 ft overview, during radiosity, you break up all polygons into patches, and it's the FormFactor portion of the formula that takes care of how much energy of the current patch ends up at the target patch.</p>

<p>Going back to your examples - a match will have different amount of starting energy than a lamp. Also, the distance from the light source to the closet walls vs hall walls will ensure a drastically different amount of energy arriving at those patches (due to the distance falloff).</p>

CC BY-SA 3.0
2017-05-15T22:41:07.660Z
2017-05-15T22:41:07.660Z
RubyNoob
<p>Using an 'ambient light' term in your lighting calculations is an approximation of the indirect light reflected around the scene. Usually it's up to the artist to choose an appropriate value. There isn't really a formula, because the indirect light is dependent on many factors:</p>

<ul>
<li>Light intensity</li>
<li>Light shape</li>
<li>The BRDFs of the surfaces the light will bounce off of</li>
<li>Visibility to the light source (Think the back of a deep cave)</li>
<li>etc.</li>
</ul>

<p>You <em>could</em> use some kind of formula to get an approximate value, based on these factors, but, in my opinion, it's simpler just to do it manually per scene. Or, you can remove it entirely, and use more sophisticated methods to calculate indirect lighting.</p>

CC BY-SA 3.0
2017-05-13T12:52:32.560Z
2017-05-13T12:52:32.560Z
RichieSams
<p>The "Ambient" term more accurately is described as the light emitted by the object itself. While it's not wrong to see it as a constant which approximates indirect lighting, it's still more accurate to call it the former, especially for the thinking process.</p>

<p>As such, the answer depends on your scene. Considering that all objects emit their own "light", there is no way to manually set a global ambient term without sacrificing image quality, as no object will be equally shaded compared to the next one. That causes the brain to perceive it as "wrong looking".</p>

<p>So, there is no formula for ambient, because ambient in the way it has been introduced a few decades ago has no basis in reality. The values are set based on the scenes, to make sure they look "good enough".</p>

<p>Indirect light though, as found in modern graphics engines, can be calculated on the fly and removes the need for a manually set ambient term completely.</p>

<p>In short: For "ambient" they guess, for "indirect light" they calculate.</p>

CC BY-SA 3.0
2017-05-15T12:00:36.697Z
2017-05-15T12:00:36.697Z
z0rberg's
<p>I understand that ambient light is light that occurs a result of light from a given source refecting off an infinite number of points in a scene, thereby illuminating all objects in the scene uniformly and explains why areas not directly illuminated by a light source in a scene aren't pitch black.</p>

<p>So I guess ambient light gives everything in the scene the same basic "brightness". But how does one determine this value? I presume the ambient light is proportional to the primary light source intensity (a floodlight in a bedroom will surely produce more ambient light than a lit match in the same room) and inversely proportional to the scene size (a lamp in a closet surely produces more ambient light than a lamp in a hall). Is there a formula that gives ambient light "brightness" as a function of scene volume, light source intensity, and any other variables please?</p>

<p>Please excuse my naivety, as I'm a noob to computer graphics, and only a hobbyist at that.</p>

<rendering><lighting>
Formula for the ambient light intensity of a scene?
LOVETOLEARN
# Formula for the ambient light intensity of a scene?

(Asked by: username_0 on 2017-05-12)

I understand that ambient light is light that occurs a result of light from a given source refecting off an infinite number of points in a scene, thereby illuminating all objects in the scene uniformly and explains why areas not directly illuminated by a light source in a scene aren't pitch black.

So I guess ambient light gives everything in the scene the same basic "brightness". But how does one determine this value? I presume the ambient light is proportional to the primary light source intensity (a floodlight in a bedroom will surely produce more ambient light than a lit match in the same room) and inversely proportional to the scene size (a lamp in a closet surely produces more ambient light than a lamp in a hall). Is there a formula that gives ambient light "brightness" as a function of scene volume, light source intensity, and any other variables please?

Please excuse my naivety, as I'm a noob to computer graphics, and only a hobbyist at that.

**Tags:** rendering, lighting


---

## 3 answers

### Answer by username_1 on 2017-05-15. Score: 2 | Accepted answer

The formula you are seeking (and implying with the examples of a match and a lamp) is really a Radiosity formula - at which point we have to stop using the term "ambient light", as with Radiosity, everything (light source and surfaces of all scene objects including) is just energy, only converted to the monitor's RGB values at the last [rendering] stage.

As a 10,000 ft overview, during radiosity, you break up all polygons into patches, and it's the FormFactor portion of the formula that takes care of how much energy of the current patch ends up at the target patch.

Going back to your examples - a match will have different amount of starting energy than a lamp. Also, the distance from the light source to the closet walls vs hall walls will ensure a drastically different amount of energy arriving at those patches (due to the distance falloff).


---

### Answer by username_2 on 2017-05-13. Score: 10

Using an 'ambient light' term in your lighting calculations is an approximation of the indirect light reflected around the scene. Usually it's up to the artist to choose an appropriate value. There isn't really a formula, because the indirect light is dependent on many factors:

* Light intensity
* Light shape
* The BRDFs of the surfaces the light will bounce off of
* Visibility to the light source (Think the back of a deep cave)
* etc.

You *could* use some kind of formula to get an approximate value, based on these factors, but, in my opinion, it's simpler just to do it manually per scene. Or, you can remove it entirely, and use more sophisticated methods to calculate indirect lighting.


---

### Answer by username_3 on 2017-05-15. Score: 1

The "Ambient" term more accurately is described as the light emitted by the object itself. While it's not wrong to see it as a constant which approximates indirect lighting, it's still more accurate to call it the former, especially for the thinking process.

As such, the answer depends on your scene. Considering that all objects emit their own "light", there is no way to manually set a global ambient term without sacrificing image quality, as no object will be equally shaded compared to the next one. That causes the brain to perceive it as "wrong looking".

So, there is no formula for ambient, because ambient in the way it has been introduced a few decades ago has no basis in reality. The values are set based on the scenes, to make sure they look "good enough".

Indirect light though, as found in modern graphics engines, can be calculated on the fly and removes the need for a manually set ambient term completely.

In short: For "ambient" they guess, for "indirect light" they calculate.


---

