Jump to content
  • Advertisement
Sign in to follow this  
Magogan

Illumination by a lake of lava

This topic is 1159 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites


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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!