Skip to content
May 9, 2011

Final Update: Week 12 + Easter work

Ok, final update, here goes.

So the project is pretty much wrapped up, and the programming for the project has been concluded, lest I find any heart stopping bugs. I got everything I planned in Week 12 in, in Week 12 and have spent the last few weeks polishing the application and adding an extra GUI layer to the application.

Somewhere in between that I found time to finish my other piece of coursework, a terrain editor and 4000+ word report on it.

My main focus now is on the write up, that’s been drafted, has been for a few weeks. I have a fortnight, in between meetings and working in that stupid shop, to redraft and add to it. Then it’s show time.

The showcase is on the 20th of May, a day after the project has to be submitted. Hopefully the turn out there will be good so I get the chance to show the project off.

Anyway, that’s it for this blog. Once submission is over with, I’ll add full details about the project, as well as all the work I’ve done for it. The work will then be added to my main blog and the accompanying portfolio, and then this blog it self will be absorbed into that.

CYOTFS.

April 2, 2011

Week 7, 8, 9, 10 & 11

Ho boy, so I kind of missed a few weeks didn’t I?

Well from my notes I can tell you this:

Week 7: The glorious SSAO was achieved in Week 6, so Week 7 was spent perfecting and optimising. I noticed that you could get a performance boost by decreasing the buffer size of the AO map, although with this a separate shader would be required to merge the AO map and the colour map. This extra pass doesn’t drop the performance due to the small calculation it has to perform.

Week 8: Experimentation and a failed implementation of a blur shader to blur the result of the SSAO and hopefully improve the quality of it.

Week 9: Began working on AO maps.

Week 10 & 11: These weeks continued tweaking and attempting to implement the blur, alongside developing a second piece of coursework.

Week 12: Hopefully I’ll get the blur finished, and then get the AO maps done and in the app.

March 6, 2011

Week 6 Update

This week has been a week of experimentation and polish.

As Monday began I had a working AO algorithm that produced some likeable results at reasonable frame rates. However there was still some work to be done in terms of perfecting the results. I began the week working on an alternative piece of coursework for another module. This left little time for experimentation as both tuesday and wednesday for me are packed to the brim with shifts at various places of work. Monday and Tuesday afternoon allowed me to experiment with the various parameters for the algorithm, and pick and choose what worked best and on what hardware.

So far I’ve found that on an Nvidia 9600m GT graphics card in my laptop, that 16 to 24 samples can be taken by the algorithm and the application will still run at 30-50 frames per second.

On my more powerful AMD Radeon 4850 HD, 64 samples can be taken and the application far exceeds 60 frames per second.

On thursday, a blur shader was implemented to smooth the result of the SSAO algorithm. Upon doing this, it was discovered that a part of the algorithm had been misrepresented, and once this had been fixed, an immediately smoother result was acquired without the need for a blur algorithm.

The introduction to the dissertation has also begun being written. This should be finished on Tuesday afternoon. I will also be spending the next week finalising the models in the scene, and creating their accompanying AO maps. Then I shall begun to set up methods to switch between the different modes of the application, and ultimately allow for quick comparisons.

February 21, 2011

SSAO? What SSAO?

Oh THAT SSAO.

In seriousness though I finally cracked SSAO and got it working into my application. It’s interesting noting the performance differences on my two GPUs. My laptops Nvidia 9600m GT can handle the AO at around 16 samples* per frame and still produce really nice results. Where as my desktops Radeon 4850 can produce results at up-ward of 64 samples per frame however the results are less subtle, and perhaps less desirable?

It’s all coming together, next step is to get some examples of static ambient occlusion and see which looks and performs the best. Oh and tidying up the code…

Perhaps now would be a good time to get that other piece of coursework out of the way?

*Samples is referring to the pixel in the depth/normal map that the current pixel is currently being tested against.

February 12, 2011

Rage post, or: why is there so little documentation?

So I’m finally trying to implement my own SSAO into my app. Interestingly enough I understand the technique, drawing normals and depth information to a texture, using that to sample points and work out and occlusion factor, and multiply that by my scene image to darken the correct parts.

It’s the fine detail that I’m having trouble with. There’s documentation on calculating the occlusion factor, which is primarily why I understand the technique. The frustrating thing is a lack of documentation on the prior components of the technique. Sure the SSAO shader should tell you what values to store and how to store them, but given that this is my first run at this I feel like a little more description and a little less assumption wouldn’t have gone a miss.

On the positive side of things I think I have an idea of what to do, following some advice from the gamedev.net forums. What will follow is a report on how well that went… once I’ve tried the updated idea.

February 1, 2011

Shadow maps

Over the past couple of days I have been working on implementing shadow maps. I do have a framework for generating and drawing shadow maps and shadows now, but it needs some tweaking to be perfect. Most of this will be done on Thursday.

It uses a low resolution texture to draw the shadow map too, 256×256 to be precise. The quality of the shadow isn’t terribly important to me right now. Just need something as a proof of concept. More importantly I don’t want it getting in the way of SSAO render times.

Anyway, here’s the results.

January 27, 2011

Blog Time.

Okay. So this week I’ve finally been able to get back to full work capacity after recovering from a crippling case of the flu. In doing so I have fired myself into working on the project.

This week I was tutored on generating ambient occlusion maps from within Maya 2011, this will be helpful when it comes to the comparison part of my project later on.

Software dev wise, I have implemented a very basic animation framework. I gave myself two weeks to do this, so now I’m using the spare time to catch up on the milestone I missed last week. This is; getting the 3D scene together.

The 3D scene itself will be a work in progress as the project develops, but for now I intend to load in a few models I feel will demonstrate SSAO quite well.

In terms of bug fixing, I was able to fix a lighting issue by implementing a new phong lighting shader. I’ve also encapsulated the code for using multiple render targets into their own class, which will come in handy when it comes to using multiple passes to calculate the occlusion.

Follow

Get every new post delivered to your Inbox.