Click or drag to resize
SoTexture3 Class

3D texture mapping node.

Inheritance Hierarchy

Namespace: OIV.Inventor.Nodes
Assembly: OIV.Inventor (in OIV.Inventor.dll) Version: 2024.2.2.0 (10.16.2.0)
Syntax
public class SoTexture3 : SoTexture

The SoTexture3 type exposes the following members.

Constructors
  NameDescription
Public methodSoTexture3

Creates a texture node with default settings.

Top
Methods
  NameDescription
Public methodAffectsState

Returns true if a node has an effect on the state during traversal.

(Inherited from SoNode.)
Public methodCallback
(Inherited from SoTexture.)
Public methodCopy
Calls Copy(false).
(Inherited from SoNode.)
Public methodCopy(Boolean)

Creates and returns an exact copy of the node.

(Inherited from SoNode.)
Public methodCopyFieldValues(SoFieldContainer)
Calls CopyFieldValues(fc, false).
(Inherited from SoFieldContainer.)
Public methodCopyFieldValues(SoFieldContainer, Boolean)

Copies the contents of fc's fields into this object's fields.

(Inherited from SoFieldContainer.)
Public methodDispose
Releases all resources used by SoDisposable.
(Inherited from SoDisposable.)
Public methodDistribute
(Inherited from SoNode.)
Public methodDoAction
Public methodEnableNotify

Notification at this Field Container is enabled (if flag == true) or disabled (if flag == false).

(Inherited from SoFieldContainer.)
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodFieldsAreEqual

Returns true if this object's fields are exactly equal to fc's fields.

(Inherited from SoFieldContainer.)
Public methodGet

Returns the values of the fields of this object in the Open Inventor ASCII file format in the given string.

(Inherited from SoFieldContainer.)
Public methodGetAllFields

Returns a list of fields, including the eventIn's and eventOut's.

(Inherited from SoFieldContainer.)
Public methodGetAlternateRep

This method is called by actions to allow the node to provide an "alternate representation" when appropriate (typically depending on the action type).

(Inherited from SoNode.)
Public methodGetBitmapFileType

Gets the texture file format.

(Inherited from SoTexture.)
Public methodGetBoundingBox
(Inherited from SoNode.)
Public methodGetEventIn

Returns a the eventIn with the given name.

(Inherited from SoFieldContainer.)
Public methodGetEventOut

Returns the eventOut with the given name.

(Inherited from SoFieldContainer.)
Public methodGetField

Returns a the field of this object whose name is fieldName.

(Inherited from SoFieldContainer.)
Public methodGetFieldName

Returns the name of the given field in the fieldName argument.

(Inherited from SoFieldContainer.)
Public methodGetFields

Appends references to all of this object's fields to resultList, and returns the number of fields appended.

(Inherited from SoFieldContainer.)
Public methodGetHashCode
Overrides GetHashCode().
(Inherited from SoNetBase.)
Public methodGetMatrix
(Inherited from SoNode.)
Public methodGetName

Returns the name of an instance.

(Inherited from SoBase.)
Public methodGetPrimitiveCount
(Inherited from SoNode.)
Public methodGetRenderEngineMode

Returns the supported Render engine mode.

