Wednesday 14 January 2009

Final proposal

Introduction:
The overarching aim of the project is to create a fairly realistic looking model of hair and fur which can be rendered in real-time and could be used in a game environment.

This is an area which has been somewhat neglected in game graphics, possibly due to the perceived difficulty of the subject. Most current methods of creating hair and fur depend entirely on the skill and time of the artist. More advanced techniques have already been used in games, such as Shadow of the Colossus, however they have never been widely adopted.

By implementing a procedural method of hair generation, coupled with some very clever optimization as presented by Lengyel et al, I believe it is possible to take a massive step forward in the visual quality of hair and fur in games.

To do this, I will investigate particle-based hair systems, then several possible alternatives and optimisations. This includes the relatively common overlapping polygonal strip approach as presented in the Black & White (Lionhead, 2001) games.

I will examine the volumetric texture-based technique presented by Kajiya & Kay in 1989, however this method has been shown to be too computationally intensive for real-time purposes. (Sheppard 2004, p.3) Optimisations based on this technique can be used in real-time and will form the core investigation of this project. (Meyer and Neyret, 1998, p.1)

I will investigate the shell rendering approach first presented by Meyer and Neyret. There are a number of improvements which have been made to their system, most notably by Lengyel with the introduction of fin textures. I will also look into projects which optimise these techniques for current graphics hardware using shaders. (Sheppard 2004, p.43)


Research question:
"Can hair and fur be added into a real-time, 3D, game environment? If so, what techniques can be used, and how effective are they?"


Project Execution:
Firstly, a basic 3D framework will be built as a testing environment. This will most likely be done on top of DirectX9 due to its more consistent shader support, although OpenGL remains a possibility at this point. The API chosen will not make any difference to the project beyond the initial framework setup and the shader language supported.

Once the testing environment is completed, I will begin implementing and testing the various techniques I have researched. There are three techniques I am hopeful for and wish to study in detail:

1.Particle-based hair
2.Overlapping polygonal strips
3.The shell and fins method as presented by Lengyel.

For the sake of simplicity, a range of test models with UV mapped textures will be found. This should provide a good indicator of how the different hair and fur types might look when applied to real game assets.

The initial creation for the hair system will be done using particles. Once the basic rendering is taken care of, the system needs to be refined and polished into a workable model of hair and fur. This involves creating adjustable parameters for the hair properties, such as:

  • Colour
  • Length
  • Curl
  • Density
  • Stiffness
  • Thickness

These parameters can stored in a texture (or textures) and UV mapped onto the test model. Hair directionality, or combing, needs to be stored as a vector.

While particle hair provides the basis for the other methods, it it likely too slow to be of practical use due to the large amount of calculation needed each frame. At this stage of development we can move on to implementing the more optimised texture-based techniques.

For each approach, time must also be taken to investigate possible optimisations for modern graphics hardware. The most obvious optimisation is to move the bulk of graphical calculation into the GPU with use of shaders. The implementation and optimisation of these three techniques will take the bulk of the project execution time.

When the rendering is completed to a usable stage, I will begin to compare the output of the program in terms of visual quality and framerate in order to determine which, if any, of these techniques may be suitable for 3D games.

However it is worth noting that, of the texture-based techniques, the shell and fin method seems to be the most promising for a real-time game implementation and will likely end up as the primary focus as the project moves towards completion.


Evaluation:
In order to determine a good measurement of visual quality, I will follow the same procedure presented in Sheppard's Real-time Rendering of Fur p.53. That is, take a real image of hair or fur and attempt to faithfully reproduce its visual properties using my techniques. This should give a fairly robust test of the methods, both individually and comparatively.

Of course, photo-realism is not always the intended goal in games. With this in mind, various effects will be created to find the visual limits and weaknesses of each technique.

To determine performance of each method, the framerate of the program will be used. While framerate is not a perfect measure of performance, it serves as a relative guide to compare performance between the different methods.


Issues:
There are a few potential issues which could cause problems, however these are fairly minor and unlikely to affect the final outcome of the project.

With the exception of particle-based systems, all the techniques listed are limited to creating short to medium length hair and fur. They cannot be used for long or extremely stylised hair, or to create complex hair interactions. They also sacrifice any complex, realistic dynamics for the sake of speed. (Sheppard 2004, p.14) Fortunately this is unlikely to be a problem for a game environment.

Another minor problem is that it is extremely difficult to measure the visual quality of hair and fur in, definite, quantitative terms. The quality must be judged by the viewer, in this case myself, and will be subject to the viewer's own bias.


Resource Requirements:
A standard, modern PC with a C++ compiler and either the DirectX 9.0c or OpenGL SDK installed. No other special requirements.


Conclusion:
Hopefully this project will provide some motivation for future development into this area of graphics. "A vast number of creatures in the animal kingdom exhibit some kind of fur." (Sheppard 2004) Hopefully in the future these creatures can be presented in full furry 3D.



References:

J. T. Kajika, T. L. Kay (1989) Rendering Fur With Three Dimensional Textures. ACM SIGGRAPH Computer Graphics Volume 23, Issue 3

A. Meyer & F. Neyret, (1998) Interactive Volume Textures. Eurographics Rendering workshop
1998, p. 157 – 168

J. Lengyel, E. Praun, A. Finkelstein, H. Hoppe, (2000) Real-Time Fur over Arbitrary Surfaces. [online] Available from: http://research.microsoft.com/~hoppe/fur.pdf

G. Sheppard, (2004) Real-time Rendering of Fur. [online] Available from: http://www.gamasutra.com/education/theses/20051028/sheppard_01.shtml

SCEI. (2006) Shadow of the Colossus. Playstation 2. SCEI.

Lionhead Studios. (2001) Black & White. PC. Electronic Arts. Feral Interactive http://www.lionhead.com/bw2 (Last visit 08/12/2008)


Bibliography:

M. Pharr, (2005) GPU Gems 2. Addison-Wesley Professional

Hubert Nguyen (2007) GPU Gems 3. Addison-Wesley Professional

Blender Foundation (2008) Blender [online] Available from: http://www.blender.org/development/release-logs/blender-246/hair-and-fur/