STATE_light_set_ambient

 

 


   Each source of light is combined of three different channels, they are
   called Ambient, Diffuse and specular. 
   Ambient light:
  		Ambient light is light that doesn't come from any particular direction
  		Objects illuminated by ambient light are evenly lit on all surfaces.
  		For example if we create a room with a few light sources then even
  		if all the light sources are turned off we will still have some light in the room.		
  		The ambient channel used to simulate this non-directional environment light
   Diffuse light:
  		Diffuse light comes from a particular direction but is reflected evenly of the surface		
  		A good example of a diffuse light source is fluorescent lighting.
  
   Every source light is actually a combination of the three type of lights
   Feel free to play with these values till you get the desired results.
   The rule is that if it looks good then it is correct..	
   The resulted lighting is a combination of the material characteristic and the type of light
   For controlling the material light properties see STATE_polygon_set_ambient(), STATE_group_set_ambient(), STATE_object_set_ambient()
  
   The given value should be a positive number or zero.
   The default is one. Common values are in the range of 0 to 10 
   Examples:
   A)
  		STATE_light_set_ambient(my_light, 1);   the default
   B)
  		STATE_light_set_ambient(my_light, 2.8);   A very strong ambient lighting.
   C)
  		STATE_light_set_ambient(my_light, 0);   Shutting off the ambient channel
  											     It is better by not including the ambient light
  											     flag when calling STATE_light_set_type_of_light()
  
   The same goes for the diffuse and specular lighting.

 

 

Go to page 1      Select API

 

Copyright © 2007 3DSTATE Corporation. www.3dstate.com