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.