SoImageFileSampler¶
- InventorModule¶
author
package
dll
definition
see also
keywords
Purpose¶
The SoImageFileSampler module allows for loading an image file as a texture sampler for a SoFragmentShader.
In addition, it enables loading cubemap 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 cubemaps)
.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¶
Output Fields¶
self¶
- name: self, type: SoNode¶
Parameter Fields¶
Field Index¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Visible Fields¶
Name¶
- name: name, type: String¶
Sets the name of the sampler in the shader.
Enable Border¶
- name: enableBorder, type: Bool, default: FALSE¶
If checked, the border is part of the texture.
Border Color¶
- name: borderColor, type: Vector4, default: 0 0 0 0¶
Sets the border color.
This is only used if
Enable Borderis unchecked.
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¶
If checked, texture arrays instead of 3D textures are used.
Create Cube Map From Cross¶
- name: createCubeMapFromCross, type: Bool, default: FALSE¶
If checked, the input 2D image is converted to a cubemap.
This assumes that the 2D image contains a cross image.
Create Seamless Cube Map¶
- name: createSeamlessCubeMap, type: Bool, default: FALSE¶
If checked, a seamless cubemap sampler is created. Otherwise, interpolation stops at the face borders.
Texture Size X¶
- name: textureSizeX, type: Integer, persistent: no¶
Shows the size of the texture in the x-direction.
Texture Size Y¶
- name: textureSizeY, type: Integer, persistent: no¶
Shows the size of the texture in the y-direction.
Texture Size Z¶
- name: textureSizeZ, type: Integer, persistent: no¶
Shows the size of the texture in the z-direction.
Texture Num Levels¶
- name: textureNumLevels, type: Integer, persistent: no¶
Shows the number of MIP MAP levels in the loaded texture.
Texture Is Cube Map¶
- name: textureIsCubeMap, type: Bool, persistent: no¶
Shows whether the loaded texture contains a cubemap.
Texture Is3D¶
- name: textureIs3D, type: Bool, persistent: no¶
Shows whether the loaded texture is 3D.
Texture Is Valid¶
- name: textureIsValid, type: Bool, persistent: no¶
Shows whether the loaded texture is valid.
Filename¶
- name: filename, type: String¶
Sets the absolute filename of the image to load.