MultiTexture
Overview
MultiTexture applies several individual textures to a single geometry node, enabling a variety of visual effects that include light mapping and environment mapping. MultiTexture can contain zero or more ImageTexture, MovieTexture, PixelTexture, ComposedCubeMapTexture, GeneratedCubeMapTexture, ImageCubeMapTexture, ComposedTexture3D, ImageTexture3D, and PixelTexture3D nodes. Texture maps have a 2D coordinate system (s, t) horizontal and vertical, with (s, t) texture-coordinate values in range [0.0, 1.0] for opposite corners of the image.
The MultiTexture node belongs to the Texturing component and requires at least level 2, its default container field is texture. It is available from X3D version 3.0 or higher.
Hierarchy
1
2
3
4
+ X3DNode
+ X3DAppearanceChildNode
+ X3DTextureNode
+ MultiTexture
Fields
SFNode [in, out] metadata NULL [X3DMetadataObject]
Information about this node can be contained in a MetadataBoolean, MetadataDouble, MetadataFloat, MetadataInteger, MetadataString or MetadataSet node.
Hint
SFString [in, out] description “”
Author-provided prose that describes intended purpose of the url asset.
Hint
- Many XML tools substitute XML character references for special characters automatically if needed within an attribute value (such as & for & ampersand character, or " for “ quotation-mark character).
SFColor [in, out] color 1 1 1 [0,1]
The color field defines the RGB base values for mode operations.
Hint
SFFloat [in, out] alpha 1 [0,1]
The alpha field defines the alpha (1-transparency) base value for mode operations.
MFString [in, out] mode [ ]
mode field indicates the type of blending operation, both for color and for alpha channel.
Hints
- Include the same number of mode values as textures, otherwise the default value MODULATE is added for each remaining stage.
- X3D Architecture Table 18.3 Multitexture modes for further details.
Warning
- Do not wrap extra quotation marks around these SFString enumeration values, since “quotation” “marks” are only used for MFString values.
MFString [in, out] source [ ]
source field determines whether each image source is treated as DIFFUSE, SPECULAR or a multiplicative FACTOR. Empty string value “” indicates that no source modifier is applied for that stage.
Hints
- Include the same number of source values as textures, otherwise the default of no source interpretation is applied for each remaining stage.
- X3D Architecture Table 18.4 Values for the source field for further details.
MFString [in, out] function [ ]
function operators COMPLEMENT or ALPHAREPLICATE can be applied after the mode blending operation. Empty string value “” indicates that no function operation is applied for that stage.
Hints
- Include the same number of function values as textures, otherwise the default of no function operation is applied for each remaining stage.
- X3D Architecture Table 18.5 Values for the function field for further details.
MFNode [in, out] texture [ ] [X3DTextureNode]
Contained texture nodes (ImageTexture, MovieTexture, PixelTexture) that map image(s) to surface geometry, defining each of the different texture channels.
Hints
- If texture node is NULL or unspecified, corresponding Shape geometry for this Appearance is not textured.
- X3D Scene Authoring Hints, Images
- X3D Architecture 18 Texturing component
- X3D Architecture 33 Texturing3D component
Warning
- MultiTexture may not contain another MultiTexture node.
Advice
Hints
- Insert Shape and Appearance nodes before adding texture.
- Texture mapping
- Multitexturing is accomplished using MultiTexture, MultiTextureCoordinate and MultiTextureTransform nodes.
- Texture coordinates are reapplied (or else recomputed if textureTransform field initially NULL) whenever the corresponding vertex-based geometry changes.
- X3D Texturing component Figure 18.2 Lightmap example
- X3D Texturing component Table 18.2: Comparison of single texture and multitexture attributes
- MultiTexture does not need to be included in LoadSensor watchList since any child ImageTexture and MovieTexture nodes of interest can be handled separately.
Warnings
- The number of textures to be blended may have a significant impact on performance, depending on available graphics hardware capabilities.
- MultiTexture may not contain another MultiTexture node.