POV-Ray : Documentation : 2.5.3.1 Ambient
  POV-Ray 3.6 Documentation Online View  
2.5.3 Finish   2.5.3.2 Diffuse Reflection Items

2.5.3.1 Ambient

The light you see in dark shadowed areas comes from diffuse reflection off of other objects. This light cannot be directly modeled using ray-tracing. However we can use a trick called ambient lighting to simulate the light inside a shadowed area.

Ambient light is light that is scattered everywhere in the room. It bounces all over the place and manages to light objects up a bit even where no light is directly shining. Computing real ambient light would take far too much time, so we simulate ambient light by adding a small amount of white light to each texture whether or not a light is actually shining on that texture.

This means that the portions of a shape that are completely in shadow will still have a little bit of their surface color. It is almost as if the texture glows, though the ambient light in a texture only affects the shape it is used on.

The ambient keyword controls the amount of ambient light. Usually a single float value is specified even though the syntax calls for a color. For example a float value of 0.3 gets promoted to the full color vector <0.3,0.3,0.3,0.3,0.3> which is acceptable because only the red, green and blue parts are used.

The default value is 0.1 which gives very little ambient light. The value can range from 0.0 to 1.0. Ambient light affects both shadowed and non-shadowed areas so if you turn up the ambient value you may want to turn down the diffuse and reflection values.

Note: that this method does not account for the color of surrounding objects. If you walk into a room that has red walls, floor and ceiling then your white clothing will look pink from the reflected light. POV-Ray's ambient shortcut does not account for this. There is also no way to model specular reflected indirect illumination such as the flashlight shining in a mirror.

You may color the ambient light using one of two methods. You may specify a color rather than a float after the ambient keyword in each finish statement. For example

   finish { ambient rgb <0.3,0.1,0.1> } //a pink ambient

You may also specify the overall ambient light source used when calculating the ambient lighting of an object using the global ambient_light setting. The formula is given by Ambient = Finish_Ambient * Global_Ambient_Light_Source See section "Ambient Light" for details.

2.5.3 Finish   2.5.3.2 Diffuse Reflection Items


Copyright 2003-2021 Persistence of Vision Raytracer Pty. Ltd.