Vizard 8 » Command Index » Vizard modules » viz » <viz>.addEnvironmentMap
8.0

<viz>.addEnvironmentMap

Add an environment map from the specified base filename

<viz>.addEnvironmentMap(  
filename  
faces = viz.AUTO_COMPUTE  
)  
filename
The base filename without the faces suffix
faces = viz.AUTO_COMPUTE
A list of suffixes to append to the base filename that specifies the [viz.POSITIVE_X, viz.NEGATIVE_X, viz.POSITIVE_Y, viz.NEGATIVE_Y, viz.POSITIVE_Z, viz.NEGATIVE_Z] faces of the environment map. If viz.AUTO_COMPUTE is specified, then the suffixes will be auto-detected using the following common formats:

['_posx','_negx','_posy','_negy','_posz','_negz']
['_right','_left','_up','_down','_front','_back']
['_r','_l','_u','_d','_f','_b']
['_rt','_lf','_up','_dn','_fr','_bk']

Remarks

This command is a shortcut for creating a cubemap texture and loading each face of the cubemap using the specified base filename and faces format.

For example, if the faces of the environment map were stored in the following files:

env_rt.png
env_lf.png
env_up.png
env_dn.png
env_fr.png
env_bk.png

Then the base filename would be specified as:

viz.addEnvironmentMap('env.png')

Return Value

<texture> object

Example

env = viz.addEnvironmentMap('env.png')
node.texture(env)

See also

<node3d>.texture
<viz>.addTexture