Class SoEnvironmentMap
- All Implemented Interfaces:
SafeDisposable
An environment map is defined by a texture that is used to simulate the reflection of the environment on the surface of objects. The node uses a cubemap texture to represent the environment map. The cubemap texture is a 2D texture array with 6 faces, one for each side of a cube.
There are two ways to send the texture to Open Inventor:
- Read the texture from the six image files specified in the
filenames
field. - Specify the textures in memory by setting the the image fields (
imagePosX
, ...) to contain the texture data.
But in all cases, you must specify the images in this order:
- imagePosX (left)
- imagePosY (bottom)
- imagePosZ (back)
- imageNegX (right)
- imageNegY (top)
- imageNegZ (front)
The intensity field specifies the intensity of the environment map.
The material properties and light model also affect how the reflections are computed. Enabling specular reflections and setting the shininess of the material to a high value (or the roughness to a low value) produces mirror-like reflections.
File format/default:
EnvironmentMap {
filenames | "" |
imagePosX | 0 0 0 |
imageNegX | 0 0 0 |
imagePosY | 0 0 0 |
imageNegY | 0 0 0 |
imagePosZ | 0 0 0 |
imageNegZ | 0 0 0 |
intensity | 0.2 |
Action behavior:
SoGLRenderAction
Sets the current environment map parameters to those specified with this node. Subsequent shapes will be rendered using this environment map.
- Since:
- Open Inventor 2025.1
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.openinventor.inventor.nodes.SoNode
SoNode.RenderModes
Nested classes/interfaces inherited from class com.openinventor.inventor.Inventor
Inventor.ConstructorCommand
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal SoMFFilePathString
Names file(s) from which to read the environment map's texture image(s).final SoSFImage
SeeimagePosX
.final SoSFImage
SeeimagePosX
.final SoSFImage
SeeimagePosX
.final SoSFImage
Contains an in-memory representation of the environment map.final SoSFImage
SeeimagePosX
.final SoSFImage
SeeimagePosX
.final SoSFFloat
Intensity of the environment.Fields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class com.openinventor.inventor.nodes.SoNode
affectsState, callback, copy, copy, distribute, doAction, getAlternateRep, getBoundingBox, getByName, getMatrix, getPrimitiveCount, getRenderEngineMode, getRenderUnitID, GLRender, GLRenderBelowPath, GLRenderInPath, GLRenderOffPath, grabEventsCleanup, grabEventsSetup, handleEvent, isBoundingBoxIgnoring, isOverride, pick, rayPick, search, setOverride, touch, write
Methods inherited from class com.openinventor.inventor.fields.SoFieldContainer
copyFieldValues, copyFieldValues, enableNotify, fieldsAreEqual, get, getAllFields, getEventIn, getEventOut, getField, getFieldName, hasDefaultValues, isNotifyEnabled, set, setToDefaults
Methods inherited from class com.openinventor.inventor.misc.SoBase
dispose, getName, isDisposable, isSynchronizable, setName, setSynchronizable
Methods inherited from class com.openinventor.inventor.Inventor
getNativeResourceHandle
-
Field Details
-
filenames
Names file(s) from which to read the environment map's texture image(s). The images are used to create a cube map, which is used to simulate the reflection of the environment on the surface of an object.The standard image file formats are supported. See
SoRasterImageRW
for the list. If the first file is an HDRI file, only this file is used since it has all 6 faces encoded. If the filename is not an absolute path name, the list of directories maintained bySoInput
is searched. If the texture is not found in any of those directories, then the file is searched for relative to the directory from which theSoEnvironmentMap
node was read. For example, if anSoEnvironmentMap
node with a filenames of "../tofu.rgb" is read from /usr/people/bob/models/food.iv, then /usr/people/bob/tofu.rgb will be read (assuming tofu.rgb isn't found in the directories maintained bySoInput
). -
imagePosX
Contains an in-memory representation of the environment map. The image is set programmatically using the methods provided bySoSFImage
. -
imagePosY
SeeimagePosX
. -
imagePosZ
SeeimagePosX
. -
imageNegX
SeeimagePosX
. -
imageNegY
SeeimagePosX
. -
imageNegZ
SeeimagePosX
. -
intensity
Intensity of the environment. Default is 0.2.
-
-
Constructor Details