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.

Building From Source and Other Issues

I’ve received a few emails from programmers trying to build Daggerfall Modelling from source and experiencing problems. The reason for their frustrations is that Daggerfall Modelling is built as a VS2008/XNA3.1 project. This means it will only build with Visual Studio (Express) 2008 with XNA Game Studio 3.1 installed. Attempting to build with VS2010/XNA4.0 will fail due to breaking changes in the latest version of XNA.

I also get the occasional email from Windows XP users with an older version of the .NET Framework 2.0 (pre-SP2) that experience a crash when opening a dungeon. This problem is caused by a bug in the .NET Framework 2.0 that was resolved in Service Pack 2, and can be fixed by upgrading/patching .NET.

The reason I stuck to older versions was to ensure my tools remained accessible to more people. On the flip side, not everyone wants to install an older version of Visual Studio and XNA just to compile my code. I’m also running the risk that Windows XP users will come across that crash without having read my getting started page for Daggerfall Modelling.

After serious thought, I have decided to make some changes to my source code:

  • Solution format upgraded to Visual Studio 2010 / Visual C# 2010 Express.
  • Daggerfall Modelling and XNALibrary will be refactored for XNA Game Studio 4.0.

The DaggerfallConnect class library and Daggerfall Imaging 2 will remain based on .NET 2.0 for now, but I might bring these forward at a later date.

The SVN will be updated in the next few days with these changes. The next release of Daggerfall Modelling (Beta 2) will require the latest versions of .NET and XNA Frameworks to run.

Daggerfall Modelling Collision and Gravity Preview

I’ve completed the first pass at collision and gravity systems in Daggerfall Modelling. This still needs a few passes to fix some bugs, but is largely completed.

I’m not implementing a full physics simulation, just camera-scene collision and simple velocity for gravity. This is a looong way from a real game system, but it’s more than acceptable for a fancy model viewer. If you’d like to see an early preview of this feature check out the YouTube video below. This was recorded while using an XBOX360 controller, which is why you see a crosshair in the middle of the screen.

Daggerfall Modelling Beta 1 Released!

The first beta release of Daggerfall Modelling is now up for download. I have decided not to enable gravity and collision in this release because I am not happy with the state they are in. They will be enabled in the next release. Following are the final release notes for this version.

  • Added a Quick Search feature to search pane.
  • Search pane can be collapsed.
  • Region accurate billboards (rocks, trees, etc.) now decorate the scene.
  • Region accurate sky in exterior free camera views.
  • Adjust sky appearance with time of day slider.
  • A compass is now shown in free camera mode (bottom-right of view).
  • Play with interactive objects in dungeons (levers, doors, lifts, etc.).
  • Explore using an XBOX360 or compatible controller.
  • Invert mouse-look and controller-look.
  • Updated engine. Many improvements to scene management and versatility.
  • Overall performance improvements to search and load times.

If you are installing Daggerfall Modelling for the first time, make sure you read this first!

The controls have changed in some places. Any view rotations on the left mouse button have been moved to the right mouse button.  This has been done to free up the left-mouse button for new features down the road. For updated information on controls in the views, check the appropriate page in the Daggerfall Modelling Wiki.

I hope you enjoy this release of Daggerfall Modelling.