Times, trials, and turbulence.
Voxels On The Side
Anyone who has been reading my journal for a while should know by now that I’m pretty fascinated by the topic of 3D graphics rendering — particularly in software (ie. no OpenGL/Direct3D) — and so it should come as no big surprise that I woke up on Saturday and spontaneously sat down to write a 3D voxel-based heightmap renderer. 😛
The core of it was written on Saturday, but I spent parts of Sunday and today doing optimizations and making it generally prettier. The end result is as follows:
The ‘features’ are a 640x480x32 voxel heightmap display running at ~25FPS on my 3.0ghz computer, with distance-based fog, and a skybox-esque background image that rotates independently of the camera. The water level is variable, and the water is shaded based on the depth of the water of that voxel. The terrain is infinitely wrapping, so you will likely see some seams here and there where edges meet. Give ‘er a download — I’m interested to hear feedback or ideas for improvement:
(Controls: Arrow keys for rotation/movement, Page Up/Down for moving up/down)
I had a lot of fun writing this, so I’m seriously considering a small (read: under 3 weeks) mini-game based on this voxel renderer. Something along the vein of the Comanche series. It’s not very impressive by today’s killer-3D-graphics standards, but a neat little project nonetheless. More to come as the week progresses!