Wednesday 18 November 2009

RQ Workshop

Below are the answers provided to the RQ Workshop worksheet (Worksheet 4)

1) What is the name of this module, how many credits?
CS1004 – Honours Project Planning & Reporting

2) Your technical supervisor, how many times have you met?
Only met him once but the first meeting was very production, it gave me a lot of new ideas for the research question.

3) How frequently do you update your blog?
Once a day, sometimes one every 2-3 days depending on how much progress I made. I would update my Project Diary more often than the blog as it’s informal and I could jot down rough ideas.

4) Have you included both you worksheets in your blog?
Yes, I have.

5) Have you made sure readers can leave comments and you can annotate the blog entry based on these feedbacks?
Yes, I have.

6) Have you subscribed to any game related forum and posted your RQ research ideas and got feedback?
I have posted on the GameDev forums asking for people’s comments but so far it doesn’t have any replies yet.

7) Have you looked for additional feedback other than the ones I’ve prescribed?
Not at the moment.

8) What backup procedure have you implemented?
I have used a program called Blogger Backup Utility to backup the blog in XML format so I can restore it if the blog is accidently delete. I have also saved the whole page as html so that I will still have the pictures on the blog.

9) How long do you spend for your Honours project activities?
To be honest I haven’t been really spending enough time during the first few weeks of the project. I have now scheduled my activities better so I am spending an average of 2 hours a day (excluding weekends) on the project.

10) What is your RQ?
What are the techniques involved in real time lighting effects for procedurally generated terrain? However the research question might be slightly tweaked later on for the final proposal submission.

11) Why is it important?
It will help me understand more about lighting in graphics programming.

12) How will you answer it?
First step is a lot of reading. I must source all the related books and papers to understand more and finally focus on the final method of approach.

13) So what will be your measure of success?
I will be happy if I can implement a demo that shows a photorealistic rendition of a procedurally generated terrain.

14) What will be the significance of what you have done?
I hope that this will give me an opportunity to enrich my CV and to help me seek employment that hopefully will specialize in the field of graphics programming.

Tuesday 27 October 2009

New Inspiration

First meeting with technical supervisor, Matthew Bett taken place today. The meeting was very productive and the outcome was excellent as the discussions fuelled ideas and probably a new direction for the project.

Previously, simpler lighting techniques were considered such as height based lighting, slope lighting and lightmapping algorithms. Currently, the consideration of rendering a High Definition Range Imaging (HDRI or just HDR for short) terrain/scene contained within a skybox is considered. Basically HDR renders a scene using  lighting calculation using a larger dynamic range as compared to traditional methods. This will greatly enhance the realism on the scene.

The challenge now is to consider how to handle materials in the scene which consists of mainly the terrain mesh. The terrain would also be largely static so that could be a challenge to bring out the HDR qualities. The idea of using a HDR Environment map as the light source and reflection map is being investigated at the moment as it is not sure how well it could be implemented in the application.

Below is an example of how HDR can greatly boost the realism of a computer generated scene :



 

Example from the popular PC game Crysis

Complex 3D models won't be featured (or will only be featured minimally) in the demo so most of the HDR lighting will be done on the terrain itself. At this stage it is not yet certain of the real time performance and also the chance of procedurally generating such a scene.

Soft Shadows - This is also considered to be implemented in the scene

Changing of primary light source position/direction and also consideration of auxillary light sources
This is yet another problem that has to be researched into.

There's seems to be abundant techniques out there for photorealistic computer graphics rendering. The next aim is to pick out suitable ones for the research.

Thursday 22 October 2009

Cloud Shadows?

I found another cool example that I would wish to implement in my demo - Cloud shadows on terrain. I think it would be very cool especially if the shadow is smooth and follows the curvature of the terrain surface. I wonder what happens if shadows overlapped though, ie the shadow from clouds with the shadow from the terrain (shadows generated by higher "cliffs" onto flatter terrain).

Anyway, here's the Youtube video :

Wednesday 21 October 2009

Worksheet #3

At the moment of writing this I am still waiting to see Matt Bett to discuss particulars of my project. The meet is currently scheduled to this Friday. So there could be some changes pending this post which I will update as necessary.



Introduction

