Environment Probes

Overview

With Environment Probes you have the ability to place cubemaps easily throughout a level just as you would a light. It is very useful especially with reflective materials because it will automatically assign the cubemap to anything within its radius.

This tool can be useful when used with dynamic lighting as well; it just requires a minor Flow Graph setup so that the different probes used in different situations will transition smoothly.

With the introduction of Physically Based Shading in CRYENGINE 3.6 cubemaps control many things in the engine now. Everything from Shadow colors, ambient diffuse values, particle diffuse, and reflections. They act as bounce lighting by taking the colors from the surroundings and applying them directly into the diffuse of materials inside their radius.

Setup

Having loaded a level in Sandbox, select from the RollupBar the Objects -> Misc -> Environment Probe.

After selecting the Environment Probe, move your cursor into the view port to position and place the 'Environment Probe' into your level. You can adjust the location the same as with any entity.

With the new tile shading in CRYENGINE all cubemaps must be at resolution of 256. The image generated is a floating point HDR image and has a much higher fidelity than previously.

Cubemap Generation

The texture file name will always change to the name of the Environment Probe entity. So it is a good idea to name your probe right away before you start generating anything. When you generate you will get get back 2 textures. one will be the diffuse bounce lighting information and the other is the reflection map.

On the RollupBar, you see the entity options and 'Probe Functions' panel. Click the Generate Cubemap button.

This will generate a Tif cubemap image in: Textures\cubemaps\<LevelDirectory>\<EnvironmentProbeName_cm>.tif

Generally, the environment probe should be placed at head height to generate proper reflections.

Global Cubemap Probes

Every level should have a Global cubemap to start with. This is a special cubemap that acts as the default/fallback. Generally you only need one Global cube map per level.

Having a Global probe in your level ensures that you will always have an active cubemap available. Any "local" probes will automatically sort as a higher priority within its defined radius and blend in over the top of the "Global" probe.

Setting a cubemap to be a Global cubemap requires just a few special settings:

  • Ensure that it covers the entire level by setting the BoxSizeXYZ values high enough.
  • Set the SortPriority to 0.
  • Set AttenuationFalloffMax to 0.
  • Set IgnoreVisAreas to true.

Environment Probe Properties

EnvironmentProbe Params

cubemap_resolution

This allows you to tweak the resolution of the generated cubemap to ensure a good balance between quality and memory usage.
Note that since CRYENGINE 3.6, the Physically Based Shading model has been tuned for 256px cubemaps and this resolution is enforced.
An additional option introduced here is "skip update" which sets this Probe to not update it's cubemap texture.

preview_cubemap

Toggle this on and off to see the probe change to a default sphere with the cubemap applied and rendered.

Probe Functions

Generate Cubemap

Generates a cubemap for the currently selected Environment Probe.

Generate All Cubemaps

Generates a cubemap for each Environment Probe placed in the current level.
The intention of this is to make the updating process for all Environment Probes automated.

EnvironmentProbe Properties


Active

Turns the entity on/off.

BoxSizeXYZ

Specifies the XYZ dimensions of the Environment Probes area of effect.
Probes are now projected in Box fashion rather than Spherical fashion for better flexibility with level setups.

Color

Diffuse

The diffuse color of the light can be specified here.

DiffuseMultiplier

To make the light brighter this diffuse multiplier can be used.

SpecularMultiplier

Multiplies the specular color brighter, use to adjust brightness.

Options

AffectThisAreaOnly

Set this parameter to false to make lights other visarea.

AttenuationFalloffMax

Controls the falloff amount (0 - 1) to create smoother transitions or hard-edges which can be useful in interior lighting.

DeferredClipBounds

Specifies that the light is linked to a light box and to use the volume of the target area for clipping. See: Light Boxes and Light Shapes.

IgnoresVisAreas

Controls whether the light should respond to visareas.

SortPriority

Gives control over which Probe should be a higher priority.
With two probes in the same area, the probe with the higher sort priority will be rendered on top.

OptionsAdvanced

deferred_cubemap

Specifies the location of the cubemap texture.

Projection

BoxHeight

Adjusts the height of cubemap box.

BoxLength

Adjusts the length of cubemap box.

BoxProject

Needs to be checked in order to be enabled and once done; the size of the box will need to be taken into consideration.

BoxWidth

Adjusts the width of cubemap box.

Tweaking Environment Probes

High reflective materials are suggested to be used in conjunction with SSR (Screen Space Reflections) as it will provide localized real-time reflections.

No SSR and no Environment Probe.

The following example was put together using a box projection method SSR with Environment Probe. Notice how the grid is accurately aligned with the shapes. When modifying your box projection be aware that a bounding green bounding box appears and to tweak the size accordingly.

This screen has SSR with no Environment Probe enabled. Notice the localized reflections located around edges and corners.

No SSR with BoxProject enabled Environment Probe aligned with the size of the room.

SSR with spherical Environment Probe. This aspect is not as accurate but in less reflective areas this option may be easier to use.