Return of the Graphics

I’ve been taking a small break from the physics stuff and returned to tightening up the graphics on level 3 (that commercial still makes me laugh even after all this time) :D

Physics Framework with Scattering and Bloom

Basically I’ve revisited the atmospheric scattering using the excellent sample on FilouGK’s Blog to help me out. Swapping it in instead of the old Preetham Scattering I had done before was very painless and the sun size really makes the difference (I actually had the sky done in the last batch of shots but I’ve gotten the atmosphere on the terrain now which is the main reason for this entry) ;)

On top of that I added some Bloom. I was a bit unsure about it at first (as it tended to make things look blurry), but it is safe to say it has grown on me. I reckon I’ve gotten it just about subtle enough and I love the way it makes things look a lot warmer :)

I’ll probably continue on with the graphics development for a little longer as there are a couple more things I’d like to play around before returning to the Physics ;)

Edit: I’m aware that some people have a dislike of bloom in general, so I took some comparison shots to give a better idea whether or not I have overdone it :)


My pokemans, let me show you them

Progress has been good and I’m again at a stage where I am happy to show what I’ve been up to :)

XNA Managed Physics Heightmaps 01XNA Managed Physics Heightmaps 02XNA Managed Physics Heightmaps 03

So far I’ve implemented boxes, spheres, capsules and heightmaps. Multi-body actors and convex shapes are kind of done but not finished or tested. You may of course be thinking “Since when were you going to do capsules? Where are the cylinders!” and you would be right to think that :)
It appears that although Tokamak supports cylinders by name, they aren’t really cylinders. I’d really love to have proper cylinders in there at some stage, but that will have to wait until this managed version is at least near as feature complete as the original Tokamak. Also, joints are next on my list and they look pretty complicated, so there may not be any updates for a while ;)

Another thing I’ve been thinking about is the name. I have a fair few ideas myself about what to call this library but I reckon it will be fun to see what other people think it should be called ;) Personally I’d like it to have a really really silly name, something that makes me laugh when others have to say it when asking questions about the library :D
So, if you have any ideas, I’d be happy to hear them ;)

As usual, I’ve uploaded another video on YouTube here. It is hardly a directorial masterpiece, but it at least shows off what the library can now do.

I’ll probably add a project page for this later on today, put some more info about what is done, what isn’t done and what I’d like to add myself. :)


It’s physics, Jim, but not as me know it

I said last time I was working on something a bit cool, and here it is :D

XNA Managed Physics Library Initial Test 01XNA Managed Physics Library Initial Test 02XNA Managed Physics Library Initial Test 03
XNA Managed Physics Library Initial Test 04XNA Managed Physics Library Initial Test 05XNA Managed Physics Library Initial Test 06

About a month ago, Tokamak went open source. I had commented in the GDNet news post how nice it would be if somebody ported it so it was completely managed. Well, I decided to be that somebody ;)

The library is 100% Managed Code and tied quite tightly to the XNA Framework (for all the various Vector structures etc.) so it should run on Xbox 360 with absolutely no problems. I’m sure I’ll find out if that is the case if/when I get myself creator’s club subscription :)

When porting I actually made a massive amount of progress in a matter of days, but, for what seems like forever now, I have been removing the bugs I introduced in that initial coding burst :(

The last major bug was causing bodies to sink into each other, but not all the time. And, due to floating point precision, tracing the bug by running identical scenes in native and managed was proving difficult. Long story cut short, I found the problem and now it runs great 8)

So far all I have put in are boxes (static and dynamic) but I should be able to put in the various other rigid body types that Tokamak supports within, literally, a few minutes if I wanted ;)

Support for Heightmaps and Joints may be a bit trickier but it is on my todo list for the near future.

Nearly forgot, I also put up a video on YouTube (cause stills don’t do it justice) ;)

All the best,


I’ve been tinkering away with some shadows for the past couple of days. I wasn’t going to post screenshots until I’d brought them into the terrain renderer, but I think posting often will help keep me motivated :)

Essentially a port of Oskari Nyman’s PSSM demo from here, the results are quite pleasing and a lot nicer than the (poorly done) standard shadow maps I used in Faith 8)

I am also really loving the artwork from creators.xna as it is a damn sight better looking than all those old models from the DX SDK ;)

There was a bit of jiggery-pokery involved in getting the .fbx files to render nicely with my own effects, without first feeding the effect through the Content Pipeline, but I think I’ve got it running pretty nicely now.

Parallel-Split Shadow MapsParallel-Split Shadow MapsParallel-Split Shadow Maps

I still want to give CSMs a go and I’m also going to try making the changes to my current PSSM implementation so they are PSVSM (Parallel-Split Variance Shadow Maps) :D


Madness? This is Sparta!

I’ve been working away at getting atmospheric scattering into my terrain renderer and so far the results have been quite pleasing 8)

It is basically an implementation of Preetham’s ATI demo/paper with all shaders rewritten by myself in HLSL. It is by no means finished, but I reckon it is a decent start ;)

I put up a youtube video here, but the quality isn’t all that hot, so here are a few screenshots as well :D

XNA Geomipmapping with Atmospheric Scattering 01XNA Geomipmapping with Atmospheric Scattering 02XNA Geomipmapping with Atmospheric Scattering 03

I still need to work on reducing the size of the sun as it is rather humongous, but it is exactly the same as the Preetham demo and I actually kind of like the heavily bloomed look ;)

Shadows are next, so it is time to start reading papers on Cascaded Shadow Maps. I love working with Terrain 8)