Friday, December 21, 2007

Christmas with the Ember


The last couple of weeks have been really hectic, as it's always before the end of the year. With not much free time work on Ember has suffered, but I've now finally gotten a stable release of 0.5.1, just in time for the holidays. This release adds a lot of new features, chief amongst them a much nicer interface with inventory and status widgets. As always there's a lot of bug fixes and improvements in almost all areas of Ember. Here's as small list of some of the improvements:
  • totally refactored ingame chat system with better performance and functionality
  • support for both Lua 5.0 and 5.1
  • a new icon system
  • a new inventory system with drag and drop equipment
  • status widgets for both the avatar and current targets
  • update of all materials, with support for normal and shader maps for most entities
  • refactored terrain system with support for both shader and fixed pipeline functionality
After the 0.5.0 release earlier this year I wanted to do a 0.5.1 release pretty close to it, but for various reasons it didn't happen, and the release comes almost a full haft year after the previous one. The main reason is that I want to release really stable code without any regressions and strange graphic glitches. The problem with this is however that it's really hard to test out all of the various graphical cards when I'm the only one that works on the codebase, and I only really have one development box with a Nvidia card. Previously this has led me to disable the shader terrain rendering, since I found out at release time that it didn't work with ATI cards.
This can't work in the long run, and I'm looking at trying to better embrace the "release early, release often" motto, even if it means that some releases will bring regressions with them. Since I'm the only developer I'm really dependent on good bug reporting from end users. Lately I've been seeing some increased activity on the Launchpad bug tracker, which is really great, since it's just the kind of input I need from the users.
So I will try to get a release of 0.5.2 out not too soon, even if that release might break something. I'm also looking at perhaps using the Google BreakPad for even better crash reporting.

The new release of Ember also uses a lot of Jayr's new materials with support for normal and specular maps for most surfaces. This looks really good and hold great promises for the future as I move to include a better foliage rendering mechanism into Ember (after all, the mason world is an outdoors world, so natural foliage rendering seems almost like a requirement). It also brings the used media up to 90~ Mb.

With future versions of Ember we need to refactor the media system so that world developers can specify their own media repositories in a better way. Currently Ember gets all its media from one place and places it statically in ~/.ember/ember-media-0.5.1. However, we would like to let each world provide its own media if so desired, so that when you connect to one server you might download (through wfut) media specific to just that server.

For this release I haven't had time to set up a Windows build environment and provide a working windows binary. If anyone else feel better suited for this task I would greatly appreciate it, else I will do this myself after the holidays.

Sunday, November 25, 2007

In the shadows


The new terrain rendering system is working really nice and I've now fully integrated a shader based terrain material. The idea is to optimize the material by trying to reduce the number of passes needed. By combining the different coverage layers into one single texture we can keep the number of passes down. On my card with 16 texture units I can squeeze in 12 splatting layers in one pass.

Now that I've got that part done I'm working on getting some more advanced features such as normal mapped terrain working. There are a couple of performance issues to take into account though. There's no reason to render the terrain with normal mapping on when it's in the distance. I'm thinking of adding some features which will allow the engine to automatically create pre-baked textures for the distance, where all of the layers already are put together without the need for splatting.

On the media front, Jayr continues to bring out really nice media. He's reworked the two room house, the gallows, the jetty and the stalls. Most of these are already brought into Ember, with full support for normal and specular mapping.

Wednesday, November 07, 2007

Shadows

I've finally started redesigning the terrain system, with some very promising result. The first issue to tackle was how the shadows on the terrain were computed. Previously I left all of that to the scene manager, which used a simple vertex lit approach which didn't look good with lower LOD (and also taxed the GFX card as the shadows had to be recalculated each frame).
I now have a simple shadow generation framework in place. The idea is to provide a couple of pluggable shadow providers for different shadow techniques. Currently I only provide a very simple technique where the shadows are calculated directly from the surface normals (just as vertex lightning). It already looks much better than before though, although I intend to provide some more advanced techniques later on.
Here are some example screenshots:
I've also started on a more thorough refactoring of how the whole terrain system works. The goal is to more easily allow for more advanced features, such as normal mapped terrain, as well as being able to alter the terrain materials in a simple gui ingame. As with all refactoring the code is currently a mess, but yesterday at least I got it to compile. The blueprint for this can be found here and I've so far followed it pretty much to the letter. The material compiler works, though it's very inefficient in the way it creates new materials.

Jayr have been churning out even more great looking media with a lot of new normal maps. It's a real joy to update the material definitions and see how the world comes to life when normal mapped materials are used. It's really such a big change in how everything gets depth and shadows.