SoTexture2

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

Purpose

This property node 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 the image is not written out when the texture node is written to a file. To turn off 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 the empty string.

If the texture image’s width or height is not a power of 2, or the image’s width or height is greater than 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 maximum speed, point-sampling is used to do the scale; if you want more accurate resampling, 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 maximum texture for a specific OpenGL implementation).

The quality of the texturing is affected by the SoComplexity.textureQuality field. The textureQuality field affects what kind of filtering is done to the texture when it must be minified or magnified. The mapping of a particular texture quality value to a particular 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

Names file from which to read texture image. Currently only .jpg and .gif files are supported. If you need to load a different image format as a texture, have a look at SoMLTexture2 or SoImageFileSampler.

Wrap S

name: wrapS, type: Enum, default: REPEAT

Indicates what to do when texture coordinates in the S (horizontal) direction lie outside the range 0-1.

Values:

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

Wrap T

name: wrapT, type: Enum, default: REPEAT

Indicates what to do when texture coordinates in the T (vertical) direction lie outside the range 0-1.

Values:

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

Model

name: model, type: Enum, default: MODULATE

Specifies how to map texture onto 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

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 Inventor file, or an image set programmatically using the methods provided by SoSFImage.