CGT Honours Project Blog

Created a blog on detailing the progress of my honours project dissertation. The project is based on using OpenGL to implement Global Illumination lighting to a heightmap generated terrain.

The blog can be found here

Edit: I’ve also managed to import blog from so you can now read all about it here !!!


May update!

How fast time has passed! I’ve been very busy the last month or so finalising and debugging the program itself. I’ve also working on my dissertation at the very moment.

Happy to report that I have a program to show! After a lot of trying I’ve decided to ditch the idea of using shaders completely. I’ve tried using GLSL (which was very tricky for my intended purpose) and even Cg when GLSL didn’t work. After asking around in the forums I’ve found out that the shader programs have limited ability to process data and texture calls.

The problems were solved when I switched to using CPU only. I’ve re-structured the whole framework and it is now very simple to read and also make changes. This does come with the price of sacrificing performance as the code could be further optimised for that.

Anyway, I’ve settled on a novel Spherical harmonic lighting and ray casting hybrid solution. I’ve managed to implement dynamic lighting, soft shadowing and inter-reflected on textured surfaces using this method. I admit that this solution is not (yet) 100% real time and some values are precalculated before runtime but I think that at an honours project level, this is a very good achievement and experience gained.

Here are some screenshots of the program in action :

SH lighting with shadows :

SH lighting with shadows and inter reflections:

The works! Sh lighting, soft shadows, inter reflections and fully textured with simple animated water:

I’ve also output some basic debugging informations such as ray samples and loading times through the console window:

It’s normally around 17 seconds on my computer but I have a lot of background applications open so I guess that slowed it down a little. Considering the code could be further optimised and also the number of samples this is considered good results.

Right, now back to the dissertation!


Progress update – 22nd March 2010

It’s been a long while since my last update but progress is good so far. Due to time and resource contraints, I’ve decided to omit several features from the application and decide to focus my research on the GI aspect.

What I have done:

  • Framework – Basically have the “finished” framework. Just some testing on the shaders
  • Thesis writing – Have started planning on what to write and am beginning the first chapter – Introduction

What I am still doing:

  • GI techniques research – basically this will be an ongoing effort throughout the project
  • Writing the shader – This is fairly complicated and takes some time to get it right.
  • Testing – Just to see there’s no bugs

What I haven’t done:

  • Water effects and vegetation – not very sure at the moment if I can manage to implement GI on them as it will take some extra work. Concentrating on finishing the shader first before attempting this. I could have some simple water effects and maybe vegetation that is not lit by GI but again will look into this after completing my shader.

Problems faced and anticipated:

  • Procedural shaders – one of the hardest aspect in this research. A lot of reading to do and testing. Derek’s method uses the DirectX HLSL which have built-in multipass and custom render target feature while I have to deal with OGLSLs Frame Buffer objects and maybe 3D textures to get things working.
  • Cutting out of features – my initial scope for the research seems to be a little bit demanding and due to the time plus resource contraint I might have to cut back a little. I am not sure if I have enough time to fully implement GI for the water and vegetation at this point.

Conclusion so far:

Global Illumination seems to be a fairly involving topic. From my progress so far I can see now that my initial ideas would require a lot more time. However, I have done substantial research and are now trying my best to get the shader coding done. If no major problems crops up (fingers crossed!) I should have a working demo to show some basic GI effects on terrain in OpenGL. So hopefully I can have some nice pictures up on the blog.

However I feel that the most important bit will be the dissertation where I would have to document what I’ve read, what I’ve tried, what worked and what didn’t and lastly why. Time organisation is critical here as writing the dissertation would also take up a big chunk of time. I would have to get all the resources properly organised and catalogued on top of producing a good write up detailing the whole research.


Progress update 9th February 2010

Here is a summary of my progress thus far:

What I have done:

  • Initial Research – Covering GI techniques
  • Basic Framework study – Finalising the shaders etc, building a “vanilla” structure
  • Resource gathering for report

What I am still doing:

  • GI techniques research – basically this will be an ongoing effort throughout the project
  • More work on framework – Terrain generation and testing
  • More testing – Theories and implementation of them in framework, tweaking

What I haven’t done:

  • Start on thesis
  • Have a solid framework

Problems faced and anticipated:

  • Buggy framework – shaders
  • Proper structure/format of thesis
  • Resources required to write dissertation