(Inherited from SoNode.)
Public methodGetRenderUnitID
(Inherited from SoNode.)
Public methodGetStringName (Inherited from SoBase.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodGLRender
Public methodGLRenderBelowPath
(Inherited from SoNode.)
Public methodGLRenderInPath
(Inherited from SoNode.)
Public methodGLRenderOffPath
(Inherited from SoNode.)
Public methodGrabEventsCleanup
(Inherited from SoNode.)
Public methodGrabEventsSetup
(Inherited from SoNode.)
Public methodHandleEvent
(Inherited from SoNode.)
Public methodHasDefaultValues

Returns true if all of the object's fields have their default values.

(Inherited from SoFieldContainer.)
Public methodIsBoundingBoxIgnoring

This method is used by getBoundingBox action traversal to know if the current node must be traversed or not, ie the bounding should be ignored.

(Inherited from SoNode.)
Public methodIsNotifyEnabled

Notification is the process of telling interested objects that this object has changed.

(Inherited from SoFieldContainer.)
Public methodIsOverride

Returns the state of the override field.

(Inherited from SoTexture.)
Public methodIsSynchronizable

Gets the ScaleViz synchronizable state of this object.

(Inherited from SoBase.)
Public methodPick
(Inherited from SoNode.)
Public methodRayPick
(Inherited from SoNode.)
Public methodSearch
(Inherited from SoNode.)
Public methodSet

Sets one or more fields in this object to the values specified in the given string, which should be a string in the Open Inventor file format.

(Inherited from SoFieldContainer.)
Public methodSetBitmapFileType

Sets the texture file format.

(Inherited from SoTexture.)
Public methodSetName (Inherited from SoBase.)
Public methodSetOverride

Set the state of the override field.

(Inherited from SoTexture.)
Public methodSetSynchronizable

Sets this to be a ScaleViz synchronizable object.

(Inherited from SoBase.)
Public methodSetToDefaults

Sets all fields in this object to their default values.

(Inherited from SoFieldContainer.)
Public methodToString
Converts this SoBase structure to a human readable string.
(Inherited from SoBase.)
Public methodTouch

Marks an instance as modified, simulating a change to it.

(Inherited from SoNode.)
Public methodWrite
(Inherited from SoNode.)
Top
Properties
  NameDescription
Public propertyblendColor

Color used for BLEND model.

(Inherited from SoTexture.)
Public propertyborderColor

Defines border color used for border texture filtering.

(Inherited from SoTexture.)
Public propertyenableBorder

Enables borders for textures.

(Inherited from SoTexture.)
Public propertyenableCompressedTexture

Enables storage of textures on the graphics board in compressed form.

(Inherited from SoTexture.)
Public propertyfilenames

Names of file(s) from which to read texture image(s).

Public propertyimages

Contains an in-memory representation of the texture map.

Public propertyinternalFormat

Internal format for texture storage.

(Inherited from SoTexture.)
Public propertyIsDisposable
ISafeDisposable interface implementation.
(Inherited from SoDisposable.)
Public propertylayout

Indicates whether the data layout is a volumetric texture VOLUME or an array of bi-dimensional textures ARRAY.

Public propertymagFilter

Specifies the OpenGL magFilter.

(Inherited from SoTexture.)
Public propertymaxAnisotropy

Specifies on a per-texture object basis, the maximum degree of anisotropy to account for in texture filtering.

(Inherited from SoTexture.)
Public propertyminFilter

Specifies the OpenGL minFilter.

(Inherited from SoTexture.)
Public propertymodel

Specifies how to map texture onto surface.

(Inherited from SoTexture.)
Public propertyUserData
Gets or sets the user data to be contained by the field container.
(Inherited from SoFieldContainer.)
Public propertywrapR

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

Public propertywrapS

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

(Inherited from SoTexture.)
Public propertywrapT

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

Top
Remarks

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

The texture can be read from the file(s) specified by the OIV.Inventor.Nodes.SoTexture3.filenames field. Once the texture has been read, the OIV.Inventor.Nodes.SoTexture3.images 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 first value of the OIV.Inventor.Nodes.SoTexture3.filenames field to an empty string ("").

Textures can also be specified in memory by setting the OIV.Inventor.Nodes.SoTexture3.images field to contain the texture data. Doing so resets the OIV.Inventor.Nodes.SoTexture3.filenames field to the empty string.

Simply put, a 3D texture is a set of well-arranged 2D textures. Typically, 3D textures represent a set of image-slices of a given volume of data, and are used for mapping onto pieces of geometry. Note that this is different from direct volume rendering in that 3D textures need to be mapped onto a piece of geometry.

OpenGL requires all images in a 3D texture to have the same dimensions, and each dimension (X, Y, and Z) needs to be a power of 2. Also, images must have the same number of components (grayscale, grayscale with transparency, RGB, or RGB with transparency).

  • Images that do not have the same number of components as the first image are recomputed to have the same number of components. At best, there is no loss of quality. At worst, the recomputed images may lose colors and/or transparency.

  • If the 2D texture image's width or height is greater than the maximum supported by OpenGL, then the image will be clipped at the maximum texture size.

  • If one or more of the dimensions is not a power of 2, the texture is enlarged (it is never shrunk) to fit the power-of-2 requirement. Note that, unlike 2D textures where a resized texture is actually rescaled, the 3D image is not rescaled. Instead, black pixels are added to the edge of the image.

You should take this into account when setting texture coordinates. If your 3D image is not correctly dimensioned, you may want to consider either applying a ratio to your coordinates or adding an OIV.Inventor.Nodes.SoTexture3Transform node with the field scaleFactor set to compensate.

  • Images that have a different size from the first image are resized (clipped or augmented) to match the size of the first image (which itself may have been resized to satisfy the size requirements of OpenGL).

  • If the number of images (the depth of the 3D texture) is not a power of 2, an error is issued and the nearest power of 2 is chosen. If it is lower, some images are discarded; if it is higher, new images are created and filled with zeros.

The quality of the texturing is affected by the textureQuality field of the OIV.Inventor.Nodes.SoComplexity node. 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.

Transparency Texture images can contain transparency (alpha values less than 1) and modify the transparency of geometry in the scene. Also note that some image file formats, for example JPEG, do not support transparency information (alpha channel).

LIMITATIONS

3D textures are only supported by the following shapes:

Only OIV.Inventor.Nodes.SoIndexedFaceSet shapes automatically compute texture coordinates if they are not specified either by a texture coordinate function (see OIV.Inventor.Nodes.SoTextureCoordinateFunction) or by explicit texture coordinates (see OIV.Inventor.Nodes.SoTextureCoordinate3).

FILE FORMAT/DEFAULT

Texture3 {
filenames ""
enableCompressedTexture false
images 0 0 0 0
wrapS REPEAT
wrapT REPEAT
wrapR REPEAT
model MODULATE
blendColor 0 0 0
enableBorder false
borderColor 0 0 0 1
maxAnisotropy 1.0
minFilter AUTO
magFilter AUTO
useAutoMipmap false
internalFormat AUTO_INTERNAL_FORMAT
layout VOLUME
}

ACTION BEHAVIOR

OIV.Inventor.Actions.SoGLRenderAction, OIV.Inventor.Actions.SoCallbackAction Sets current texture in state. Sets: OIV.Inventor.Elements.SoTextureImage3Element

See Also