| Recent years, computer technology develops rapidly, computer animation is widely applied on entertainment, film, simulation and other fields. Human Hairstyle and animal hair on the realistic animation is extremely important, attracting a growing number of researches. Although the simulation of hair is very important, and yet, there has been a lot of research, but the ideal hairstyling and results show is still a challenge. The content of this paper includes hair modeling, hair styling, collision detection and response, hairstyles rendering, self-shadow.This paper describes and implements an algorithm which supports various hairstyles. a new rendering method, accelerated the rendering under complex lighting conditions, and can achieve a faster with the support of the graphics hardware.In this paper, strand model is used to express hair. Modeling a hairstyle by strands with the help of theory of fluid dynamics. It is a model with simple structure, which supports multiple hair styles, and can detect collisions between meshes and strands with high precision. It can also handle the collision response properly. Hair rendering, use the classic hair lighting model Kajiya-Kay illumination model for rendering right hairstyle. Meanwhile efficient simulation of hair self-shadow, by a deep shadow map technology. This paper presents a light decomposition algorithm to decompose a light into 3 components which parallel to the X, Y, Z-axis direction, and then these three components are handled. It can greatly decrease the complexity of rendering under the multiple light sources. This algorithm will be improved by using parallel computing.OpenGL is used as a development tool, has good portability. So this software features good portability, efficiency. It can archive hair styles with high quality on an ordinary PC. |