public class SoBumpMappingProperty extends SoNode
SoFaceSet
, SoQuadMesh
, and SoTriangleStripSet
support bump mapping. Two categories of properties can be defined:
Texture Properties: The format of the bump map texture stored within the SoTexture2
is given by the textureFormat
field. The SoTextureUnit.mappingMethod
field indicates if the texture stored within SoTexture2
node is a bump map texture or not. This texture can be a "height map", which is a grayscale texture of height (TextureFormat.HEIGHT_MAP), or a "normal map", which is a 3-component texture of normals (TextureFormat.NORMAL_MAP) with x, y, and z corresponding to the red, green, and blue components respectively.
If the current SoTexture2
node does not contain a 3-component texture, specifying normal map format will have no bump mapping effect.
For a height map format, only the first component of each pixel is used. A height map texture is converted internally to a normal map.
Each normal in the normal map texture can be expressed either in the space of the object called "modeling space" or in the space of the face called "tangent space". The normalMapSpace
field allows you to specify the desired coordinate system. The tangent space coordinate system is convenient for applying repetitive wrinkle patterns.
Appearance Properties: OpenGL Gouraud lighting is deactivated when a shape is rendered using the bump mapping technique. A pixel shader and a vertex shader are used instead for computing the lighting contribution per pixel according to the normals stored in the normal map.
Depending on the hardware capabilities, the number of passes (maximum 3) necessary to render a shape also depends on the number of lights, brightness of the shape, and texturing (or not) of the shape. In order to select a compromise between rendering quality and rendering performance, several fields are available:
isOnlyClosestLightUsed
: Indicates if only the closest light to the shape is used for the lighting computation. true (default) improves performance by decreasing the number of rendering passes.
isEyeDistanceAttenuation
: Prevents a bumped face from smoothing with camera distance. Setting true reduces performance.
isShadowed
: Activate/deactivate the self-shadow based on the geometric normal. Setting true reduces performance.
File format/default:
BumpMappingProperty {
normalMapSpace | MODEL_SPACE |
isShadowed | false |
isEyeDistanceAttenuation | false |
isOnlyClosestLightUsed | true |
textureFormat | NORMAL_MAP |
Action behavior:
SoGLRenderAction
, SoCallbackAction
Sets the current properties linked to the bump mapping. Sets: SoBumpMappingPropertyElement
See also:
SoTextureUnit
, SoTexture2
, SoAppearancePreserver.Deprecated since Open Inventor 9400
No longer supported.
Modifier and Type | Class and Description |
---|---|
static class |
SoBumpMappingProperty.NormalMapSpaces
Deprecated.
|
static class |
SoBumpMappingProperty.TextureFormats
Deprecated.
|
Inventor.ConstructorCommand
Modifier and Type | Field and Description |
---|---|
static int |
HEIGHT_MAP
Deprecated.
Use
SoBumpMappingProperty.TextureFormats.HEIGHT_MAP instead. |
SoSFBool |
isEyeDistanceAttenuation
Deprecated.
Eye distance attenuation.
|
SoSFBool |
isOnlyClosestLightUsed
Deprecated.
Indicates if only the closest light (relative to the shape) is used or if all lights are used.
|
SoSFBool |
isShadowed
Deprecated.
Activates/deactivates the lighting of unlit areas.
|
static int |
MODEL_SPACE
Deprecated.
Use
SoBumpMappingProperty.NormalMapSpaces.MODEL_SPACE instead. |
static int |
NORMAL_MAP
Deprecated.
Use
SoBumpMappingProperty.TextureFormats.NORMAL_MAP instead. |
SoSFEnum<SoBumpMappingProperty.NormalMapSpaces> |
normalMapSpace
Deprecated.
Specifies in which space normals in the normal map are expressed.
|
static int |
TANGENT_SPACE
Deprecated.
Use
SoBumpMappingProperty.NormalMapSpaces.TANGENT_SPACE instead. |
SoSFEnum<SoBumpMappingProperty.TextureFormats> |
textureFormat
Deprecated.
Indicates if the specified bump map texture in
SoTexture2 is a height map or a normal map. |
VERBOSE_LEVEL, ZeroHandle
Constructor and Description |
---|
SoBumpMappingProperty()
Deprecated.
Constructor.
|
Modifier and Type | Method and Description |
---|---|
static boolean |
isSupported()
Deprecated.
Indicates if bump mapping is supported by your graphics board.
|
affectsState, callback, copy, copy, distribute, doAction, getAlternateRep, getBoundingBox, getByName, getMatrix, getPrimitiveCount, getRenderUnitID, GLRender, GLRenderBelowPath, GLRenderInPath, GLRenderOffPath, grabEventsCleanup, grabEventsSetup, handleEvent, isBoundingBoxIgnoring, isOverride, pick, rayPick, search, setOverride, touch, write
copyFieldValues, copyFieldValues, enableNotify, fieldsAreEqual, get, getAllFields, getEventIn, getEventOut, getField, getFieldName, hasDefaultValues, isNotifyEnabled, set, setToDefaults
dispose, getEXTERNPROTO, getName, getPROTO, isDisposable, isSynchronizable, setName, setSynchronizable
getAddress, getNativeResourceHandle, startInternalThreads, stopInternalThreads
@Deprecated public static final int TANGENT_SPACE
SoBumpMappingProperty.NormalMapSpaces.TANGENT_SPACE
instead.@Deprecated public static final int MODEL_SPACE
SoBumpMappingProperty.NormalMapSpaces.MODEL_SPACE
instead.@Deprecated public static final int HEIGHT_MAP
SoBumpMappingProperty.TextureFormats.HEIGHT_MAP
instead.@Deprecated public static final int NORMAL_MAP
SoBumpMappingProperty.TextureFormats.NORMAL_MAP
instead.public final SoSFEnum<SoBumpMappingProperty.NormalMapSpaces> normalMapSpace
public final SoSFEnum<SoBumpMappingProperty.TextureFormats> textureFormat
SoTexture2
is a height map or a normal map.public final SoSFBool isShadowed
public final SoSFBool isEyeDistanceAttenuation
public final SoSFBool isOnlyClosestLightUsed
public static boolean isSupported()
SoGLExtension
for an example of using SoGLContext
to avoid them.Generated on January 23, 2025, Copyright © Thermo Fisher Scientific. All rights reserved. http://www.openinventor.com