Lighting Up #3

I’ve restored billboards (trees, rocks, etc.) to scenes and they generally light up correctly from surrounding point lights and the player’s personal light source. There is a simple light animation playing that changes the scale of the light volume +/- a small amount. Light attenuation means this effect is more obvious at the edge of the light radius than near the source.

The lighting system still needs a tidy-up, and a few bugs remain (such as the emissive wood textures you see in a few spots). I will continue to polish this leading up to Beta 2 release. Still, I’m happy overall with how the lighting is shaping up and posted a video preview.

Lighting Up #2

I’ve added an emissive property to textures. This allows certain textures, such as the windows of buildings, to appear lit from within. Below are a couple of screenshots of this in action. This will eventually look even better with a bloom post-process.

Lighting Up

After moving everything to XNA 4.0, I decided to build a lighting system into Daggerfall Modelling Beta 2. I’ve always wanted to play with deferred rendering and it seemed like a good fit for Daggerfall’s many point lights.

If you’re unfamiliar with this technique, the gist is that different information about the scene is rendered into different buffers (collectively called a GBuffer) and combined together to make the final image. You can see three of these buffers in the debug screenshots below. From top to bottom are the color, normal, and light buffers. These get combined with a depth buffer to create our fully lit scene. The results are very fast, even on a mid-range GPU. The heaviest scene below is “Daggerfall from Above”, with almost every building and light visible. Total render time is about 12ms, and most of that is spent rendering the geometry. The lighting itself takes almost no time at all.

This is only the first of several visual enhancements intended for Daggerfall Modelling Beta 2. Don’t worry if you have an older computer and just want to export the models. You will be able to turn off or scale back these rendering features using options.

Daggerfall Castle Privateer’s Hold Throne Room
Daggerfall from Above Scourg Barrow Entrance

SVN Updated

The SVN repository has been updated to VS2010/XNA4.0 solution & code. If you are building DaggerfallModelling from source please ensure you have the latest version of the .NET Framework 4.0 and XNA Game Studio 4.0. You will also need to be using Visual Studio 2010 (or Express 2010) to load the new project.

A few bugs remain after porting to XNA 4.0. These will be ironed out over the next few weeks.