SoImageFileSampler

InventorModule
author MeVis Medical Solutions AG
package MeVisLab/Standard
dll SoImageSamplers
definition SoImageSamplers.def
see also SoVertexShader, SoFragmentShader, SoMLSampler2D
keywords 2D, 3D, cubemap, dds, hdr, texture, array

Purpose

The SoImageFileSampler module allows to load an image file as a texture sampler for a SoFragmentShader. In addition it allows load cube map textures from a “cross” image, see Create Cube Map From Cross.

It supports (at least) the following file formats:

*.dds - Direct Draw Surface (2D, 3D and cube maps)
*.hdr - High Dynamic Range float images
*.png
*.jpg, *.jpe
*.pnm, *.ppm, *.pgm
*.jpe
*.bmp
*.tif
*.tiff
*.dcm, *.dicom
*.mlimage

Usage

See the example network.

Tips

Note that images are loaded on demand, so the image will only get loaded if the sampler is actually used in a shader.

Windows

Default Panel

../../../Modules/Inventor/SoImageSamplers/mhelp/Images/Screenshots/SoImageFileSampler._default.png

Output Fields

self

name: self, type: SoNode

Parameter Fields

Visible Fields

Name

name: name, type: String

Name of the sampler in the shader.

Enable Border

name: enableBorder, type: Bool, default: FALSE

Enables a border.

Border Color

name: borderColor, type: Vector4, default: 0 0 0 0

The border color.

Min Filter

name: minFilter, type: Enum, default: LINEAR

Values:

Title Name
Nearest NEAREST
Linear LINEAR
Nearest Mipmap Nearest NEAREST_MIPMAP_NEAREST
Nearest Mipmap Linear NEAREST_MIPMAP_LINEAR
Linear Mipmap Nearest LINEAR_MIPMAP_NEAREST
Linear Mipmap Linear LINEAR_MIPMAP_LINEAR

Mag Filter

name: magFilter, type: Enum, default: LINEAR

Values:

Title Name
Nearest NEAREST
Linear LINEAR
Nearest Mipmap Nearest NEAREST_MIPMAP_NEAREST
Nearest Mipmap Linear NEAREST_MIPMAP_LINEAR
Linear Mipmap Nearest LINEAR_MIPMAP_NEAREST
Linear Mipmap Linear LINEAR_MIPMAP_LINEAR

Wrap S

name: wrapS, type: Enum, default: REPEAT

Values:

Title Name
Repeat REPEAT
Clamp CLAMP
Clamp To Edge CLAMP_TO_EDGE
Clamp To Border CLAMP_TO_BORDER
Mirrored Repeat MIRRORED_REPEAT

Needs Texture Coordinates

name: needsTextureCoordinates, type: Bool, default: TRUE

Wrap T

name: wrapT, type: Enum, default: REPEAT

Values:

Title Name
Repeat REPEAT
Clamp CLAMP
Clamp To Edge CLAMP_TO_EDGE
Clamp To Border CLAMP_TO_BORDER
Mirrored Repeat MIRRORED_REPEAT

Wrap R

name: wrapR, type: Enum, default: REPEAT

Values:

Title Name
Repeat REPEAT
Clamp CLAMP
Clamp To Edge CLAMP_TO_EDGE
Clamp To Border CLAMP_TO_BORDER
Mirrored Repeat MIRRORED_REPEAT

Use Texture Arrays

name: useTextureArrays, type: Bool, default: FALSE

Enables usage of texture arrays instead of a 3D textures.

Create Cube Map From Cross

name: createCubeMapFromCross, type: Bool, default: FALSE

Assumes that the 2D image contains a cross image that can be converted to a cube map.

Create Seamless Cube Map

name: createSeamlessCubeMap, type: Bool, default: FALSE

If true, a seamless cube map sampler is created. Otherwise the interpolation stops at the face borders.

Texture Size X

name: textureSizeX, type: Integer, persistent: no

Output of the size in x direction.

Texture Size Y

name: textureSizeY, type: Integer, persistent: no

Output of the size in y direction.

Texture Size Z

name: textureSizeZ, type: Integer, persistent: no

Output of the size in z direction.

Texture Num Levels

name: textureNumLevels, type: Integer, persistent: no

Number of MIP MAP levels in the loaded texture.

Texture Is Cube Map

name: textureIsCubeMap, type: Bool, persistent: no

Indicates whether the loaded texture contains a cube map.

Texture Is3D

name: textureIs3D, type: Bool, persistent: no

Indicates whether the loaded texture is 3D.

Texture Is Valid

name: textureIsValid, type: Bool, persistent: no

Indicates whether the loaded texture is valid.

Filename

name: filename, type: String

The absolute filename of the image to load.

Hidden Fields

use16BitFloat

name: use16BitFloat, type: Bool, default: TRUE

textureIsCompressed

name: textureIsCompressed, type: Bool, persistent: no