Sunday, June 13, 2010

The new graphics engine is coming along slowly but surely. I spent a lot of time working out some very mysterious bugs that were causing things to either render in the wrong spot or just not at all. I was starting to worry for a while there that I would have to start over because things were getting so complicated. Got it worked out though and now it's working beautifully.

One big thing I've started to implement is a day/night system. I want this feature to be very detailed and realistic. The ambient/diffuse light color, along with the sky colors and angle of light are all dependent on the time of day. The sky color is sampled from a 2D texture. The U coordinate is determined by time of day, and V coordinate is determined by the vertical angle of the sky. So basically, at any given time, the sky gradient is sampled from one column of texels in the sky Texture. Below is the very rudimentary texture I'm working with right now. Eventually I'll get the correct color gradient for dawn/dusk/etc.


Another thing I've added is water. Very. very. basic water. It's a semi-transparent heightmap with a caustic pattern texture. Waves, reflections, etc to be added later. Even this basic effect I've got now has made the terrain look much more like a realistic outdoor scene.


Next steps:
  • Waves, reflections, and specular highlights for water effect.
  • Multi-textured terrain to add regions of sand/rock/etc.
  • True-to-life sky dome gradient colors

No comments:

Post a Comment