Generates an environment map at the given position based on scene's current lighting conditions. From this, it produces multiple levels of specular maps and spherical harmonic coefficients than can be used with
ImageBasedLighting
for models or tilesets.
Name | Type | Description |
---|---|---|
options |
DynamicEnvironmentMapManager.ConstructorOptions | optional An object describing initialization options. |
Examples:
// Enable time-of-day environment mapping in a scene
scene.atmosphere.dynamicLighting = Cesium.DynamicAtmosphereLightingType.SUNLIGHT;
// Decrease the directional lighting contribution
scene.light.intensity = 0.5
// Increase the intensity of of the environment map lighting contribution
const environmentMapManager = tileset.environmentMapManager;
environmentMapManager.atmosphereScatteringIntensity = 3.0;
// Change the ground color used for a model's environment map to a forest green
const environmentMapManager = model.environmentMapManager;
environmentMapManager.groundColor = Cesium.Color.fromCssColorString("#203b34");
Members
static Cesium.DynamicEnvironmentMapManager.AVERAGE_EARTH_GROUND_COLOR : Color
Average hue of ground color on earth, a warm green-gray.
The intensity of the scattered light emitted from the atmosphere. This should be adjusted relative to the value of
Scene.light
intensity.
-
Default Value:
- DirectionalLight.intensity
- SunLight.intensity
2.0
See:
The brightness of light emitted from the environment. 1.0 uses the unmodified emitted environment color. Less than 1.0
makes the light darker while greater than 1.0 makes it brighter.
-
Default Value:
1.0
If true, the environment map and related properties will continue to update.
-
Default Value:
true
The gamma correction to apply to the range of light emitted from the environment. 1.0 uses the unmodified incoming light color.
-
Default Value:
1.0
The percentage of light reflected from the ground. The average earth albedo is 0.31.
-
Default Value:
0.31
groundColor : Color
Solid color used to represent the ground.
-
Default Value:
DynamicEnvironmentMapManager.AVERAGE_EARTH_GROUND_COLOR
The maximum difference in position before a new environment map is created, in meters. Small differences in position will not visibly affect results.
-
Default Value:
1000
The maximum amount of elapsed seconds before a new environment map is created.
-
Default Value:
3600
position : Cartesian3|undefined
The position around which the environment map is generated.
The saturation of the light emitted from the environment. 1.0 uses the unmodified emitted environment color. Less than 1.0 reduces the
saturation while greater than 1.0 increases it.
-
Default Value:
1.0
Methods
Destroys the WebGL resources held by this object. Destroying an object allows for deterministic
release of WebGL resources, instead of relying on the garbage collector to destroy this object.
Once an object is destroyed, it should not be used; calling any function other than
Once an object is destroyed, it should not be used; calling any function other than
isDestroyed
will result in a DeveloperError
exception. Therefore,
assign the return value (undefined
) to the object as done in the example.
Throws:
-
DeveloperError : This object was destroyed, i.e., destroy() was called.
Example:
mapManager = mapManager && mapManager.destroy();
See:
Returns true if this object was destroyed; otherwise, false.
If this object was destroyed, it should not be used; calling any function other than
If this object was destroyed, it should not be used; calling any function other than
isDestroyed
will result in a DeveloperError
exception.
Returns:
true
if this object was destroyed; otherwise, false
.
Type Definitions
Options for the DynamicEnvironmentMapManager constructor
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
enabled |
boolean |
<optional> |
true | If true, the environment map and related properties will continue to update. |
mipmapLevels |
number |
<optional> |
10 | The number of mipmap levels to generate for specular maps. More mipmap levels will produce a higher resolution specular reflection. |
maximumSecondsDifference |
number |
<optional> |
3600 | The maximum amount of elapsed seconds before a new environment map is created. |
maximumPositionEpsilon |
number |
<optional> |
1000 | The maximum difference in position before a new environment map is created, in meters. Small differences in position will not visibly affect results. |
atmosphereScatteringIntensity |
number |
<optional> |
2.0 | The intensity of the scattered light emitted from the atmosphere. This should be adjusted relative to the value of Scene.light intensity. |
gamma |
number |
<optional> |
1.0 | The gamma correction to apply to the range of light emitted from the environment. 1.0 uses the unmodified emitted light color. |
brightness |
number |
<optional> |
1.0 | The brightness of light emitted from the environment. 1.0 uses the unmodified emitted environment color. Less than 1.0 makes the light darker while greater than 1.0 makes it brighter. |
saturation |
number |
<optional> |
1.0 | The saturation of the light emitted from the environment. 1.0 uses the unmodified emitted environment color. Less than 1.0 reduces the saturation while greater than 1.0 increases it. |
groundColor |
Color |
<optional> |
DynamicEnvironmentMapManager.AVERAGE_EARTH_GROUND_COLOR | Solid color used to represent the ground. |
groundAlbedo |
number |
<optional> |
0.31 | The percentage of light reflected from the ground. The average earth albedo is 0.31. |