Class SoEnvironmentMap

All Implemented Interfaces:
SafeDisposable

public class SoEnvironmentMap extends SoNode
Environment map node. This node describes an environment map lighting attribute.

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:
  • Field Details Link icon

    • filenames Link icon

      public final SoMFFilePathString 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 by SoInput 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 the SoEnvironmentMap node was read. For example, if an SoEnvironmentMap 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 by SoInput).

    • imagePosX Link icon

      public final SoSFImage imagePosX
      Contains an in-memory representation of the environment map. The image is set programmatically using the methods provided by SoSFImage.
    • imagePosY Link icon

      public final SoSFImage imagePosY
    • imagePosZ Link icon

      public final SoSFImage imagePosZ
    • imageNegX Link icon

      public final SoSFImage imageNegX
    • imageNegY Link icon

      public final SoSFImage imageNegY
    • imageNegZ Link icon

      public final SoSFImage imageNegZ
    • intensity Link icon

      public final SoSFFloat intensity
      Intensity of the environment. Default is 0.2.
  • Constructor Details Link icon

    • SoEnvironmentMap Link icon

      public SoEnvironmentMap()