Computer generated 3D terrain is important and popular in many applications. Games ranging from first person shooter to strategy implements some form of terrrain generation. Realistic computer generated terrain is also used in advanced mapping software and also in simultors used to train pilots and military personnel. Terrain simulation is popular not only in computer games but also used as a virtual tool for busineses and also in military simulations. A very good example is a 3D geospecific terrain created to train soldier fighting in Afghnistan. Generated using a proprietry software called the "Virtual Reality Scene Generator" developed by MetaVR, it could generate over 9,600 square kilometres of geospecific landscape with 500 accurately modelled buildings. According the MetaVR's developers (2009), "Unlike the simplified, flattened terrain used to simulate urban environments in most image generators and video games, MetaVR’s Afghan village is set within mountains, complex terrain of varying elevation, and cave complexes enabling realistic training scenarios for operations in mountainous villages."[1]

Lighting is also an important and integral part of 3D terrain generation. It greatly adds to the realism and the complexity of the scene. The main objective of this research project is to investigate and implement lighting on a procedurally generated terrain. Hopefully from the research I would determine an optimized and effective way of lighting a terrain. Lighting a textured terrain could greatly improve the level of its realism. However, as some lighting techniques require heavy computation it could impact the rendering performance of the terrain. There's a lot of techniques and algorithms out there aiming to overcome this problem. The research will attempt to investigate and compare these techniques and algorithms and hopefully develope a custom hybrid solution. The key is to try and strike a perfect balance between realism and performance.

Motivation

Realistic terrain rendering is almost associated with expensive computational requirements. It will be interesting to research into methods of improving this situation and also to push the boundary on how realistic a terrain can be rendered in real time. By completing this project, hopefully an optimized and realistic method could be determined.

Research question

What are the techniques involved in real time lighting effects for procedurally generated terrain? 

Addressing the question

The first phase of the research is too implement a simple "sandbox" to test multiple variables and apply several different lighting methods. The OpenGL API will be used to render the 3D world containing the terrain. The terrain would be procedurally generated for real time testing. Performance will be tested with a FPS counter to determine which algorithm would produce the highest FPS. The second phase will finalize and fine tune the suitable researched technique to be included in the final demo. There will also be an addition of functions enabling the user to tweak some variables such as light angle and intensity to further observe the effects on performance and rendering quality. Hopefully, a novel method will also be discovered from the research.

Resource requirements

At the moment, the required resources are :

1) Microsoft Visual Studio 2005
2) OpenGL API
3) Related books and articles on the internet



References

1) metavr (2009) MetaVR announces new Afghanistan 3D Terrain and the Release of Virtual Reality Scene Generator Version 5.5, [Online], Available: http://vresources.org/node/2009 [21 Oct 2009].

Bibliography

1) Trent Polack. (2003). Chapter 4 Lighting Terrain. In: Andre LaMothe 3D Terrain Programming. Cincinnati: Premier Press. p57-72.

2) Daubert, K., Schirmacher, H., Sillion, F X., Drettakis, G., 1997. Hierarchical Lighting Simulation for Outdoor Scenes. Eurographics Rendering Workshop, [Online] Available at: http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.56.1893 [Accessed 19 October 2009]

3) Roettger, S., Frick, I., 2002.The Terrain Rendering Pipeline. Proc. of East-West Vision '02, [Online] Available at: http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.1.6167 [Acessed 20 October 2009]

4) Watt, A., Policarpo, F. 2001. 3D Games: Real Time Rendering and Software Technology. New York, New York: Addison-Wesley ACM Press. 

 

That concludes my draft proposal so far. I have also attached a Youtube clip of the 3D Procedural Terrain demo in OpenGL which I submitted as coursework last year. It uses a very simple shader for lighting the terrain hence very little to no shadowing.

   

Thursday 8 October 2009

Lightmaps

Found this cool clip showing the use of lightmaps and some optimization implemented to increase FPS. This is done in OGRE though but it does give me some idea what to do with my project. Instead of just top down view I will incorporate real 3D view.

credits of video to : HexiDave



Wednesday 7 October 2009

Worksheet #2

How fast time has passed and its now week 3! Anyway, will attempt to answer the questions posed in Worksheet #2

Formulate a research question for your project.

