Vizard 7 » Command Index » Vizard modules » vizfx » <vizfx>.addAmbientEffect
7.7

<vizfx>.addAmbientEffect

Create ambient light effect

<vizfx>.addAmbientEffect(  
color = None # [r,g,b]
)  
color = None
The initial ambient color. Default color is gray (0.5, 0.5, 0.5).

Remarks

Creates an ambient light effect that can be applied to a <composer> or <node>.

Return Value

<effect> object with the following additional methods:

Method

Description

setColor(color)

Set the [r,g,b] ambient color.

getColor()

Get the [r,g,b] ambient color.

Example

# Create blue ambient light effect for model
ambient = vizfx.addAmbientEffect(color=viz.BLUE)
model.apply(ambient)

See also

<vizfx>.addAmbientCubeEffect
<vizfx>.setAmbientColor
<vizfx>.getAmbientColor
<vizfx>.getComposer