dev in the making

game development, maya and code by brainzizi

Posts Tagged ‘terrain

Abandoned: Terrain 3 and Skydome

leave a comment »

The diffuse shader is done on the terrain, and I have a system for the texturing. You can now put patches of grass and asphalt anywhere on the map. The amount of grass or asphalt texture on that point is determined by a texture lookup to a texture map which kinda looks like this:


The green pixel determine where the grass pixel are going to be, and the blue ones where the asphalt is going to be. I also passed the grass and the asphalt textures along with their detail textures to the shader, but after drawing that the framerate fell to about 50. So I removed the grass and asphalt detail textures and made them use the normal ground detail, and the framerate rose to 100 again. The terrain diffuse system looks kinda weird at this point because there’s no shadowing so surfaces get lit irregularly, and the skydome is finished. No that’s not atmospheric scattering on the screenshots, I just have a DayColor and NightColor and lerp between those 2 with the sun y position. This looks almost as good at atmospheric scattering and is like 10 times faster. Enjoy the screenshots!


Written by brainzizizi

08.21.2009 at 08:31

Posted in xna

Tagged with , , , , , ,

Abandoned: Terrain 2

leave a comment »

I had to rewrite the terrain all over again. Twice. The inability to draw mountains was hanging over me like an axe, and this morning it hit me hard. I had to have mountains!

First I was following this great article from Catalin Zima here:, and got the whole terrain rendering from a heightmap on the GPU. Nice. But one drawback to that. It required pixel shaders 3.0. And my game isn’t going to be the next Far Cry, in fact, I’d probably use shaders 3.0 just for the terrain. So as I was free from one axe, another started hanging over my head.

So now I’m using modeled terrains and no axe yet. This works better for lightning and artists (me). I’d post some new pics but I’m too lazy. Tommorow!

I just hope your day was productive as mine was!

Written by brainzizizi

08.19.2009 at 16:42

Posted in xna

Tagged with , , ,