Pages

Thursday, 23 December 2010

Anti aliasing

I've wanted to implement  some form of anti aliasing for a while now so I took a break from playing through the recent Humble Indie Bundle and looked into it. There are several different options when it comes to AA in deferred rendering so I've started with what seemed to be the easiest. The method I've used here is the one outlined in GPU Gems: Deferred Shading in Tabula Rasa and I haven't really deviated from that article with regards to AA.

I also took the opportunity to look into applying a post process sharpen to the overall image. The method is known as unsharp masking and it's an effect a lot of digital artists use to spruce up their images. It goes back further actually and I was surprised to learn that the technique was pioneered in conventional photographic darkrooms.

You can see some examples of AA and unsharp masking below. Be sure to view them full screen without any scaling as the difference is hard to spot when the images are down sampled. In some areas the sharpen effect over sharpens fine details and increases the aliasing problem although for the most part the effect is an improvement.






















Fullscreen examples (click for larger versions)


With AA
No AA


With AA

No AA




With AA
No AA


Well that was fun, back to playing Cortex Command... sniping the engines off drop ships never get's boring ;)

Monday, 13 December 2010

Concept Art - Starman

It's concept time again :) This time around it's a concept for Rusts protagonist who for now I'm just calling the Starman. This is my second attempt at the character, you can (sort of) see the first version in this concept. That version was more futuristic looking but I like the lo-fi direction this is heading in, if you can call a space suit lo-fi!
Like most of the concepts I've posted so far I started out with a 3D render, which you can see below. I often find this to be the fastest way to work as it gives you a very solid base to start from.

Monday, 6 December 2010

SSAO

I recently decided it was time to take another look at SSAO as it's a technique that should complement lighting volumes quite well. Due to their sparse nature lighting volumes don't provide mid/high frequency lighting detail so SSAO should help add some of that lost lighting detail back into the scene.

There's already been a heck of a lot written about SSAO and I don't have much more to add so my plan is to keep this post fairly brief. My first implementation attempts were several years ago now and although the results were okay the shaders were pretty complicated. They often involved sampling both normal and depth buffers, reconstructing 3D positions and also required lots of per pixel matrix multiplications. The technique shown here only requires a depth buffer and is quite straight forward to implement. You can read all about it in Rendering techniques in Toy Story III on the Advances in Real-Time Rendering in 3D Graphics and Games  SIGGRAPH 2010 page.

For these shots I'm using a total of 32 SSAO samples per pixel. If that gets to be too much of a frame rate killer I can dial it back but for now it's looking pretty good. The SSAO only affects the ambient light provided by the light volume, direct light remains unaffected.

Isolated SSAO



SSAO with light volumes




Full lighting with textures



The original museum model, complete with some awesome dinosaur skeletons which aren't featured here, was built by Alvaro Luna Bautista and Joel Anderson and can be found at http://www.3drender.com/challenges/. I also used some textures from the crytek sponza scene which you can grab here http://www.crytek.com/cryengine/cryengine3/downloads.

Monday, 29 November 2010

Light Volumes - Natural History Museum

Moving on from the sponza scene I was keen to see how well lighting volumes would cope with a larger and more complex environment. The most complex scene I had to hand was this Natural History Museum model, more details of which can be found at the end of the post. I've been meaning to test Bluestone with this scene for quite some time so I thought I'd post the results.

After settling on a volume size of 128x64x64 it was then a case of finding and eliminating light leaks. This largely involves cloning walls and floors between areas of high contrast to prevent samples from bleeding. It's a pain but fairly straightforward and with a high enough volume density is only necessary in a few key areas. Where I to increase the volume size to 256x128x128 then the light leak issue would probably solve itself, shortly followed by sparks flying out of my graphics card.




For these shots I'm also trialling the use of six separate colours per voxel. In previous light volume posts I was storing one colour value and six luminance values. It remains to be seen if this approach will be practical in the long term but it definitely looks nicer. These screen shots are all taken directly from an XNA based rendering test bed. The test bed is largely unoptimised and was running the scene at about 20-30fps. 





The lighting volume was rendered in Bluestone and took about 12 minutes in total. As it's a light volume we have lighting information for the entire space so giant animated robots are easily supported...




...stay tuned for a video :)

The original museum model, complete with some awesome dinosaur skeletons which aren't featured here, was built by Alvaro Luna Bautista and Joel Anderson and can be found at http://www.3drender.com/challenges/. I also used some textures from the crytek sponza scene which you can grab here http://www.crytek.com/cryengine/cryengine3/downloads.

Wednesday, 3 November 2010

Concept art - crash

Took a break from coding to do some concept work for Rust.