Monthly Archive for June, 2008

New Textures

In the last couple days I’ve broken down and reassembled the texturing and height generation systems. It’s got some quite nice results, even in these early stages. I got rid of the old cartoony look, turned up the texture resolution, and added a bit of lighting.

Still needs a bit of work - the hard transitions between the textures needs to be modulated with some more noise, and the choice of textures themselves need careful attention. I’m quite pleased with the direction, though.

In addition to the new texturing, the new noise system has some nice features. Higher terrain is bumpier, and lower terrain is flatter. So, you get nice flat bits (comparitivly speaking) next to the water. And another level of high-frequency noise is added when you get close enough, meaning that the flat curves of the old system when you get to the 1m level are gone.

Fun with spheres

I enabled spherical planets this afternoon. For the record, the planet in the picture below is 1.5million square kilometers (500km x 500km x 6).

There’s a bunch of problems with them, though. Turns out I had a few things that relied on (0,1,0) being the ‘up’ vector for the terrain - which is fine if your terrain is flat, but not so good if it’s curved.

Another problem is making it look ‘good’ at every level from orbit to 1m. At the moment it looks fairly mediocre at every level. It’s also crying out for some decent atmospheric scattering - what’s shown in the picture is just a sphere with a cloud texture on it. I’m planning some much nicer stuff, but that’ll have to wait for another post.

It is damn cool being able to fly from ground level to space in one transition, though. I reckon in a couple weeks I’ll have something that does that and looks good doing so :)

3D models

I moved over some 3D-model-rendering code from an old engine of mine to the new system today. It seem to be working properly, although I currently only have some placeholder (ie: ugly, old, low-poly) models to use. I also put in a very quick blob-shadow effect.

Note that these models are pretty much to scale (ie: the person model is about 2 units high, and 1 unit wide). They’re tiny compared to the scale of the world :)

Fog

I started reading a rather length text on using L-systems to procedurally generate vegetation, but it looked too complicated for what was turning into quite a late night. So, as my third (!) set of screenshots for today, I threw together a quick fog effect in the terrain shader. It’s pretty basic, but I think it looks quite nice (if not very realistic).

I also hacked in some ’stars’ and made the background colour change from sky-blue to black depending on your altitude. Again, pretty basic, but it’s quite effective in motion.

Tomorrow I may look at L-systems and vegetation, hopefully making the terrain a little less barren.

Frustum culling

As promised:

As a result of this, I went from 80fps to 150fps on the same scene (the island where the camera starts). Flying around with a bit of altitude gets >250fps easily, up from the ~150 I got previously. Not too shabby for a couple hours work :)