Vizard 7 » Command Index » Vizard objects » node3d » <node3d>.texblend
7.6

<node3d>.texblend

Control how much to blend a texture with the previous texture

<node3d>.texblend(  
blend # 0 to 1
node = ''  
unit = 0  
op = viz.OP_DEFAULT  
)  
blend
The percentage to blend with the previous texture.
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

This command controls how much to blend a texture with the previous texture. For example, if the value of blend is 0.7, then 70% of the current texture will be blended with 30% of the previous texture. If unit is 0 then the current texture will be blended with the underlying color of the object by the given percentage. Otherwise the texture unit will be blended with the texture on unit-1.

Return Value

None

Example

#Add some textures
tex1 = viz.addTexture('image1.jpg')
tex2 = viz.addTexture('image2.jpg')

#Add a texture quad
quad = viz.addTexQuad()

#Apply the textures to the quad
quad.texture(tex1)
quad.texture(tex2,'',1)

#Blend 60% of tex2 with 40% of tex1
quad.texblend(0.6,'',1)

See also

<node3d>.texture
<node3d>.appearance