SoTexture2

InventorModule
genre InventorNodesAutomatic
author Silicon Graphics Inc
package MeVisLab/Standard
definition inventor.def
see also SoMLTexture2

Purpose

The property node SoTexture2 defines a texture map and parameters for that map. This map is used to apply texture to subsequent shapes as they are rendered.

The texture can be read from the file specified by the Filename field. Once the texture has been read, the image field contains the texture data. However, this field is marked so that the image is not written out when the texture node is saved to a file. To disable texturing, set the Filename field to an empty string (“”).

Textures can also be specified in memory by setting the image field to contain the texture data. Doing so resets the filename to an empty string.

If the texture image’s width or height is not a power of 2, or if the image’s width or height exceeds the maximum supported by OpenGL, then the image will be automatically scaled up or down to the next power of 2 or the maximum texture size. For optimal speed, point-sampling is used for scaling; if more accurate resampling is desired, pre-filter images to a power of 2 smaller than the maximum texture size (use the OpenGL glGetIntegerv(GL_MAX_TEXTURE_SIZE...) call to determine the maximum texture size for a specific OpenGL implementation).

The quality of the texturing is influenced by the SoComplexity.textureQuality field. The textureQuality field affects the type of filtering applied to the texture when it must be minified or magnified. The mapping of a particular texture quality value to a specific OpenGL filtering technique is implementation-dependent and varies based on the texturing performance. If mipmap filtering is required, mipmaps are automatically created using the simple box filter.

Windows

Default Panel

../../../Modules/Inventor/InventorBase/mhelp/Images/Screenshots/SoTexture2._default.png

Output Fields

self

name: self, type: SoNode

Parameter Fields

Field Index

Blend Color: Color
Filename: String
image: String
Model: Enum
Wrap S: Enum
Wrap T: Enum

Visible Fields

Filename

name: filename, type: String

Sets the filename of the file from which to read the texture image.

Currently, only .jpg and .gif files are supported. If you need to load a different image format as a texture, refer to SoMLTexture2 or SoImageFileSampler.

Wrap S

name: wrapS, type: Enum, default: REPEAT

Defines how texture coordinates in the S (horizontal) direction are handled if they lie outside the range of 0 to 1.

Values:

Title Name Description
Repeat REPEAT Repeats the texture outside the 0 to 1 texture coordinate range.
Clamp CLAMP Clamps texture coordinates to lie within the 0 to 1 range.

Wrap T

name: wrapT, type: Enum, default: REPEAT

Defines how texture coordinates in the T (vertical) direction are handled if they lie outside the range of 0 to 1.

Values:

Title Name Description
Repeat REPEAT Repeats the texture outside the 0 to 1 texture coordinate range.
Clamp CLAMP Clamps texture coordinates to lie within the 0 to 1 range.

Model

name: model, type: Enum, default: MODULATE

Defines how to map the texture onto a surface.

Values:

Title Name Description
Modulate MODULATE The texture color is multiplied by the surface color.
Decal DECAL The texture color replaces the surface color.
Blend BLEND Blends between the surface color and a specified blend color.

Blend Color

name: blendColor, type: Color, default: 0 0 0

Sets the color used for BLEND model.

Hidden Fields

image

name: image, type: String, persistent: no

Contains an in-memory representation of the texture map. It is either the contents of the file read from filename, an image read directly from an Open Inventor file, or an image set programmatically using the methods provided by SoSFImage.