Open Inventor Release 2024.2.0
 
Loading...
Searching...
No Matches
Creating Textured Objects

Using textures, you can create a table with a wood grain, an orange with a dimpled, shiny surface, and a field of grass. To do so, first create wood, orange peel, and grass textures and then apply the textures to the various shape objects. Texture Mapping contrasts two sets of objects: the objects on the right use texture mapping, and the objects on the left do not use textures.

Texture Mapping

What Is a Texture Map?

2D Texture

A texture map is a 2D image that is applied to a surface of a geometric object. It is an array of pixel information that is read from a file or from memory. Its coordinates are normalized to range from 0.0 to 1.0 in both the s (horizontal) and t (vertical) directions. If the texels in the texture image do not correspond exactly to pixels on the screen, Open Inventor uses a filtering process to cover the polygon properly.

3D Texture

A 3D texture map is similar to a 2D texture map, but with three dimensions. This is a 3D array of texel information that is read from files or from memory. Its coordinates are normalized to range from 0.0 to 1.0 in all three directions: s (horizontal), t (vertical), and r (depth).

Cube Map Texture

Cube map textures are a set of six two-dimensional texture UserGuide_Images mapped onto the six faces of a cube centered at the origin. The texture coordinates (s, t, r) are used as a direction vector pointing from the origin. The greatest coordinate is used to select the face and the two others to select a texel from that face. Cube maps are well suited for mapping a reflection of the environment onto an object. (This is also possible using sphere mapping (SoTextureCoordinateEnvironment), but only with a specially distorted image.)

Nodes Used for Texture Mapping

This section describes use of the following node classes:

SoTexture2 specifies a 2D texture map to be used and associated parameters for texture mapping.
SoTextureCoordinate2 explicitly defines the set of 2D texture coordinates to be used by subsequent vertex shapes.
SoTextureCoordinateBinding specifies how the current texture coordinates are to be bound to subsequent shape nodes.
SoTextureCoordinatePlane SoTextureCoordinateEnvironment allow you to use a function to map from spatial coordinates to texture coordinates.
SoTextureCoordinateDefault turns off any previous texture-coordinate function so that all following shapes use their default texture coordinates.
SoTexture2Transform defines a 2D transformation for the texture map.