Home / Blog / Raytraced Global Illumination and Direct Illumination – is it worth it?

Raytraced Global Illumination and Direct Illumination – is it worth it?

Raytracing offers stunning lighting and shadows, but not without trade-offs in performance and complexity. Find out what those are!

In offline rendering used in movies, pathtracing was used as a natural way of solving DI and GI. This is the most accurate way of calculating lighting in the scene. For a long time, due to hardware limitations, it was unrealistic to run raytracing in a real-time environment, much less a complete pathtracing solution. However, as hardware improved, it became possible to use raytracing and even calculate bounced lighting with clever techniques, such as importance sampling.

Advantages of raytraced DI and GI:

– Lighting cost is no longer tied to the amount of lights so that authoring lights can be more dynamic

– Reduces iteration time of light authoring. The result of placing a light in an editor is instantaneous

– Raytraced shadows are more accurate and allow to simulate penumbras better

– Avoids issues with light leaks (can still happen with voxel solutions)

– GI solution can be used for real-time reflections

– Better representation of volumetric physical properties, such as absorption and refraction, in volumetric effects, e.g., fog, ice, water, etc.

Disadvantages of raytraced DI and GI:

– Even on modern hardware, it’s still an expensive technique

– Introduces a lot of noise to the lighting, which requires separate denoisers to fix

– GPU representation of the scene needs to be updated, and that can be expensive when used with things like vertex animation and skeletal meshes

– Materials might need to be prepared separately for both rasterisation and ray-tracing

– Raytracing is dependent on temporal data, which requires proper handling to avoid unwanted artifacts

Why do we separate DI and GI in raytracing?

– Some techniques can use different algorithms for DI and GI

– GI scales quickly with the number of light bounces, while DI doesn’t

– It allows to fine-tune both solutions to get the best performance

– GI and DI have different noise profiles

– It’s possible to set up DI not to require material samples while GI needs it to perform calculations

Links, if you want to learn more:

Author

Radosław Paszkowski

Senior Software Engineer

Radek gained experience working on both indie and AAA games. Creating art by painting or with shaders, as well as playing music are his favourite pastimes. He's specializing in graphic programming since joining PixelAnt Games.

See more posts by this author

Looking for a proven work-for-hire team?

Get in touch to find out how we can support your game!

Hi! We use cookies and similar technologies to better know you and improve your experience with our website.
You can find out more by reading our Privacy Policy.