COMP770 Course Project - Sami Benzaid
Project Topic: Real-time rendering of realistic-looking grass
Presentation Slides: Click Here.
Motivation:
- I enjoy playing video games, and have played many of them in my lifetime. Many of the graphical elements of the games are done very well and look convincingly realistic, but there are certain others that stand out as blatantly unrealistic during gameplay. One such example is grass. I have yet to feel that grass in any game I've played looks realistic. If I crouch down and closely inspect the grass in a game, it is often the case that it appears to consist of a static, rather pixellated grass texture applied to an otherwise transparent vertical plane. Other times, when the grass is more complicated than a static texture, it is often very sparse on the terrain. I would really like to be able to see dense, realistic grass in a game, is it would increase the degree to which I feel immersed in the game when walking in an outside location.
Prior Work:
- There are a number of sources out there for the rendering of grass, either in real-time or otherwise. A few of the key sources I'll be looking at are listed here, and there will likely be additional ones that I will add as I work on the project.
- R. Cook et al. Stochastic Simplification of Aggregate Detail. Thanks to Professor Manocha for recommending this paper.
- This paper discusses a method for drawing a random subset of aggregate visual data (how much of the data is drawn is a function of several parameters, including the size of a bounding box around the data). This greatly reduces the amount of processing that needs to be done in order to draw such complicated things as plants with leaves, but it can likely be adapted to deal with grass.
- Kevin Boulanger's Website.
- He has done quite a bit with grass rendering, and has several papers available. He goes as far as to incorporate lighting, which I will likely not have a chance to get to in my project.
- E. Galin and P. Poulin. Real-time Rendering of Realistic-looking Grass.
- This paper discusses using BDFs (Bidirectional Texture Functions) to render grass in real-time.
Approach:
- When drawing the grass, it is important to have the most detail close to the camera. I would like to try and combine polygons and textures. Closest to the camera, the grass will be rendered using polygons. Further from the camera, the grass will be subject to the stochastic method (or something similar) as suggested in the Pixar paper, where only a random subset of it will be drawn. At a certain distance from the camera, no more grass polygons will be used, but rather synthetic, static grass textures created from the same grass polygons that are being drawn closer to the camera will be used.
Final Goal:
- To gain a good understanding of different methods that are used to perform real-time rendering of grass, by surveying many different papers on the subject.
- To implement a piece of software that generates terrain with realistic-looking (definitely not perfect, but at least convincing) grass in OpenGL, and allows the user to navigate around the terrain in real-time without experiencing excessive slowdown due to the grass geometry. Ideally, this would involve coming up with some combination of strategies to create the illusion of realistic grass (such as letting the quality of the grass be a function of the distance from the camera: perhaps close grass is rendered as detailed polygons, but grass at a distance is rendered as static flat textures).
Subtasks:
- March 15: Finish doing preliminary research on grass rendering (reading papers, thinking about how it might be implemented in software).
- April 07: Already be well into the development of my grass rendering implementation.
- April 30: Be roughly finished with the implementation at this point, probably just trying to fix bugs.
Update 1: March 15, 2009:
- I've talked to Christian, and gotten access to the Ray Tracing code subversion repository. I've got the code on my computer, and have started looking at how to use it. I will need to meet with Christian again to talk about the ray tracing code in more detail in the near future.
- Luckily, assignment 3 is dependent on a derivative of the ray tracing platform that I will be using for my project, so this will give me some additional experience using it.
- I've been reading up on Ray Tracing, as this class is the first time I've ever come in contact with it. (Mostly from the book suggested on the Homework 3 webpage: “Realistic Ray Tracing” 2nd edition – Peter Shirley)
- I've been looking into where to get geometry for the grass that I'd like to ray trace. There is a program that Christian suggested to me called "ngplant" (ngplant.sourceforge.net). It can generate geometries for various types of plant life. I'm currently exploring how I might use it to create geometry for grass. It's unclear at this point if I will be using it to generate geometries, or if I will find some grass geometry somewhere else.
- I've been going through some tutorials on Blender, so that I can learn how to use it, as it may come in handy to generate certain types of object files for the grass geometries for use with the ray tracer.
- My intent is to come up with a small handful of grass geometries, and then write a program that can apply different transformations to them (i.e., rotation, scaling, etc...) so that the amount of geometry information stored in memory is very small. Then, I will use fast ray tracing with levels of detail (gamma.cs.unc.edu/RAY) to ideally ray trace realistic-looking (in the geometric complexity sense) grass as quickly as possible.