Recently I've started developing voxel engine. What I need is only colorful voxels without texture, but at very large amount (much smaller than minecraft) - and the question is how to draw the scene very fast? I'm using c#/xna but this is in my opinion not very important in this case, let's talk about general cases. Look at these two games:
Especially I think video number 2 represents great optimization methods (my gfx card starts choking just at 192 x 192 x 64) How they achieve this?
What i would to have in the engine:
- colorful voxels without texture, but shaded
- many, many voxels, say minimum 512 x 512 x 128 to achieve something like video #2
- shadows (smooth shadows will be great but this is not necessary)
- optional: dynamic lighting (for example from fireballs flying, which light up near voxel structures)
- framerate minimum 40 FPS
- camera have 3 ways of freedom (move in x-axis, move in y-axis, move in z-axis), no camera rotation is needed
- finally optional feature may be Depth of Field (it will be sweet ^^ )
What optimization I have already know:
- remove unseen voxels that resides inside voxel structure (covered
from six directions by other voxels)
- remove unseen faces of voxels - because camera have no rotation and always look aslant forward like in TPP games, so if we divide screen by vertical cut, left voxels and right voxels will show only 3 faces
- keep voxels in Dictionary instead of 3-dimensional array - jumping through array of size 512 x 512 x 128 takes miliseconds which is unacceptable - but dictionary int:color where int describes packed 3D position is much much faster
- use instancing where applciable
- occluding? (how to do this?)
- space dividing / octtree (is it good idea?)
I'll be very thankful if someone give me a tip how to improve existing optimizations listed above or can share ideas of new improvements. Thanks