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: UnOptimized Voxeled World Renderer
UnOptimized Voxeled World Renderer
UnOptimized Voxeled World Renderer, by Niunio

I know there are a lot of people interested on my VoxRend engine, so I try to work in that project in my free time.

This summer, while I was assembling a tent I had an inspiration about how to render a fully voxeled world. The idea was too simple and is too similar to the algorithm used in my UnOptimized Voxeled Landscape Renderer so I called the demonstration in a similar way.

The first image (top-left) was the first good render. It was made in a 640x480/16bit screen and looks too flat, so I added some noise to the colors when the program created the world.

The second image (top-right) you can see the CSG. You can add or cut boxes and spheres.

The third image (bottom-left) shows the definitive program in a 640x480/16bit. It's too slow and each frame needs 1 or 2 seconds to be complete.

For the final image I did some tricks to boost it up. First, I changed the maths to use fixed point instead of float point (yes, I know "In modern Pentiums float point math is fast enough and blah blah bla..."), then I created a better fixedsin/cos search table, finally I reduced the size of the screen to 320x240/8bit and I got 11fps.

I spent about 10 hours on this. After my University examinations I'll spend more time on optimize it, so VoxRend will became a fully voxeled engine.
Hrm, I don't understand. Your VoxRend engine has a screenshot of a beautiful mountain landscape at 34 FPS. What is special about the new renderer? - Gideon Weems
It's kind of hard to tell the edges apart from the rest of the scene maybe some lighting could help? Since voxels seem so similar to 3d particles this doesn't seem like it would be much of a challenge to code, but a huge challenge to make it run fast -- seems like you've got your work cut out for you... - Michael Jensen
Reminds me of Impressionist art... - Evert
I hope it looks better when moving than it does now. (sorry for being hard on you). :) - Kent Larsson
Tanks for your comments.

I've answered some of you directly using private messages but...

I know that actually VoxRend is much faster, but this is because it uses less data than the new renderer.

About lighting I planned to add some but was too complex to code, I'll add it after my University examinations. You're right, the challenge is to make it run fast. The actual algorithm is a simple ray-trace one but I think it isn't the best way, thought. I tried to understand the algorithm used by Ken Silverman in his Slabspri utility but it's impossible! It uses a lot of ASM code and the newer ASM code I wrote was Z-80...

And yes, it looks much better when moving ;)

Thanks a lot for the commens. - Niunio
This section is only available to registered Allegro.cc members.



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