27 Sept 2007

Nebula3 September SDK

Here's the Nebula3 Sep 2007 SDK. This is - as always - work in progress.

Some of the new stuff:
  • new and improved HTTP debug pages
  • added some more subsystem docs
  • new Base namespaces which contains all XxxBase classes (mainly to keep the Doxygen documentation clean)
  • work-in-progress Lighting subsystem with dynamic spotlights and soft shadows
  • RenderTarget resolve-to-texture more flexible (resolve texture can have different size from the render target, and can resolve into a sub-rectangle of the resolve texture)
Compatibility info:

The Test Viewer has been tested on nVidia 6600 and 7800 cards only. The 6xxx cards don't seem to support texture filtering on G16R16F textures, thus the shadow edges won't be properly smoothed (they still look quite ok though). I think the ATI cards are also unable to filter FP textures. The proper solution would be to implement the linear filtering in the shader. This is planned but not implemented yet.


25 Sept 2007


I give up, I seriously can't take the pain any longer. No Halo for me until I can get my hands on the english version. Whoever's responsible for the german audio track in Halo3 either needs to be fired or promoted to a position where he can't do any more harm. Why oh why couldn't they simply keep the original audio track and provide german subtitles?

German Halo3 WTF???

Nooooooooo........ ...... oooooooh!!!

I can't believe this shit! No English audio track in Halo3? It would be ok if the German voice track wouldn't be such a terrible piece of shit. Seriously who did they hire to do the voice overs? Interns? Halo fanboys? It is very easy to get very good voice actors in Germany for a reasonable price. People who actually dub movies as their profession, not some backyard junkies who apparently did the Halo3 voice overs. What an epic fuckup. The voice acting in Halo3 would be just barely ok for a porn movie, not Microsoft's flagship game on the 360.

This is going to be hard...

Smooth Shadows

I'm currently working on the dynamic shadow system. This is a shot from the PC-version with 2 shadow-casting spotlights (animated lights, it actually looks much cooler in motion):

I have decided to use Variance Shadow Mapping in Nebula3, a relatively new approach which allows the shadow buffer to be linearly filtered. This is a big win because post-process filters can be applied on the shadow buffers, and all the hardware filtering features of the graphics card to fight aliasing (mipmapping, min/mag filtering, anistropic filtering, etc...) can be used when sampling the shadow map. It produces wonderfully smooth shadows from relatively low-res shadow buffers (the scene above uses 256x256 shadow maps).

The current implementation uses one "big" shadow buffer (512x512, pixelformat is G16R16F) which is re-used for all shadow-casting light sources:

This is then downsampled to 256x256:

Finally the downsampled buffer is blurred into a shared shadow buffer which stores the shadow buffers of all active shadow casting light sources into a single texture:

The pixel junk in the right half are the two unused slots, since there are only 2 (out of currently 4) shadow casting light sources in the scene. A texture array would be a better solution here, because at the moment sampling will "leak" into the neighbouring shadow buffer (for spot lights this isn't a big problem, since this will happen outside of the light cone). But texture arrays don't exist on DX9, so unfortunataly that's not an option.

There's still a lot of work to do on the lighting system, but the intermediate results look very promising. I think I will first bring the 360 version uptodate before moving along. It's lagging behind a few days now.

I have started to play through Ninja Gaiden Black again. Even among current 360 titles it would still look quite good, and it runs wonderfully on the 360 in 720p and 16:9. I finally want to beat the game on Normal (first time I only managed Ninja Dog... yeah I know). Everything about this game is simply kick-ass (well... except from the "story", yawn...). A real f*cking shame Team Ninja didn't release Sigma on the 360 as well. This was actually the only time where I was tempted to get a PS3, but... I seriously can't justify spending 600 Euro just for one game (which I already played).

I also got Halo3 today, I didn't expect to see it on shelf already (European launch is tomorrow). It stood there right amongst all the old 360 titles. Germany is still PC-land. No doubt ;)

19 Sept 2007

Nebula3 State Switch

A couple of interesting things have happened recently here at the labs:
  1. Nebula3 has now the status of an official Radon Labs project, which means it has a budget and two of our elite-veterans (Johannes and Malte) will start working fulltime on Nebula3. This will accelerate development immensely. One or even two prototype projects will accompany N3 development which will define clear "real-world-goals" for feature planning. I feel this is exactly the right time to add manpower because all the important architectural decisions have happened, and now it's time to (a) broaden the feature set, and (b) start to revise and "port" Nebula2 and Mangalore subsystems which don't need a complete redesign.
  2. Our first Wii devkit has arrived (actually, it arrived already a few weeks ago), and now with the additional forces added to N3 development, we're going to start a Wii N3 version which will be developed side by side with the 360- and PC-version.

12 Sept 2007

Status update

I'm in the middle of the lighting implementation. Here's a little screenshot from the 360 version:

Please excuse the crude lighting setup, this is for testing so it needs to be somewhat exaggerated. The model is from Drakensang, so it isn't actually modelled to be displayed upclose like this.

2 Sept 2007

Even more HTTP (and some Bioshock)

Last HTTP post, promised :)

