Gart230 Blog- Week nine, Lighting and post processing

This week was a big week for the project as I finally implemented one of the key features of the project to its full extent, that being ray tracing. There are three main ways raytracing will benefit my project they are… number one, ray traced lighting: this is a way of lighting wherein the engine traces the path of light as pixels in an image plane and simulate the effects of its encounters with virtual objects (What is ray tracing? Everything you need to know, from games to graphics cards | TechRadar) This dramatically increases the realism of lighting in a scene when done correctly and in a scene such as mine which is defined by its lighting effects I feel the performance loss associated with ray tracing is well worth the sacrifice. The second way it benefits my project is with the implementation of ray traced reflections, this option can be turned on in the post processing volume and results in significantly more accurate and high quality reflection calculations, considering the amount of glass, water and other highly reflective objects in my environment my hope was that by enabling ray traced reflections I would be able to show the scene in a much more film accurate way as opposed to the somewhat granular and limited reflections afforded by screen space reflection captures. The third feature of ray tracing that I deemed beneficial to the project was a more accurate calculation of translucency whereby the engine calculates how the light would refract through an object more accurately and thus provide a more accurately distorted image when objects are viewed through other transparent or translucent objects. The first two features are fairly easy to implement and other than switching from CPU based rendering to GPU based rendering to improve build times and taking a surprisingly minimal performance hit they were integrated smoothly into the environment with almost no issues but with massive aesthetic gains. It is important to note that by enabling this this feature I was no longer able to test the project on some of the older games academy pcs as they had incompatible graphics cards but the project ran smoothly on all the computers that I tested it on capable of supporting raytracing. Ray traced translucency on the other hand was a massive pain to implement throwing up a large number of unforeseen issues the two major ones were that a number of glass planes were rendering objects perfectly one way but would show nothing but a large reflective sphere when viewed in the opposite direction, I discussed this issue with lecturers but no easy solution could be find as there are very few resources on ray tracing in the build of unreal engine the university uses with most information either being based on screen space reflections or on more up to date versions which feature much improved ray tracing and DLSS as well as hybrid translucency which takes advantage of the best bits of both screen space and ray tracing to solve the sphere issue. The solution I found was to ensure you had no singular planes within the scene and instead ensure these planes were instead very narrow cuboids as this solved the sphere issue within my scene. The second issue was that ray traced translucency treated all translucent objects as if they were glass when it came to calculating refractions this meant that my curtain texture completely broke and lots of artefacts kept showing up on the curtains themselves. I came up with two solutions for this issue, for the curtains at the far end of the room I made them opaque and faked the lighting so that they appear as if they are being backlit even though they aren’t and with the curtains at the near end of the room I placed a separate post process volume within the room they are situated and set it as a higher priority than the scenes main post process volume and then turned off refractions just for that area so that when viewed from within this room looking out across the environment the curtains look correct. It isn’t a perfect solution but this issue was sucking a large amount of time and I figured it best to move onto other things now I had a partial solution than obsess over one small detail. Over the next week I hope to create the water assets and textures for the scene as well as use the newly enabled ray tracing features to create realtime caustics as these are a key feature of the films atmosphere.

With ray tracing

Without ray tracing