Public Group

# Chunked LOD and Dual Contouring Help.

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

## Recommended Posts

Hello!

So in my work right now, I've been working on destructible voxel terrain. I've gotten it down to a minecraft-like model, where there are chunks of fixed size and the viewing of the world is optimized (render near-to-far, etc). I have used 3D noise, created complex terrain, and have a firm grasp on procedurally creating terrain with noise. However, I want to take the next step now, and move on to using deal contouring and a chunked LOD system.

So my issues lie here: How would I go about this? Let me first say that I understand generally how these algorithms work. I know that dual contouring checks the edges of grid cells that change from in to out of the surface, and I know that chunked LOD takes into account how far away a chunk is from the viewer's chunk. I've also seen source code but...I think I'm just having trouble taking the step between general knowledge and full understanding down to implementation.

My main guiding questions are this: How do you know when to change level of detail? Does this LOD change in every (or most near chunks) chunk as you move? If so, how does this happen in real time?

My end goal is having destructible terrain with viewing distances much like real-life. I know this is possible, as I have seen at least a couple implementations, but I still can't bridge the gap. Any help??

Thanks,

ST

##### Share on other sites

Just to feed this topic a bit.

When you say destructible terrain, what do you mean? (Explosions n. stuff?)

• Find Dinstance btw. Camera and Chunk (center) (This is incredible fast)
• If Distance >= 50, use lod #3
• If Distance < 50 , Distance > 25, use lod #2
• If Distance <= 25, use lod #1

And when changing Lods, simply set a flag to use another buffer.

You can develop this model much further, but this is basically just to give you a start point.

Good Luck!

-MIGI0027

##### Share on other sites

Just to feed this topic a bit.

When you say destructible terrain, what do you mean? (Explosions n. stuff?)

So by destructible terrain, I mean like minecraft -- you can blow it up, model your own stuff, gun-shots can damage (depending on how small a voxel can get for me) and so on.

Find Dinstance btw. Camera and Chunk (center) (This is incredible fast)
If Distance >= 50, use lod #3
If Distance < 50 , Distance > 25, use lod #2
If Distance <= 25, use lod #1
And when changing Lods, simply set a flag to use another buffer.

You can develop this model much further, but this is basically just to give you a start point.

Thank You! By different buffers, are you saying I should keep in memory different buffers for different LOD Meshes? Won't that take up a lot of memory, especially when I also need to keep all voxel data that is close to the viewer in memory as well? (basically all voxel data that has the potential for an update from the user's actions within a certain distance must be held in RAM for easy access and fast mesh updates).

• 9
• 17
• 10
• 11
• 18