I've added image support to the HTTP server this Saturday. Turns out no Base64 encoding is necessary (don't know why I assumed this), it's perfectly fine to just send the raw image data over the line. I wrote a StreamTextureSaver class which can save the content of a texture into a stream in a couple of formats (JPG, BMP, PNG and DDS). It's platform-specific and just uses the D3DXSaveTextureToFileInMemory() function on Win32 and Xbox360, so the Nebula3 code is really small. To send a texture to a web browser, the following steps are necessary
  • lookup the texture object in the SharedResourceServer
  • create a StreamTextureSaver and attach it to the texture object and the output stream (which represents the body of the HTTP response)
  • call Save() on the texture, this will save the image data to the output stream
  • set the matching MediaType on the content stream (i.e. "image/png")
  • that's it, the HttpResponseWriter will wrap everything into a valid HTTP response message and send it off to the web browser; everything is in-memory, no disk i/o is involved
This also automatically works for RenderTargets, because render targets expose their resolve texture as Nebula3 shared resource.

There's a special method SaveScreenshot() in the RenderDevice, which basically does the same thing, but uses the backbuffer as the image source. This special case is necessary, because the backbuffer cannot be exposed as a texture (well it could, but this would add unnecessary overhead).

To capture a screenshot from the currently running Nebula3 application into the browser, simply navigate to

This produces a PNG screenshot. To get the screenshot as JPEG:

To retrieve the content of a shared texture resource (including render targets):[resId]

For instance to get the content of the example Tiger's texture:

This will only return currently loaded texture resources. If the texture is not currently loaded, a "404 Not Found" will be returned.

The HttpServer is going to become an extremely useful debugging tool. One can easily navigate through an application's runtime data on a much higher level then a source-level debugger allows, since the data can be presented in an application-specific way. It's the perfect complement to source-level debugging and other specialized debugging and profiling tools like PerfHUD or PIX. And since it's HTTP everything also works over the network by design. This is especially useful for console development, where it's often not possible or desirable to add a complex in-game user interface just for debugging and visualization purposes.

Beyond debug visualizations the whole HTTP communication stuff is really inspiring. Imagine what would be possible with XUL (Mozilla's user interface XML dialect).

Some Bioshock-in-progress notes: I'm about 8 hours into the 360-version. As expected the game is pretty damn near perfect (I have only 1 small gripe: the human character models... compared to the graphics quality of the environment and the Big Daddies and Rosies they really look quite ugly). But overall: a masterpiece! Definitive must-play for everybody who loves computer games. The immersion and mood can't be described with words. It's obvious that the developer dodged any face-to-face dialogs (and right so). Yesterday I almost expected to actually meet a sane person face-to-face... but nope, it's all tapes and monitors, I was a little bit disappointed at first... but honestly, it wouldn't have looked very good (quality-wise) if they had chosen to talk directly to other characters. And handling the story in such an "impersonal" way actually adds a lot to the loneliness and depressive mood of the game. The German localization is *excellent*. Usually I'm playing the original version, but Bioshock's voice-over localization is extremely well done. "Movie-quality-well-done".