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

<vizfx>.addAmbientCubeEffect

Create a directional ambient effect using a cube map

<vizfx>.addAmbientCubeEffect(  
texture  
)  
texture
A cube map <texture> object.

Remarks

Creates an ambient light effect that can be applied to a <composer> or <node>. The effect uses the normal vector of the surface to look up the ambient color within the cube map texture. This is can be used with low frequency cube maps and applied to dynamic objects to provide more realistic ambient lighting.

Return Value

<effect> object

Example

# Create ambient cube map effect 
cubemap = viz.addEnvironmentMap('ambient.png')
effect = vizfx.addAmbientCubeEffect(cubemap)

# Apply to default composer (replaces default ambient effect)
vizfx.getComposer().addEffect(effect)

See also

<vizfx>.addAmbientEffect
<vizfx>.setAmbientColor
<vizfx>.getAmbientColor
<vizfx>.getComposer