Log In  

Hi,

Can I ask a question about the game engine? Before blitting to the back buffer, do you combine the cubes into single meshes or simply blit each cube one at a time? How are you working out which cubes need to be blitted? Or do you blit all cubes regardless of whether they're obscured?

Can you show a pre-blitted wire grab?

Thanks,
Lee

P#6268 2012-06-16 18:59 ( Edited 2012-07-28 10:43)

The rendering engine is written in software because many video cards aren't suitable for dynamic voxel graphics. The basic algorithm is quite simple though:

For each frame (nothing is pre-calculated):

  1. 'blit' all of the game world and objects into a virtual voxel display (Voxatron is 128x128x64) that can be though of as old-fashioned linear video memory.

  2. Read the voxel display from bottom to top, back to front (painter's algorithm). For each solid voxel, check to see if it has exposed faces by checking for empty neighbours. For each exposed face, transform the vertices into camera space and draw the polygon.

  3. To do shadows, calculate a traditional shadow map at the start of each frame and then sample it on demand when you draw each voxel.
P#6281 2012-06-21 19:36 ( Edited 2012-06-21 23:37)

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-03-29 01:43:26 | 0.005s | Q:11