I have decided to forward my research question or rather research topic as " An investigation into real time lighting effects for procedurally generated terrain ". I could have phrased this in a question format such such " What are the techniques involved in real time lighting effects for procedurally generated terrain? " but I feel that the former is more suitable since I will be in fact investigating the various techniques, and perhaps come to a conclusion of an optimized one.

What is the focus of your project?

The focus of my project is to investigate and implement shadows in a procedurally generated terrain. I would hope to generate them dynamically and also implement shadowing by objects placed in the terrrain such as trees and also clouds.

(2)What information do you need to find out about?

I would first confirm if what I am planning to implement is realistic and achievable. If it isn't I will narrow my scope towards something more realistic. I would then have to find out in detail of various techniques currently used to generate shadows and also for lighting in a dynamically generated terrain.  I would also have to research which algorithms is most efficient and suited to what I am trying to achieve.


(3)What experimental work do you need to perform?

I would need to set up a simple procedurally generated terrain framework. I will then try to implement several popular methods of lighting to see which is more suitable to carry on with my research. I might also need to create other separate frameworks to test further issues. 


Can your research question be refined in the light of answers to 2 and 3? (the two questions above)

I believe it can be. Right now I only have basic information and idea of what I am trying to research. I believe with the correct information and exposure gained by implementing steps 2 and 3 I would be able to visualize my aim more clearly.


How will the information in 2 allow you to answer the research question?

The information in 2 not only allows me to answer the research question but also  helps me to fine tune my aim. A lot of background reading is important to understand and plan the research path. It is a crucial step to undertake before beginning the experimental work.








   





Monday 28 September 2009

Worksheet #1



This is the first Worksheet task given to us. The aim is to aid choosing a topic of interest for the Honours research project.


Below are the questions and my answers for them:


State the topic of interest that you may wish to take forward into a project


The topic I have chosen for my honours project is "An investigation into the techniques of terrain lighting in real time". Bear in mind though that this is a very rough title for it as I may fine tune it as the project progresses. However, the main aim is to look into methods of lighting a terrain in real time. I have previously done some work on terrain generation but I have never really got into the process of actually lightning it. In this research period, I hope to dwelve further and investigate various terrain lightning methods in real time.

Indicate the issues surrounding this topic that you may wish investigate


A 3D terrain wouldn't be complete without lighting. This is especially true for games with huge outdoor setting like flight simulators. It would greatly complicated the mood of the game if the valley casts its shadow upon the village below as viewed from a plane flying overhead or maybe a soldier hiding in the shadows of a huge rock as the sun sets.

Situations described above would basically require real time lighting to the terrain. Lighting a static non deformable terrain with a single static light source is simple compared to lighting a deformable or morphing terrain that has a dynamic light source. What I am interested to find out are the various algorithms used to generate shadow maps for the terrain and  how to optimize them for large scale terrain applications.

I am hoping to research further into producing a streamlined optimized algorithm that is able to consider factors such as self shadowing and shadow interaction with 3D objects in the terrain. Generating shadow maps is a resource heavy operation and I can imagine it only being worse in real time. With the advancement of today's GPU processing power, I am also hoping to utilize this power to further enhance the performance for generating shadows on terrain in real time.

Hopefully by the end of the research period I would be able to create an efficient and fast real time terrain lighting demo. I would hope to include simple 3D objects in the scene and perhaps incorporate some clouds to further demonstrate the real time shadowing capabilities.




Friday 25 September 2009

Interesting Examples

Found an interesting video on Youtube that has "video based terrain illumination" which I presume means GPU generated lighting for the terrain. It looks insteresting and perhaps I could investigate further into this subject.




Another example here on dynamic shadows:



Still need some external input in regards to my initial ideas. I am not sure if it will be adequate for the requirements of the honours thesis.

First Post

Finally got all the settings done for the blog. Time to progress with the task at hand.

First action was to have a brainstorm of the topics that I wish to cover. From the brainstorming session, the main "theme" of the honours project is on Terrain Generation. I chose this area because I am interested in it and also that I have some background knowledge in regards to this topic as my previous courseworks were based on this.

I have also looked at another topic such as realistic simulation of fluids and particles (such as fire, smoke, rain, etc). At the moment I am not sure of which should I focus on.