Monthly Archive for July, 2008

Buildings and roads

I implemented some initial support for procedural cities tonight. At the moment this consists of one static ‘building’ made out of some primitives, and a road system (which is what I spent most of my time playing with). While this doesn’t look particularly interesting at the moment, I now have most of the groundwork laid to do generate more complex buildings :)

One small step…

I now have some initial support for multiple planets, and different kinds of planets. So, I made a ‘moon’. It looks kinda neat, even in it’s current semi-broken state.

It looks pretty nasty from height, though. Because there’s basically only one texture and no distance fog, you can see the squares of the quadtree quite clearly. But I’ll leave that for another night.

Terrain engine fixes

Tonight I spent some time implementing a bunch of overdue optimizations and fixes to the terrain engine. Basically all the boring stuff I’d been putting off because it was going to be painful without much payoff :)

It was totally worth it, however. FPS is way up, CPU usage is down, and the annoying popping artifacts are, if not gone, at least reduced. A bunch of things still need working on, but it’s a nice step forward.

None of these changes make good screenshots, but I’d hate to lose my streak of screenshot posts. So, enjoy this shot of the improved system looking pretty much the same as it did before.

Orbital glow

I hacked in a quick lighting effect for the planet atmosphere from space tonight.

It looks kinda OK in that shot (and is almost free to render), but it’s a fairly rubbish implementation. What I really need to do is implement Rayleigh scattering like in this article. That’d look a lot better, and would actually be somewhat accurate.

Space

Today I started trying to improve the appearance of the planet from space. The biggest problem so far with the space scene is that the textures will degrade with the vertex complexity - so when you view the planet from far away, the textures look bad, due to the LOD being low. I now generate a 1024^2 texture at runtime that I use to texture the planet beyond a certain threshold. When you get closer, the higher detail texturing is blended in, until the ‘base’ texture is gone. This means that I have a much more detailed look from space.

Here’s a couple pictures of the method, with the atmosphere toggled. It still doesn’t look very realistic compared to some implementations, but I think it’s just a matter of getting some better colours, non-fake cloud effects, and atmospheric glow. It looks better than the old version already, though.