My name is Davyd Vidiger, I have been working as a Lead 3D Artist in UNIGINE for several years. Today I am going to tell you how Unigine managed to improve the image quality in real-time 3D graphics using Screen Space Ray-Traced Global Illumination, what challenges did we face and why this technology is so important.

Introduction

Everyone who worked with real-time 3D graphics knows the dilemma: either to choose realistic static (baked), or less realistic dynamic lighting. We’ve also faced this dilemma while working on the Superposition Benchmark project. Unlike regular real-time applications, we have over 900 dynamic objects in a single room. All of these objects can be moved freely which significantly affects lighting. This scene unveiled a set of typical problems in modern 3D engines.

Here are the challenges we faced:

1. With baked lighting we can’t move dynamic objects

Suppose we pre-calculate lightmaps for each object offline, using ray tracing, and then bake them into textures. We would surely get a completely realistic and convincing lighting but, all objects would have to remain static – we couldn’t move them. Apart from looking plain and boring in VR, this would be considered as a technologically outdated solution.

2. Mixing dynamic and static lighting gives us an inconsistent image

It’s possible to bake lighting for static geometry (lightmaps or static AO), but this baked lighting won’t affect dynamic objects. As a result we can get too bright objects on dark shelves. Even if we try to improve the scene by content adjustment – inserting a dark environment probe into each bookcase, it still won’t look realistic. The fakeness of real-time graphics will still be evident.

3. Using environment probes gives sharp transitions of ambient lighting on the adjacent surfaces with different normals

We used environment probes for ambient lighting, applying it to objects’ surfaces according to the following scheme: if a surface normal points to the left, we use the lighting baked from the left side, if it points to the right – we use what was baked from the right. This is a classic method, which is now widely used in real-time for ambient lighting. However, it produces sharp transitions of ambient lighting on the adjacent surfaces with different normals which looks totally unnatural.