title: Voxel Engine and Optimization
body: <p>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:</p>
  
  <ol>
  <li><a href="http://www.youtube.com/watch?v=EKdRri5jSMs" rel="noreferrer">http://www.youtube.com/watch?v=EKdRri5jSMs</a></li>
  <li><a href="http://www.youtube.com/watch?v=in0bavLJ8KQ" rel="noreferrer">http://www.youtube.com/watch?v=in0bavLJ8KQ</a></li>
  </ol>
  
  <p>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?</p>
  
  <p>What i would to have in the engine:</p>
  
  <ul>
  <li>colorful voxels without texture, but shaded
  
  <ul>
  <li>many, many voxels, say minimum 512 x 512 x 128 to achieve something like video #2</li>
  <li>shadows (smooth shadows will be great but this is not necessary)</li>
  <li>optional: dynamic lighting (for example from fireballs flying, which light up near voxel structures)</li>
  <li>framerate minimum 40 FPS</li>
  <li>camera have 3 ways of freedom (move in x-axis, move in y-axis, move in z-axis), no camera rotation is needed</li>
  <li>finally optional feature may be Depth of Field (it will be sweet ^^ )</li>
  </ul></li>
  </ul>
  
  <p>What optimization I have already know:</p>
  
  <ul>
  <li>remove unseen voxels that resides inside voxel structure (covered
  from six directions by other voxels)
  
  <ul>
  <li>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</li>
  <li>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</li>
  <li>use instancing where applciable</li>
  <li>occluding? (how to do this?)</li>
  <li>space dividing / octtree (is it good idea?)</li>
  </ul></li>
  </ul>
  
  <p>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</p>