Greetings everybody! ?
With today’s blog-post we want to give you an insight about our render engine, in particular about color spaces, how much they affect the look of a game and our recent work on it that will be release in future updates.
We could say that BeamNG.drive always had a clean and spartan look. This is in part an artistic choice to favor visual clarity, but also a necessity due the engine’s old-school techniques.
Let’s start talking about color spaces.
Our eyes don’t react to light in a linear way, and with the necessity to compress video signals, we use a color space that provides greater accuracy to ranges which our eyes are more sensible to. This color space is called gamma color space, and that’s what our game uses.
Because light behaves in a linear way, we cannot use gamma space to achieve physically correct results. For that reason we need to work in the so-called linear space, where the contribution of different light sources returns their correct intensity, opposed to gamma space where this is not true.
In the below scheme you can appreciate the differences between gamma and linear space, as the problems in doing math in the first:
One of the main challenges of moving to the more physically correct linear color space is retaining the look of the existing assets, as well as mods. In this period we have tested various solutions in order to achieve that, with very promising results.
After these improvements, the next natural step is to enable proper HDR rendering: whereas in LDR (Low Dynamic Range) the engine works with values in a range of 0-1, in HDR (High Dynamic Range) the internal range is much higher, allowing for much more realistic lighting. Very bright things can actually be bright, and very dark things dark.
In the former two comparisons, you can see Hirochi Raceway and West Coast USA. We managed to keep most of their original look while also allowing the lighting fixes to reveal more details in asset textures:
And here’s old Utah and its upcoming refresh, which is taking advantage of ad-hoc settings for this change:
Last but not least, a direct comparison of the vehicles, which now have a more vibrant look:
Some bonus ‘in-motion‘ clips! ?
Bloom Post-processing can now properly work on bright pixels
Lights projecting on parallel surfaces also behave better now
In conclusion, despite working within certain self-imposed restrictions we are still able to push the envelope of what our rendering engine is capable of doing. We are very happy with the quality improvements this work has resulted in and we hope you are too. Look forward to seeing it in action on your PC with a future update of BeamNG.drive!