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.
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.
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:
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
This allows you to tweak the resolution of the generated cubemap to ensure a good balance between quality and memory usage.
Toggle this on and off to see the probe change to a default sphere with the cubemap applied and rendered.
Generates a cubemap for the currently selected Environment Probe.
Generate All Cubemaps
Generates a cubemap for each Environment Probe placed in the current level.
Turns the entity on/off.
Specifies the XYZ dimensions of the Environment Probes area of effect.
The diffuse color of the light can be specified here.
To make the light brighter this diffuse multiplier can be used.
Multiplies the specular color brighter, use to adjust brightness.
Set this parameter to false to make lights other visarea.
Controls the falloff amount (0 - 1) to create smoother transitions or hard-edges which can be useful in interior lighting.
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.
Controls whether the light should respond to visareas.
Gives control over which Probe should be a higher priority.
Specifies the location of the cubemap texture.
Adjusts the height of cubemap box.
Adjusts the length of cubemap box.
Needs to be checked in order to be enabled and once done; the size of the box will need to be taken into consideration.
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.