Monday, 10 November 2008

Hair Dynamics

Hair Dynamics is a much more vast and complex area than at first appears. Generally hair simulation needs to meet certain criteria, these are possibly best defined in Henrik Halén's thesis from 2007 as:

1. The ability to return to a predefined position at rest
2. Fixed length
3. Free movement
4. Inertia
5. Interaction with outer forces

These are listed in order of importance.

The same previously mentioned paper also does an incredible job of listing various approaches to simulation as well as rendering. Here are the reduced down versions of what is listed.

Verlet Integration - Used in many approaches to handle motion. New position computed using current and previous positions with respect to time. Said to have lower degree of error than Eulers method. Basic equation has no constraints but constraints can be added to it. Generally correction steps may need to be applied to maintain fixed length for the hair.

Adaptive Wisp Tree - Cylinder based approach. Uses nodes that can split and merge again. Tries to simulate the clumping phenomenon of hair. Splits occur with respect to acceleration and radius. merging occurs with respect to; relative velocities, radius of super node and the inverse of the splitting condition. Collisions carried out using spheres and cylinders.

Interactive Forest - Uses model based on trees minus branching (as generally hairs do not branch). I works due to the fact trees swaying tend to return to their original psotion also. Deals with angles as opposed to absolute positions so when it comes to rendering positions would have to be calculated based on the angles.

Cascading Spaces - Mathematically complex method. Calculates a the tangent space defined by normal, binormal and tangent between 2 nodes. Uses fixed reference nodes bound to corresponding strand nodes with elastic springs. Actual simulation uses the springs and Verlet Integration.

Spring Model - Possibly the simplest model so often favoured. Often assumes no elasticity in hair so segments maintain fixed length. Strands are basically "hung" from reference positions that are initially above where the hair is planned to sit. Spring strength an important parameter that may need to vary dependant on position and orientation.

One of the most confusing aspects when trying to research hair dynamics seems to be working out which method is actually being used as the methods tend to be combined or overlapped.

Friday, 24 October 2008

Rendering Methods

So far researching through various articles and papers has led me to see 3 main methods of rendering real-time hair.



The first is often referred to as the rendering of hair wisps as flat triangle strips, these wisps are sometimes given the name "hair patches". This method is a relatively fast method of rending hair but often has crticisms particularly about the behavioural aspects of the hair in real-time. The speed factor probably makes this method as the most accessible to use in computer games on current technology.
From 2004 "Real-Time Rendering of Human Hair
using
Programmable Graphics Hardware" Paper by
Martin Koster, J¨org Haber, Hans-Peter Seide


l

A method that has been repeatedy employed in Nvidia Demos is that of rendering each individual hair as a line. The major problem often found with this method of rendering hair is the speed issue as hundreds of thousands of hairs need to be rendered each loop (though modern shader technology is beginning to offer oppotunities such as implementing "tesselation"). Results of this method tend to look very impressive.


From
"NVIDIA Sponsored Session: Real-time
Hair Rendering on the GPU"
presentation at
Siggraph 2008




Lastly and probably the least likely rendering method to be able to employ in a real-time environment would be to use a static particle system. While the results in pre-rendered schemes seem very impressive there are risks of large overhead, even more so than that of rendering hair as lines. So far I have seen little evidence of use of this method of rendering in real-time applications.

Thursday, 23 October 2008

Worksheets and Meetings

Since the last update an idea for my research question has been decided.

Originally thoughts had been along the lines of doing a comparison for the experimentation section of the project. However the sheer volume of work that would have had to be done is too daunting and in most likelihood unrealistic. So after a suggestion from a colleague I opted for an option that involved a much slimmer learning requirement.

At current the question stands as:

Can an efficient and realistic simulation of real-time hair that could be used in a computer game environment be achieved on current generation hardware by moving most of the work to the gpu?

This question is still a little vague but it means that only one methods of rendering and modelling the hair behaviour needs to be chosen. I believe this is a more realistic workload for my abilities.

Also since the last post I have met with the first of my technical supervisors. He has suggested looking into a university past paper from 4-5 years ago and has made a few comments in general that have me thinking such as whether Bezier Surfaces would be good used for rendering hair in the hair patches method?

Friday, 3 October 2008

Topic Decided

For this week we had to decide on a topic for our honours project. Before this term had begun however I already had a pretty good idea of what I wanted to do. In fact I had even done some simple browsing previously... though nothing really to be considered research.

The topic I plan to cover for my honours project is real-time hair simulation. As yet however I have not decided on a specific area or direction in which to head. I need to look into more before I can really decide what area my research question is going to be directed at.

I know at current there are various issues and problem areas when it comes to real-time hair simulation in games.

First is the appearance factor. The rendering of real-time hair is one area where graphics in games still does not reach the same level of realism as the rest of the game. There are various methods used in both games and 3D films that could be worth looking into. Some techniques are better for short hair or fur and quite often these techniques are currently implemented in games, long hair however throws up various problems even still. Aspects as simple as lighting of hair can become complex when transparency and reflectivity are considered.

Another big area in real-time hair simulation is an area often overlooked or perhaps avoided, that of behaviour. Behaviour however is a very wide area to cover, ranging across all aspects of how the hair interacts with the surrounding environment; gravity, movement, wind, collisions and likely more. Even problems as simple as "What do you treat a simulated 3D hair as?" has impact on it's overall behaviour.

And lastly though probably most importantly is the fact that while various methods for both the rendering and behavioural aspects of real-time hair simulation exist there are often performance issues when they are implemented. Is it possible to have good looking hair that reacts to the environment and doesn't impact performance?

My topic area is a little broad just now, I need to research a bit still.

Blog Started

The purpose of this blog is to be somewhat of a diary for my 4th year honours project.

Each time something project related comes up it is my intention to add an entry in order to keep track of areas such as research, ideas and even general progress.