Illumination by a lake of lava

Started by
5 comments, last by kalle_h 9 years ago
Hi,

if I create random lakes of lava in my voxel game and want them to light their environments, how can I do this? Point lights are not a good solution because lakes could be big at the bottom of the world and so many point lights would be needed. Should I store the light level per voxel like I do for sunlight? Or is there another way to achieve a good illumination?
Advertisement


Should I store the light level per voxel like I do for sunlight?

If you already have such a mechanism for sunlight (per voxel), then it sounds like a good idea to try the same for other large light sources like a lava lake. Large light sources are always really hard and usally you would only be able to use it in static lightmaps. A more modern approach would be a ray-tracing attempt (e.g. screen-space-reflection), but your voxel approach sounds more promising to me.

I just recently dealt with this same problem. Ended up just baking the light maps for much of the level since you can use a nice broad upward pointing sunlight light source in blender. And, for the objects that need dynamic lighting, I just use a handful of directional lights in various upward pointing directions (to get all sides of the object). For shadowmaps, I was a little on the lazy side and just use a straight upward pointing map. If you need a little fancier, move the directional lights around slowly/randomly to give kind more of a dynamic feel to things.

It's not an ideal solution, and probably isn't sufficient if you need dynamic lighting on everything (I didn't for this), but it's passable and relatively easy to implement.

Beginner here <- please take any opinions with grain of salt


if I create random lakes of lava in my voxel game and want them to light their environments, how can I do this?

by creating an imaginary world. in the real world, lava lakes don't give off much light (ever been to Kilauea?). try a low emmissive material for a realistic look.

Norm Barrows

Rockland Software Productions

"Building PC games since 1989"

rocklandsoftware.net

PLAY CAVEMAN NOW!

http://rocklandsoftware.net/beta.php

If you are talking about a voxel game in the sense of large blocks (a la minecraft), then a simple approach would be to flood-fill illumination (optionally with a colour tint), to blocks that closely neighbour lava blocks.

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

in the real world, lava lakes don't give off much light (ever been to Kilauea?). try a low emmissive material for a realistic look.

In the real world you can't get anywhere within half a mile of a lake of molten lava without protective gear and even then for short amounts of time, you also need breathing apparatus due to toxic gases like sulphur dioxide.

I've been told before to imagine a lake of boiling lava to be similar in radiated heat to a lake of active electric heating elements.

It's a good job this is an imaginary world :) but maybe you could draw some inspiration from this?

If all lava are almost same altitude you could just render lava voxels from top down to texture. Blur that a bit and use it as cookie texture. Approximate that all light is going directly to up and soften light function a bit.(nDotL * 0.5 + 0.5). To get some high freq normal map variation you can bias texture samples a bit toward normal direction. Then just add some height falloff. If you have lots of depth layers then it might cause some leaking.

This topic is closed to new replies.

Advertisement