Allegro.cc
Projects
Action252
Adventure22
Arcade216
Board Games30
Demos24
Emulators10
Other68
Puzzle139
Role Playing40
Sports25
Strategy58
Utilities46
Resource Directory
Code Gallery3
Compilers12
Help & Documents13
Libraries63
Media2
Tools8
IOTD: More (and better) voxels
More (and better) voxels
More (and better) voxels, by Niunio

Here I go with a new voxel demo.

This is the same demo than my latest IOTD but using a different render style. This time I use real voxels rendered using OpenGL instead of ray-trace as my prior demo. This way the demo has 6 degrees of freedom and it looks better.

The first try was too slow (0.2 frames per second) because the renderer draw all voxels of the scene, but after few optimizations (RLE for spans of voxels with same color, avoid the voxels that are inside of solid objects and few more) I have 8 FPS with same number of voxels. I know it is possible to optimize it and draw the scene as fast as Voxlap [advsys.net] does, but I'll do it when I rewrote the actual VoxRend [voxrend.sourceforge.net] code to use OpenGL.

The lighting is static and use it to provide a more 3D aspect to the scene.
LeGo-Land! - Jim Sinha
Now, seriously. Correct me if I'm wrong. Voxel engines usually work with raycasting rendering, which OpenGL is certainly not. So do you, then, draw thousands of GL cubes (sounds ridiculous for me) or do it differently? - Krzych Stah
That's the trick. The best voxel engine should draw only the visible voxels. The deal is how to detect which voxel is visible and wich not. Before to render the world my demo process the world to check what voxels are visible and does some other optimisations as the RLE compression for spans of voxels wich same color. There are other tricks that I didn't implement them in this demo, but I'll use them in VoxRend 3.0. - Niunio
I think you're onto something. Let's take bump-mapping one step further! - Jim Sinha
This section is only available to registered Allegro.cc members.



The Gallery | Add your own image!
Poll
Is grammer and spelling important?
View Results