05 07 2012 02:11
Here it is. The completed final project for my computer graphics course.
Updates
- Textures stolen from JohnSmith Texture Pack for Minecraft (please don’t sue me)
- Trees!
- Awesomer caves
- Better lighting
- Faster (~350 FPS if chunks aren’t loading)
Download here, if you want to play around with it. However, I can’t guarantee it will work with your machine cause the only ones I’ve tested it on is my desktop and my laptop. And both are pretty beefy machines. So, good luck.
AH! FINALS.
04 14 2012 16:07
I had to demo my progress to my professor this week so I worked on it a lot. Some changes I made are:
“Infinite” terrain. The world is now made of chunks of voxels. I add and remove chunks from a chunk buffer so that only chunks around the player are actually loaded and drawn. The generating is done asynchronously so it doesn’t kill the framerate.
Caves, overhangs, and tunnels. I took some pointers from notch’s post about terrain generation and so now terrain is now generated through a density map. I fill the 3D density map by sampling 3d Perlin noise, augmented by turbulence, at specific intervals. Then I just use trilinear interpolation to fill in the missing details. The resulting density map is then cut to form tunnels using another rigid multi fractal noise generator.
Basic materials (grass, dirt, sand, stone, water). These are determined using the density map described above and depth information. Densities less than 0 are air blocks. Other types of blocks are determined by a combination of depth and density. I’m still not happy with this because, as you can see from the video, areas under certain overhangs leave a silhouette of stone.
Much better performance (200 fps vs 19 fps). This is mainly thanks to face culling and only drawing faces that are touching air blocks. Right now I’m using display lists. I tried using VBOs but I’m still kind of confused on how to actually use it correctly. There is a bunch of conflicting information about deprecated functions and stuff. But I’m pretty happy with display lists so far.
For the future: textures, better and less weird terrain, skybox, better lighting, trees?, and flowing water?
04 02 2012 20:29
So I just started working on this procedurally generated voxel/boxel terrain thing for my computer graphics final project. The above screen shot is what it looks like after a couple hours of work. That’s a 200×200 grid. And yes, sadly, that is 19 frames per second.
Right now, I’m just generating the terrain using 2D Perlin noise stored in a heightmap. Using a heightmap isn’t really ideal since I can’t really use it to store caves or overhangs. Eventually I’m going to update that to an octtree and use some combination of 3D Perlin noise stuff for generating the map.
For drawing, I just draw every single block which pretty much explains the 19 FPS. I have some ideas for optimizing it, such as only drawing blocks that are inside the view frustum and only drawing faces that are touching empty blocks, but I haven’t gotten around to doing that. My OpenGL skills aren’t there yet.
I’ll post some more when I have more to show.

