mathius777 wrote:
I see. That makes sense. Well, I am trying to make a little minecraft clone, so I feel like a SVO is probably overkill. My question is, would it be possible to use level of detail using LargeVolume? For instance, as I zoom into a planet, I use perlin noise to generate new volues inbetween the current volumes? I think it'd probably be better to use an octree for this.
Hi,
Yes, you can use an octree for this. I actually have been thinking to do an experiment like this. For an octree, you can probably just use a tree of RawVolumes to render from. Where you fill those RawVolumes is up to you (downsampling a LargeVolume, or direct from a LargeVolume etc.). Just be aware the following is not something practical, just thoughts I have had on this subject.
There are a few problems you'd have to solve with voxel LOD in a blocky world like minecraft.
AliasingJust as images have aliasing issues, so would voxel downsampling.
Quick example:
The simplest way to downsample a voxel is to simply march across the volume and skipping every other voxel. Now imagine you have every other voxel as solid, but in between each is an empty voxel. When you downsample, you can skip every voxel, and the whole volume will disappear. Another example is a thin sheet of voxels blocking your view. When you downsample it, you can skip over the entire sheet, resulting in a huge popping effect.
Possible solutions to reduce aliasing are to ignore it (hey, its a 8-bit style game anyhow), or to use "voxel filtering", which would mean adapting one of the many algorithms available for image filtering (each LOD volume can act like a different scale in a mipmap).
Another aliasing related issue, is that image filtering assumes that materials (colors) can be blended/averaged etc., however, with integer materials, you would have to decide how to blend between different materials. So it would be much easier to use colors instead of materials, however this would ruin the ability to easily apply complex textures etc. Furthermore, you might have to consider using *six* (or at least three) colors per voxel, one for each direction, because downsampled voxels represent 6 faces of higher resolution voxels, and should probably blend between them per-face.
PoppingWhen going from one LOD to another, things will just pop. Especially for a blocky world, lots of shading might change, for example something at a slight angle might have lots of "shadow" areas, but at a lower LOD would be flat.
One solution I have been thinking of is to use geomorphing here, but instead of the normal geomorphing when changing LODs, you can constantly geomorph between the LOD levels (and if you use a proper filtering algorithm, this would be akin to mipmaping, interpolating between two scales). Geomorphing between LODs for blocky voxels would probably be easy and look ... interesting.
I suspect such a world, with blocky filtering and constant geomorphing would be no doubt visually interesting, but I doubt it would have the same feel as Minecraft. The world would probably feel fluid as the terrain would constantly be making tiny shifts.