1. Tsarevna
  2. News
  3. Dev Diary: Lighting Transparent Effects in TSAREVNA

Dev Diary: Lighting Transparent Effects in TSAREVNA

[p]Transparency is one of the most complex aspects of rendering. Particles, smoke, magic effects, and glass don’t follow the usual lighting rules. Making them look natural is a challenge — even for large studios.[/p][p]In TSAREVNA, we use a system called Translucency Lighting Volume (TLV) — it allows light to interact correctly with translucent materials without turning the GPU into an oven.[/p][p][/p][h2]The Transparency Problem[/h2][p]Most modern games use Deferred Rendering.[/p][p]In the first stage, the engine builds a G-Buffer — a set of textures that store information about the scene’s geometry: normals, depth, materials, albedo, and so on. Lighting isn’t calculated yet; it’s applied later, all at once, to the finished buffer.[/p][p]This approach works perfectly for opaque surfaces — but not for transparent ones.
The reason is simple: transparent materials can’t be properly written to the G-Buffer because the background is visible behind them. That means they have to be drawn on top of an already lit scene, without participating in the main lighting system.[/p][p][/p][h2]The Solution: Translucency Lighting Volume[/h2][p]To make transparent objects look natural, we use Translucency Lighting Volume (TLV).[/p][p]The engine creates an invisible 3D grid around the camera. Each cell in this grid stores lighting information — direction, intensity, color, and reflected light sources (for example, the red glow of a torch or the blue shimmer of a magical portal).[/p][p][/p][p]When a transparent object is rendered, it doesn’t calculate lighting from scratch.
Instead, it simply samples the nearest TLV cell and uses the precomputed lighting data.[/p][p]This greatly reduces GPU load, especially in scenes filled with particles, smoke, magic effects, and post-processing.[/p][p][/p][h2]Quality Settings[/h2][p]The resolution of the TLV directly affects the quality of transparent lighting:[/p]
  • [p]High resolution — used in cutscenes and cinematic moments for maximum precision and light depth.
    [/p]
  • [p]Medium / Low resolution — used in combat and gameplay for better performance without noticeable visual loss.
    [/p]
[p]In TSAREVNA, this system powers the glow of spells, scattered magical light, and semi-transparent materials — from ethereal fog to shimmering enchantments.[/p][p]We’ll continue introducing similar technical improvements as development goes on.
Stay tuned for more dev diaries — there’s plenty of visual magic ahead
[/p]