Class EnvironmentMapEffect

java.lang.Object
com.luciad.maps.effects.EnvironmentMapEffect
All Implemented Interfaces:
AutoCloseable

public final class EnvironmentMapEffect extends Object implements AutoCloseable
Graphics effect that places an environment map around a 3D scene, in two independent roles:

  • Skybox: background imagery seen in all directions. Drawn behind everything, so high-resolution imagery (typically 2K to 4K) is recommended. When set, it takes priority over the AtmosphereEffect.
  • Reflection map: the environment reflected by physically based rendering (PBR) objects and the source of their image-based lighting. Never shown as background. Low-resolution imagery (typically 256 to 512 pixels) is recommended here: it reduces the higher memory cost per pixel of the recommended HDR imagery, and the lower detail is less noticeable in reflections.

Both roles are optional and independent, and are held by an immutable EnvironmentMapModel. Read the current setup with getModel and change it by building a new model and passing it to setModel. A common setup is a reflection map with no skybox, letting the atmosphere provide the visible background while objects still reflect a detailed environment. By default the map installs a neutral gray reflection map and no skybox.

The effect is only applied on 3D views. On a 2D view it has no effect.

You cannot create an EnvironmentMapEffect. Instead, you can retrieve it from GraphicsEffects#getEnvironmentMap.

Since:
2026.1
  • Method Details

    • finalize

      protected void finalize()
      Overrides:
      finalize in class Object
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
    • isEnabled

      public boolean isEnabled()
      Returns whether the environment map effect is enabled.
      Returns:
      whether the environment map effect is enabled.
    • setEnabled

      public void setEnabled(boolean enabled)
      Sets whether the environment map effect is enabled.

      The default is true. Disabling the effect keeps the configured model, but stops painting the skybox and stops lighting PBR content with the reflection map.

      Parameters:
      enabled - true to enable the effect or false to disable it.
    • getModel

      @NotNull public EnvironmentMapModel getModel()
      Returns the model that configures the skybox and reflection map.
      Returns:
      the model that configures the skybox and reflection map.
    • setModel

      public void setModel(@NotNull EnvironmentMapModel model) throws NullPointerException
      Sets the model that configures the skybox and reflection map.
      Parameters:
      model - the model that configures the skybox and reflection map.
      Throws:
      NullPointerException - when the model is null.