Vizard 7 » Command Index » Vizard objects » node3d » <node3d>.appearance
7.7

<node3d>.appearance

Set the texture appearance of the geometry

<node3d>.appearance(  
flags  
node = ''  
unit = 0  
op = viz.OP_DEFAULT  
)  
flags
Can be a combination of the following combine, filter, wrap, and generation modes:

Combine Modes

Description

viz.TEXMODULATE

Modulate the texture with underlying material color.

viz.TEXREPLACE

Replace the underlying material color with the texture.

viz.TEXDECAL

Similar to viz.TEXREPLACE, except if the texture contains an alpha channel, it will be used to blend with the underlying material color.

viz.TEXADD

Add the texture to the underlying material color.



Filter Modes

Description

viz.TEXMIPMAP

Linear and mipmap filtering for texture magnification and minification.

viz.TEXLINEAR

Linear filtering for texture magnification and minification.

viz.TEXNEAREST

Nearest filtering for texture magnification and minification.



Wrap Modes

Description

viz.TEXREPEAT

Allow texture coordinates outside [0,1] range.

viz.TEXCLAMP

Clamp texture coordinates to [0,1] range.



Generation Modes

Description

viz.TEXGEN

Automatically generate texture coordinates to simulate sphere mapping (reflective surface).

viz.ENVIRONMENT_MAP

Automatically generate texture coordinates to reflect an environment map (i.e. cube mapping).


node = ''
Name of sub-node to apply changes to
unit = 0
The texture unit to apply the changes to, or viz.AUTO_COMPUTE to apply changes to all available texture units.
op = viz.OP_DEFAULT
Can be viz.OP_DEFAULT to use the nodes default op mode or a combination of the following values:

Op modes

viz.OP_TRAVERSE

When performing an operation on a node, traverse the entire subgraph and process all subnodes as well. This is the default value.

viz.OP_OVERRIDE

When applying attributes, have them override attributes of subnodes.

viz.OP_ROOT

When performing an operation on the node, start at the root transform of the node, instead of the model. Processing the root will include all child Vizard nodes.

Remarks

If subchild is '' then the appearance will be changed on the entire object.

Return Value

None

Example

ball = viz.add('ball.wrl')
ball.appearance(viz.TEXMODULATE)

See also

<node3d>.texture
<node3d>.enable
<node3d>.disable