3D Lingo Dictionary > A-B > ambient |
![]() ![]() ![]() |
ambient
Syntax
member(whichCastmember
).shader(whichShader
).ambient member(whichCastmember
).model(whichModel
).shader.ambient member(whichCastmember
).model(whichModel
).shaderList{[index
]}.ambient
Description
3D #standard
shader property; indicates how much of each color component of the ambient light in the cast member is reflected by the shader.
For example, if the color of the ambient light is rgb(255, 255, 255)
and the value of the ambient
property of the shader is rgb(255, 0, 0)
, the shader will reflect all of the red component of the light that the shader's colors can reflect. However, it will reflect none of the blue and green components of the light, regardless of the colors of the shader. In this case, if there are no other lights in the scene, the blue and green colors of the shader will reflect no light, and will appear black.
The default value of this property is rgb(63,63,63)
.
Example
This statement sets the ambient
property of the model named Chair to rgb(255, 255, 0)
. Chair will fully reflect the red and green components of the ambient light in the scene and completely ignore its blue component.
member("Room").model("Chair").shader.ambient = rgb(255, 0, 0)
See also
ambientColor
, newLight
, type (light)
, diffuse
, specular (shader)
![]() ![]() ![]() |