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 Physically Based Shading cubemaps control many things in the engine now. Everything from shadow colors, ambient diffuse values, particle diffuse, and reflections. They act as bounce light 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 Create Objects -> Misc -> Environment Probe.
After selecting the Environment Probe, move your cursor into the viewport to position and place the 'Environment Probe' into your level. You can adjust the location the same as with any entity.
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 back 2 textures, one will be the diffuse bounce lighting information and the other is the reflection map.
On the Properties Panel, under the Cubemap option, click the Generate Cubemap button.
This will generate a Tif cubemap image in:
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 cubemap 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 checkbox to see the probe change to a default sphere with the cubemap applied and rendered.
Generates a cubemap for the currently selected Environment Probe.
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.
Affect Only This Area
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.
Volumetric Fog Only
This probe will only affect volumetric fog.
Affect Volumetric Fog
Whether this probe will affect volumetric fog.
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 ofcubemapbox.
Needs to be checked in order to be enabled.
Adjusts the width ofcubemapbox.
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 boundinggreen 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.