UE4 RnD – Refrlections

Given the fact that a large number of the surface in the final project will be glossy and will have to accurately reflect their surroundings – a lot of research went into the methods that UE4 uses to create cubemaps and their shortcomings and also developing methods to overcome these.

UE4 uses 2 main methods by default to generate cubemaps for an environment – a reflection capture sphere and square. These work identically but cater to different environment styles – a square room where all angles are at 90 degrees will benefit from a capture square as the data captured will perfectly match the geometry it is projected on, but in an environment with curves a sphere will fare better as it will blend the capture data and remove any hard edges in the reflections, while in a way spreading the inaccuracies in a more subtle way.

Planar Reflections
One of the issues of the cubemaps mentioned earlier is that they do not capture post processing effects like ambient occlusion or global illumination multipliers, which can have them not match the environment that they reflect.

UE4’s solution to this is to use screen-space reflections which samples the data present on screen and applies it to the cubemap. The problem with this is that only objects in the immediate view are reflected while the cubemap is used to fill in any blanks. This can lead to horrible patchwork reflections of large surfaces and have objects disappear from a reflection if they are not also in view.

To work around this issue I’ve decided to use planar reflections of large reflective surfaces to give accurate real-time reflections of the whole environment.

Example 1:

ref 1

Example 2:

ref 2

Conclusion – While Planar Reflections come at a significant resource cost, they are worth applying to large reflective surfaces like floors, walls or ceilings.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s