Sign in to follow this  
daedalic

Dynamic Lighting With Marching Cubes

Recommended Posts

daedalic    104
Is there an efficient way to implement dynamic lighting on marching cube terrain?

If so, does anyone have any insight into the implementation of this and the limitations of such an implementation?

Share this post


Link to post
Share on other sites
SuperVGA    1132
No. I have yet to implement dynamic lighting with marching cubes, so I'd like to know about other peoples experiences too.
-But why don't you give deferred lighting a shot?
You can still render all the required stuff to buffers and do the lighting in screen space.

Share this post


Link to post
Share on other sites
PolyVox    712
I don't see why it's that different to any other mesh really, except you can't use precomputed approaches if the mesh is changing at runtime.

This guy is doing some interesting work using my surface extraction library and lighting it from a Preetham sky. He's also applying SSAO which looks nice.

Share this post


Link to post
Share on other sites
beyzend    100
I'm that guy. My lighting is not really finished yet. Right now it has skylight but that's about it. My plan is to implement deferred shading in order to support large number (not casting shadows) of lights. Before I get there though I need to figure out how to do occlusion, or how do I know I'm in a cave problem. You may be familiar with the game Minecraft, which does dynamic worlds using cubic voxels. Minecraft solves the problem by propagating light values (low bit) directly downward from the sky. And that's the problem with it, it's in one direction.

I may do exactly that, but I won't use the values values to light my scene, I will propagate occlusion factor, since basically that's what I need because I have skylight already. Admittedly I haven't worked out all the details yet so I don't know whether this will work.

Other than that, I also thought about doing using horizon mapping and accessibility mapping, but this won't work with overhangs (or I haven't thought ways to modify it to work with voxels yet). Another possibility is to just brute force it, and since I'm sure you will decouple the computation of this from rendering, you can let it converge overtime (I haven't really explored this option yet).

That's basically where I'm at. Anyone?

BTW, today, I googled Crysis voxel lighting, and apparently you need to specifiy portals to light caves properly in Crysis. Oh yeah, reminds me, what about automating portal computation???



Share this post


Link to post
Share on other sites
beyzend    100
Actually, I was thinking about modifying the horizon map and store a list of heights instead of storing only the highest height, and live with errors (I think for caves and stuff, underground stuff, it should work.)

Another question is do I need to store value for every block? Instead of a horizon map, it will be a horizon volume.



Share this post


Link to post
Share on other sites
beyzend    100
oh yeah, another idea that I had is to simply render the entire scene from point of view of the SUN light, and use that to determine whether a surface is in shadow or not. This may even work best with deferred shading. And for skylight I would have just assume that anything below ground won't have any ambient light from the sky (not being lit by the sky at all; so only if it's directly being hit by the sun).



Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this