Interactive Virtual Hair-Dressing Room

  • Published on

  • View

  • Download


This article was downloaded by: [UOV University of Oviedo]On: 22 October 2014, At: 07:35Publisher: Taylor & FrancisInforma Ltd Registered in England and Wales Registered Number: 1072954 Registered office: Mortimer House,37-41 Mortimer Street, London W1T 3JH, UKComputer-Aided Design and ApplicationsPublication details, including instructions for authors and subscription information: Virtual Hair-Dressing RoomNadia Magnenat-Thalmanna, Melanie Montagnolb, Rajeev Guptac & Pascal Volinoda MIRALab University of Genevab MIRALab University of Genevac MIRALab University of Genevad MIRALab University of GenevaPublished online: 05 Aug 2013.To cite this article: Nadia Magnenat-Thalmann, Melanie Montagnol, Rajeev Gupta & Pascal Volino (2006) Interactive VirtualHair-Dressing Room, Computer-Aided Design and Applications, 3:5, 535-545, DOI: 10.1080/16864360.2006.10738407To link to this article: SCROLL DOWN FOR ARTICLETaylor & Francis makes every effort to ensure the accuracy of all the information (the Content) containedin the publications on our platform. However, Taylor & Francis, our agents, and our licensors make norepresentations or warranties whatsoever as to the accuracy, completeness, or suitability for any purpose of theContent. Any opinions and views expressed in this publication are the opinions and views of the authors, andare not the views of or endorsed by Taylor & Francis. The accuracy of the Content should not be relied upon andshould be independently verified with primary sources of information. Taylor and Francis shall not be liable forany losses, actions, claims, proceedings, demands, costs, expenses, damages, and other liabilities whatsoeveror howsoever caused arising directly or indirectly in connection with, in relation to or arising out of the use ofthe Content.This article may be used for research, teaching, and private study purposes. Any substantial or systematicreproduction, redistribution, reselling, loan, sub-licensing, systematic supply, or distribution in anyform to anyone is expressly forbidden. Terms & Conditions of access and use can be found at Design & Applications, Vol. 3, No. 5, 2006, pp 535-545 535 Interactive Virtual Hair-Dressing Room Nadia Magnenat-Thalmann, Melanie Montagnol, Rajeev Gupta and Pascal Volino MIRALab - University of Geneva (TUthalmannUT, TUmontagnolUT, TUguptaUT, TUvolinoUT)U@miralab.unige.chU ABSTRACT Hair designing is one of crucial components of the hair simulation tasks. The efficiency of hair modeling is very much determined by the interactivity and the ease-to-use the designing tools within an application. This paper presents a unified framework that uses the various key techniques developed for specific tasks in hair simulation and to realize the ultimate goal of virtual hair-dressing room that is simple to use but quite effective for generating fast hairstyles. Successful attempts have been made to handle the different challenging issues involved in simulation of hair at interactive rates. Effort has been put in developing methodologies for hair shape modeling, hair dynamics and hair rendering. A user friendly interface controlled by a haptic device facilitates designers interactivity with the hairstyles. Furthermore, designers visualization is enhanced by using real time animation and interactive rendering. Animation is done using a modified Free Form Deformation (FFD) technique that has been effectively adapted to various hairstyles. Hair Rendering is performed using an efficient scattering based technique, displaying hair with its various optical effects. Keywords: Hair Simulation, Hair Modeling, Force feedback Interaction, Volume deformation. 1. INTRODUCTION Hair is essential for characterizing a virtual human and so is the need to design a suitable and realistic looking hairstyle for it quickly. Interactivity plays an important role in determining the efficiency of the design application. The process is further facilitated by an interface that provides user with simple but essential tools for performing interactions like for handling, cutting, and brushing hair displaying dynamic and optical behavior at interactive rates. Usually this a complex task and the techniques developed have to compromise between interactivity and realistic appearance. The difficulties with human hair simulation arise due to the number, the structure and the interaction between hair. On a scalp, human hair are typically 100,000 to 120,000 in number. With this number, even simplified simulation takes vast amount of computing resources. Moreover, the complicated structure and interaction between hairs present challenges in every aspect of the simulation. Furthermore, addressing these issues to simulate hair accurately and realistically for realtime indeed makes virtual hair simulation technically a demanding process. (a) (b) (c) (d) Fig. 1. Various hairstyles created, animated and rendered using our interactive virtual hair-dressing room (a) is the initial Hairstyle, (b),(c), and (d) are the hairstyles created using different interactive tools (cutting, curling and brushing). Downloaded by [UOV University of Oviedo] at 07:35 22 October 2014 Computer-Aided Design & Applications, Vol. 3, No. 5, 2006, pp 535-545 536 Geometrically hair strands are long and thin curved cylinders. The strands of hair can have any degree of waviness from straight to curly. Thus, a modeling method should provide the control over a large group of hair strands effectively, but still allow control over detailed variations. The structure (or style) of hairs as a group is often more meaningful than the properties of individual hair strands. The interactions between hair play an important role in generating these structures. Therefore, a modeling method should take into account the interactions as well as the individual properties. Furthermore, from a designers aspect all these features should be available in an interactive system for fast prototyping of various hairstyles. The sense of immersion is also increased if he/she gets back force feedback while performing different interactions with the available tools. This requires integrating a haptic interface which provides user with increased degree of freedom as compared to a mouse and considerably increases the comfort, performance and productivity. Real time simulation is another important feature that increases the sense of involvement during hair designing. It is obviously more realistic to see dynamic changes in the hairstyle as the user performs interactions. But, the complexity of hairstyles makes it a challenge for animating them on virtual characters with performances compatible with real-time. Each hair strand has a high degree of flexibility and easily gets bent upon external forces such as gravity and collisions, while it strongly resists linear stretches. The difficulty is actually to build a mechanical model of the hairstyle which is sufficiently fast for real-time performance while preserving the particular behavior of the hair medium and maintaining sufficient versatility for simulating any kind of complex hairstyles. The hair motion is affected by many subtle factors, such as wind forces, air drag, gravity, head motion and wetness. More interestingly, the static charge and friction between neighboring hairs often cause a group of hairs to form a cluster that moves coherently. Collisions between such clusters are important otherwise the hair interpenetration will be quite unnatural and distracting, and overall affect the realism of the simulation. This behavior is highly dependent on the type of hairstyle (straight or curly, long or short) and condition (stiff or soft, dense or sparse, dry or wet). The hairstyle also plays an important role in how the light interacts with the hair which in turn is essential to be simulated because specifically self-shadow within hair gives important clue about the hair style itself. Rendering human hair often requires painful labors as well as demanding computational power. Optically, hair has many interesting phenomena such as anisotropic reflection, strong forward scattering, and translucency. A correct reflectance model is thus needed to compute reflectance off the individual hair geometry. While, a local shading model approximates coloring of an individual hair strand, interactions between hairs require efficient methods to compute such global illumination effects. In particular, the shadow between hair provide essential visual cues for the structure of hair as a group. Hair is inherently volumetric and the internal structures can be correctly illustrated only with proper shadow. Furthermore, most of the current hair rendering simulations lack physical basis. All the opacity-based approaches consider a transmittance function that compute attenuation of light only towards the hair strand for which shadow is being computed. This is not physically correct as there is also an attenuation of light when it is scattered from the hair strands towards the viewer, and must be incorporated for the final hair color. Moreover, variations in shading due to animated hair also need to be considered for realistic results. Our work is motivated by the need to have a unified model for facilitating hairstyling effectively utilizing various methodologies, like interactive modeling, simplified but efficient animation, and optimized yet realistic rendering giving a real-time performance. The specific contributions of this paper are: An interactive modeling system to allow the user with an easy and flexible modeling capability to design any hairstyle with added features of fine-tuning. The system should perform all the hair manipulation tasks (e.g. cutting, curling) at interactive rates. A mechanical model that efficiently simulates the motion of individual hair strand as well as the interactions between hairs themselves and the interaction between hairs and other objects. A scattering based illumination model that produces realistic rendered hair with various colors and showing optical effects like shadow, specular highlights. Importantly, all these simulations are performed in real-time. The rest of this paper is organized as follows: in the next section we give a brief overview of various hair simulation techniques. In Section 3 we present various considerations and the ideas of our approach for styling, animating and rendering. In Section 4 we present the different interaction tools developed for designing hairstyles. Section 5 is dedicated to our lattice based mechanical model highlighting its key features and benefits. Section 6 gives the description of our scattering based illumination model discussing the various optimizations made for rendering at Downloaded by [UOV University of Oviedo] at 07:35 22 October 2014 Computer-Aided Design & Applications, Vol. 3, No. 5, 2006, pp 535-545 537 interactive rates. We demonstrate the results and discuss the performance for the unified hair styling application in Section 7. We conclude with a look at avenues for future work in Section 8. 2. PREVIOUS WORK Researchers have devoted a lot of time and effort for producing visually convincing hair, giving more believability to virtual humans. Though implementing a unified framework for creating hairstyles using dynamic models along with realistic rendering has not been actively considered, a number of algorithms have been developed to resolve most of the challenges in the three main hair simulation tasks hair shape modeling, hair animation and hair rendering. Specific advancements have been made in each of these tasks. 2.1 Interactive Hair Styling There exist different techniques proposed in the literature in order to provide tools for interactively creating new hairstyle. Most of these techniques involve designing an interactive 3D user interface giving user control to place hair on any part of the 3D model. The hairstyling process in most cases is very much linked to hoe the hair are modeled. Use of cluster or wisp for representing hairstyles is a common approach in most systems. Chen et al [6] presents a model that represents each cluster with a trigonal prism and the hair strands within a cluster is modeled by the distribution map defined on the cross-sections of the prism. Similar to this approach, in [34] a wisp model is used but represents a set of a 2D patch projected on a cylinder as boundary. The developed tool allows user to choose number of patches, position them and then individually or collectively modify parameters such as length, stiffness, blending for the patches. More approaches using different wisp models have been discussed in [24][26][28] and [39]. Lee et al [24] use a new hardware rotor platform to perform different styling operations in order to increase the interactivity in 3D. Parameters like hair length, clump-degree, wisp size and clump-rate can be modified to obtain precise control on the hairstyle. In [26], the user defines the region on the head scalp for hair growth and a silhouette of the target hairstyle which is used for automatically generating a silhouette surface. This is followed by automatic creation of representative curves of the clusters later used for cluster polygon generation. A similar sketch based hair styling approach is presented by Malik et al [28]. Recently a more user-friendly interactive tool called Hair Paint has been introduced by Heranandez et al [12]. The system is based on a 2D paint program interface and color scale images to specify hair characteristics. Some of the researchers have also presented systems exploiting fluid flow [10] and vector fields [41] for explicit hair modeling. Other techniques [16][37] use hybrid models combining benefits of wisp model and strand model. In general, all these systems result in creating nice static hairstyles, but are too slow to be able to interact with hairstyles when dynamic behavior is added. Also utilizing force feedback devices for more interactive control of designing tools as applied by Otaduy et al [31] is still to be explored for hair. 2.2 Hair Animation Usual simulation techniques may consider any compromises between simulating individually each strand and simulating a volume medium representing the complete hairstyle. In the context of efficient simulation, reducing this complexity and the number of degrees of freedom of the model is essential for fast computation. The first idea is to consider that hairs of neighboring locations share similar shapes and mechanical behaviors. In many models, such hairs are grouped into wisps, sometimes also called clusters. This technique was defined by Watanabe et al [38], and has been frequently used since with many variations in [5][6][32][40]. Another evolution is to replace the hairs by approximate surfaces (strips or patches), as done by Koh et al [17][19], or even volumes that can easily be modeled as polygonal meshes, such as the thin shell approach of Kim et al [14]. Animation is done by specific mechanical models associated to these representations, which also include specific methods for handling collisions efficiently as described by Lee et al [23]. Combining various approaches can lead to Level-of-Detail methods where the representation is chosen depending on the current requirement of accuracy and available computational resources. A good example developed by Bertails et al [3] is based on wisps tree, and a similar approach from Kim et al [16] is based on multiresolution clusters. Advanced Level-of-Detail methods also include combination of strands, clusters and strips modeled with subdivision schemes and animated using advanced collision techniques, as developed by Ward et al [36]. In the specific context of fast real-time applications, cluster and strip models are good candidates. However, they still suffer from various problems, such as the necessity of collision detection between hairs, and their inability to represent efficiently some mechanical properties, such as bending stiffness. Furthermore, these simulation techniques have not yet been considered for efficient use during styling. Specific approaches are oriented toward realtime applications, such as the Loosely Connected Particles approach described by Bando et al [2] and the real-time short hair model from Guang et al [8], but they suffer from scalability problems and hairstyle design constraints because of their underlying mechanical models which is suitable to specific hairstyles, usually long and straight hair. Downloaded by [UOV University of Oviedo] at 07:35 22 October 2014 Computer-Aided Design & Applications, Vol. 3, No. 5, 2006, pp 535-545 538 2.3 Hair Rendering Hair rendering involves immense problems ranging from large data to complex optical behavior and thus has been a challenging yet captivating research topic since quite some time. The research started with the limited problem of fur rendering by Kajiya et al [13], who also derived a local anisotropic lighting model for hair that has been widely adopted and extended in later illumination models [1][7][22]. Recently, in [29] a new physical scattering model for hair has been defined, giving a theoretical model for scattering of light from hair fibers and predicts effects invisible in previous models. Though impressive results are obtained, this approach involves a lot of mathematical computations, making it unacceptable for interactive purpose. Simulating self-shadows in hair has been an important contribution of [15][22][25]. Although, these techniques produce excellent results but need large memory storage and processing time making the unsuitable for real-time. The recent giant leap in performance of graphics card has made it a possibility to have faster and realistic results. Koster et al [20] intensively utilize the GPU for shadow map computation, though the approach doesnt take animation of the hair into consideration. In [30] the issue of shadow in dynamic hairs is efficiently dealt by computing a 3D density field and storing the samples of the hair density function in a compact way. The use of density clustering gives an advantage of not explicitly computing the entire transmittance function for time-varying hair data, resulting in better rendering speed and quality. More recently [4] presented an animated hair rendering model based on a 3D light oriented density map. Unlike the previous interactive approaches, this algorithm computes accurate self-shadow on a standard CPU independent of any GPU at interactive rates. The paper combines a volume representation of density with a light oriented sampling for self-shadows. 3. CONSIDERATIONS AND APPROACH OVERVIEW Hair styling scheme can be divided in two parts: firstly, defining a set of general characteristics of a hair style, and secondly, varying set of characteristics of an individual hair. We choose to model hair utilizing the data representation of animation model [35]. This hair modeling technique allows modifying the geometry of the hair directly. We develop these parameters in two phases. First, we propose a set of static parameters for hair styling (geometric modifications), and then we animate using these parameters (update simulation). In order to increase the interactivity we have chosen to use a haptic interface. With this device it is now possible to see the virtual hair and other objects, to move and finally to touch them in the virtual environment. The using of haptic enables interaction with hair in real time. We present a system that provides the user with interactive and easy-to-use tools for hairstyling. Even though we have utilized a mechanical model in our simulation, the system is fast and the user can make modifications at interactive rates. In addition, the dynamic behavior results in more accurate and realistic simulation as it include influence on the styles due to gravity and other external forces. For animation, the system should be compatible with most approaches used for hairstyle representation and real-time rendering, and offer the designer the possibility of creating any kind of hairstyle that can robustly be simulated in any animation context. We intend to achieve this through the design of hair animation model based on volume deformations, with the aim of animating any complex hairstyle design in real-time. The idea of our method is the following: rather than building a complex mechanical model directly related to the structure of the hair strands, we take advantage of a volume free-form deformation scheme. We detail the construction of an efficient lattice mechanical deformation model which represents the volume behavior of the hair strands. The lattice is deformed as a particle Fig. 2. Framework for hair dressing room. Downloaded by [UOV University of Oviedo] at 07:35 22 October 2014 Computer-Aided Design & Applications, Vol. 3, No. 5, 2006, pp 535-545 539 system using state-of-the-art numerical methods, and animates the hairs using quadratic B-Spline interpolation. Another issue that needs to be considered during hair animation is collision. Since hair strands are deformed through FFD, there is no real need of detecting collisions between the hair strands, as they follow the volume of deformation of FFD which is rarely self-intersecting. However, we need to take into account collisions between the hairstyle and the skull. The hairstyle reacts to the body skin through collisions with a Keatball-based approximation. The Keatballs are represented as polynomial forces that are integrated in the mechanical model. The model is highly scalable and allows hairstyles of any complexity to be simulated in any rendering context with the appropriate tradeoff between accuracy and computation speed, fitting the need of Level-of-Detail optimization schemes. We also aim to have an optimized technique that decreases the complexities involved in hair rendering and simulates optical effects while incorporating hair animations at interactive rates. Our rendering data representation for hair volume is quite similar to the animation system [35]. Utilizing a similar representation also gives us an advantage of having a fast access to lot of information from the underlying animation model for rendering computations. Based on these considerations we model our illumination model as follows: The local illumination of hair is defined by a Gaussian function adapted to our strip representation of hair. The self-shadow computation for hair is similar to the volume rendering as we perform voxelization of hairstyle into a hair volume for opacity computation. For the case of animated hair, the new vertex positions are calculated, and based on the displacement of the hair vertex a refinement map is computed. This takes care of the hair density variations within the rendering lattice and is then used for `refining the shadow in animated hair. Our methods efficiency towards achieving fast updates is highly credited to the division of the pre-processing and the run-time tasks of the simulation. The model has been optimized to perform expensive computations, mainly involving physics, during pre-processing that contributes to the speedy performance of our illumination model without any significant degradation in quality. 4. USER INTERACTIONS We use PHANToM for the virtual manipulation of hair. Essentially it is a force feedback device and we have efficiently used it like a simple tool allowing interactions with virtual 3D objects. This haptic device replaces and increases the functional of the mouse. The force-feedback is used to detect collision of hair with the head, as well as to interact with the cells in the lattice. The system gives the user freedom to choose tools to modify hair collectively (using guide hairs) or individually. The user can choose hair via a 2D scalp map or make a more precise selection directly in 3D. Using the buttons provided with the PHANToM, the user can choose the tool to apply on the selection. While building this new hairstyle the user with his left can modify the camera position for better visualization, and with his right hand select and apply a set of tools developed to modify the hairstyle. Integrating these tools with our mechanical model produces realistic simulation that enhances the overall visualization during interaction. For efficiently realizing this effect, we create a lattice for the selected hair for animating them during interaction with tools using geometric and physics-based method. 4.1 Selecting Hair The first step in designing a hairstyle is to select a set of hair. There are different selection modes that are offered to the users. The interactivity is performed via the haptic device. We propose a point-based method for selection that involves implementation of 3 DOF force feedback. The selection is done by the position of the stylus of the haptic. If the stylus intersects a cell in the lattice, all the hair in that box are selected. This selection mode is linked to the discretization of the lattice, and does not allow selecting a set of hair between two cells. But generally, the hairdresser can select a set of hair as well as one by one via projection in the direction of the camera of the position of the stylus. After this selection step the user can add a set of hair using copy and paste tool. The user can change the position and the angles of rotation (via haptic) of the duplicate set of hair. For hairstyling operators animation we have limited the animation to specific parts where modifications have to be made. Thus, we create a lattice just for the selected set of hair and only this set is later animated as shown in green in figure 3. Limiting the lattice to a specific section of hair decreases the computational time and allows efficiently using the geometrics methods. These geometrics modifications dont change the form of the lattice. This technique also avoids a computation of self-collision detection between strips and provides good result in simulation. Downloaded by [UOV University of Oviedo] at 07:35 22 October 2014 Computer-Aided Design & Applications, Vol. 3, No. 5, 2006, pp 535-545 540 Fig. 3. Selecting and holding a group of hair. 4.2 Virtual Scissor The most important tool for a hairdresser is probably the scissor. In our technique we first choose a cut plane for modifying the hair. Three planes are proposed; a horizontal plane, an inclined plane, and a curve plane like the function sine. The choice of these planes is linked to the fact that with these planes, all type of cut can be realized. A mass-spring system representation is used for all strands in order to simulate dropping the hair cut during the cutting process. The implementation of this modeling is easy, and allows obtaining good results in short time. In order to increase the interactivity, it is possible to modify the position and the orientation of this cut plane by a line-based method (using 6DOF) via the haptic. The user can thus choose the cutting mode either by using a scissor (generally for a small set of hair) or by a cutting plane. Fig. 4. A sequence of hair cut in real time. 4.3 Virtual Brushing and Curling The virtual brushing and waviness tool involves a function of one parameter and allows modifying the curve of strands without using the position of points in the strand in 3D. We modify the hair beginning from the tip in the curving. Three parameters can be modified: the radius, the length of curve, and the direction of the brushing. Based on these parameters, a mathematical function is applied on the last node of all the selected hair resulting in curve hair. The choice of the mathematical function is based on the action to be performed or the tool required. When simulating waviness, the visual effect is similar to a compressed spring movement from top to bottom. When brushing, the movement of lattice node is away from the head and following the direction of the brush. The use of these techniques avoids us to compute collision between hair and an object (tools, comb for example). The visual realism is maintained because the simulation seems to be real. 5. LATTICE BASED HAIR ANIMATION Realistic animation of hair requires advanced models that deal with the complex strand structure of human hairstyles. The challenge is to build a mechanical model of the hairstyle which is sufficiently fast for real-time performance while preserving the particular behavior of the hair medium and maintaining sufficient versatility for simulating any kind of complex hairstyles. We overcome the difficulties through the design of a hair animation model based on volume deformations [35], with the aim of animating any complex hairstyle design in real-time. Downloaded by [UOV University of Oviedo] at 07:35 22 October 2014 Computer-Aided Design & Applications, Vol. 3, No. 5, 2006, pp 535-545 541 5.1 The Lattice Model We construct a 3D lattice around the head that includes all the hair. This lattice is defined by the initial positions of all its nodes. During animation, the lattice is moved according to the head motion. The resulting rigid-motion positions and velocities of the lattice nodes define the rigid motion pattern of the hair, in which the hair follows the head motion without any deformation. In our approach however, the lattice is furthermore deformed by mechanical computation. The actual position and speed of the lattice nodes are ruled by mechanical computation iterations that use the rigid motion states as equilibrium states. This mechanical model, aimed at providing the lattice with the volumic behavior of the hair contained in it, is constructed during preprocessing. 5.2 The Mechanical Model Different approaches are possible for designing this mechanical lattice deformation model. However, spring-mass approaches still seem to be the best candidate for designing really fast mechanical models. We have created a particular kind of interaction force that uses as attachment points any arbitrary point of the lattice, defined by its lattice coordinates. Hence, each attachment point corresponds to a weighted sum of a given number of lattice nodes. Hence, the mechanical model of the hair is defined as a sum of linear viscoelastic lattice springs relating the elasticity of each individual hair strand segment in the lattice model. Their viscoelastic parameters correspond to those of the modeled hair. The attachments of the hair extremities to the skull are modeled by stiff viscoelastic lattice attachments, which are positioned exactly at the end of each hair. In order to reduce the complexity of the model, we resample each hair during the model construction as segments defined by the intersection points of the hair line on the lattice boundaries. We furthermore carry out a simplification of the model by decimating the redundant lattice stiffeners (hair springs as well as skull attachments) until the expected number of stiffeners remain (Figure 5). 5.3 Lattice Interpolation As the lattice is deformed during animation, another issue is to re-compute the current position of each hair features for each frame. Depending on the selected rendering techniques and optimizations, these features may either be individual hair segments, or larger primitives such as hair strips or groups. For the best compromise between continuity and computation speed, we have selected quadratic B-Spline curves as interpolating shape functions, which offer second-order interpolation continuity. We can take advantage of the interpolation to enhance the attachment of the hair on the skull through rigid motion. For each interpolated feature, a deformation coefficient is defined which is a blending coefficient between the motion defined by the rigid head motion and the motion defined by the interpolated lattice position. Hence, progressively animating the root of the hair through rigid head motion rather than mechanics allows simulating bending stiffness of hair near its root, and also removes the artifacts resulting from the imperfections of the mechanical attachment of the hair roots to the moving skull. 6. SCATERRING BASED HAIR RENDERING Simulating fast and realistic complex light effect within hair is one of the most challenging problems in the field of virtual humans, both in terms of research and of development. Two main optical effects that contribute the most to realistic hair are the anisotropic reflection and self-shadows. We have developed a scattering-based fast and efficient algorithm that handles both the local specular highlights and global self-shadow in animated hair at interactive rates. We use a fast refinement technique [9] for incorporating illumination variations in animated hair from the encoded hair density changes considering the spatial coherency in hair data. Our methods efficiency towards achieving fast updates is highly credited to the division of the pre-processing and the run-time tasks of the simulation. At pre-processing we perform initializations that give us precise rendering information for static hair, and then perform an optimized update Fig. 5. The decimation process: From the strands of the hairstyle (up-left) is constructed the initial model (up-right). The model can then be decimated at will (down-left) (down-right), for better performance. Downloaded by [UOV University of Oviedo] at 07:35 22 October 2014 Computer-Aided Design & Applications, Vol. 3, No. 5, 2006, pp 535-545 542 of optical variations in hair based on the dynamics of the guide hair, taking into account coherency between the hair data. The various optimizations implemented result in interactive simulation while maintaining the aesthetic visual appearance of the hair. 6.1 Scattering-based Local Illumination One of the features of our local illumination model is that it takes into the fresnel reflection and orientation of the cuticles on the hair which gives a control on defining the anisotropy of the hair. In addition, it also involves a Kaussian function, which is not only important to provide physical basis to our model but modifications within the function also make it quite effective for our hair strips. We consider the Kaussian function taking into account slope variations both along the tangent and the bi-normal of the strip vertices. The model takes care of both the diffuse and the specular reflectance. Various parameters control the width and the shift of the specular highlights as well as the sharpness and the anisotropy displayed by the strips. 6.2 Scattering-based Self-shadow in Hair Our scattering-based approach considers two functions for shadow contribution. One function gives a measure of the absorption of light reaching a hair vertex and the second function considers the scattering from the hair. Since our shadowing model considers hair densities within the cells rather than explicit hair geometry, both the functions result in an overall reduced intensity of the hair vertex as visible to the viewer, which gives the shadowing effect within the hair. The two terms (absorption and scattering) included in our shadow computation can be visualized in Figure 6. Analytically, the absorption term generates self shadows due to its geometric and translucent nature while the scattering term is an additional component contributing to hair shading due to its material property. It is the collective effect of the two components computed for hair that gives lights intensity as perceived by the viewer and is correlated to the hairs shadow color, giving it a natural look. 6.3 Shadow Refinement in Animated Hair During animation visual artifacts like irregular shadow regions can pop up as the hair vertex move from one cell to another if density variation within the cell is not properly dealt with. Our approach for incorporating variations in shadow in animated hair is based on the assumption that the hair vertices within a cell at initialization always stay within one cell after displacement. This assumption is valid not only from the physical aspect of the FFD-based animation model but also from real hair animation considerations where there is coherence among neighboring strands when hair is moving. Our idea is to encode the displacement of the particle during animation to give a measure of variation in hair density in the cells of the rendering lattice. 7. RESULTS AND DISCUSSION We have tested our virtual hair-dressing tool for creating various hairstyles as shown in Figure 1 and Figure 8. The implementations are done on a workstation with Intel Pentium4 and 3.4 GHz processor with a 1 GB main memory and a GeForce 6800 graphics card. Our computation algorithm is written in standard C++ and rendering is done using the OpenGL API. The initial hairstyle has been created using our in home hairstyler based on fluid dynamics [10]. Once the initial hairstyle is loaded as a hybrid model, computation is performed to prepare the initial mechanical and rendering model. We ran our algorithm to create short, curly and brushed hairstyles using our unified framework. We have tested the hairstyles with various complexities of the mechanical representation and have found that a mechanical model containing 100 attachments and 400 springs built on 343 lattice nodes is fairly accurate and with fast simulation. The model reacts to collisions with the head and the shoulder using 7 metaballs. The computations for local illumination are done at run-time for each vertex using the graphics hardware. For shadow computation we found that for all the hairstyles a lattice size of 128 128 32 was optimal enough to provide nice result at an interactive speed. Fig. 6. Variations in local specular highlights and the global self-shadows can be seen as the hair are animated and the light position is changed. Downloaded by [UOV University of Oviedo] at 07:35 22 October 2014 Computer-Aided Design & Applications, Vol. 3, No. 5, 2006, pp 535-545 543 In the whole simulation process rendering is the most time-consuming task. The initial hairstyle in Figure 1 consists of around 40K segments. The rendering for static hair under a single dynamic light on GPU runs at around 14fps. Simulation of rendered animated hair runs at 9-10 fps. While performing the user interactions, as the simulation is limited to only section of the hair to be modified, the average performance is better. As the interactions on the hairstyle are made the lattice for both animation and rendering are dynamically adapted to the modified data. During cutting, the cells containing the cut hair are deleted from the simulation thus further accelerating the process, although when brushing and curling the recomputation is done for calculating shadows based on the modified location of the hair segment which is slows the process. For creating hairstyles in Figure 1, the average frame rate was around 10fps. 8. CONCLUSION AND FUTURE WORK Our interactive hair-dressing room highlights the various developments made for providing an easily usable framework for hair styling. The use of a haptic interface is very advantageous during the designing process. It provides the user with more interactivity. This interface uses a 3D mouse for the aligning the head with the hairstyle and the haptic device for managing the set of tools for modifying the hairstyle. The overall performance is also increased by the fact that the users can effectively utilize both their hands in order to create new hairstyles by applying special virtual tool like cut plane. Implementing techniques with accurate force feed back during all the hair styling operations (combing, curling, cutting, and effects by cosmetic styling products) will provide our hair dressing tool more realism. Though these devices are usually costly and also take time to adapting, but once a user gets used to them, it increases the comfortability and saves a lot of time. Fig. 7. With the ease-to-use the application, designers can efficiently create hairstyles from images very quickly. Also, taking advantage of underlying FFD based mechanical model for dynamic simulation and the optimized scattering based rendering model for optical effect simulation, the interface provides an enhanced visualization of the hairstyling procedure. The FFD animation approach allows a clear distinction between the mechanical model that animates the lattice and the actual objects that are deformed by the lattice during the rendering. This makes the model highly scalable and versatile giving total freedom for hairstyle design, as hairs can be long or short, curled or straight, and even contain specific features such as ponytails, as well as facilitate designing level-of-detail schemes that can act independently on the mechanical simulation aspect and on the rendering aspect, without any particular adaptation of the model. Similarly, the rendering model is based on volume rendering and is independent of the geometry used. This makes it suitable for simulating self-shadows in any hairstyle. The various optimizations and the extensive use of graphics hardware, speeds up the rendering process allowing interactive hair manipulation. For handling variations in rendering due to animation we introduce a refinement technique, which is encoded based on the hair displacement vector. These models have been unified to successfully simulate some common user interactions with hair, like pick some hair, cut them and brush them and create realistic hairstyles. Downloaded by [UOV University of Oviedo] at 07:35 22 October 2014 Computer-Aided Design & Applications, Vol. 3, No. 5, 2006, pp 535-545 544 With initial results of our unified framework being quite promising we look forward to adding more features for better interactivity and enhanced visualization. The use haptic rendering algorithm increases the virtual interactivity a lot. Currently, we implement just rigid interactions within the different cells of the lattice. But we are working on the interacting with deformable objects. The problem with these interactions is the computational time. We have yet decreased this time in modeling hair like a lattice but the feed-back forces arent linked to the hair touch but the boxes. If the cells become deformable (likes our hair) the feed-back forces will become more linked to the reality. We are working on making our mechanical model more efficient and faster by making related computation on hardware especially for interpolation. We also plan to modify and simulate effects in hairstyles, both dynamically and optically, under influence of water and styling products. 9. ACKNOWLEDGEMENT This project is funded by the Swiss National Research Foundation. 10. REFERENCES [1] Anjyo, K., Usami, Y., Kurihara, T., A simple method for extracting the natural beauty of hair. In Proc. SIGGRAPH 92, vol. 26, 1992, pp 111120. [2] Bandi, Y., Chen, B. Y. and Nishita, T., Animating Hair with Loosely Connected Particles, Computer Graphics Forum, Proceedings of Eurographics, Vol. 22, No. 3, 2003, pp 411-418. [3] Bertails, F., Kim, T.-Y., Cani, M.-P. and Neumann, U., Adaptive wisp tree - a multi-resolution control structure for simulating dynamic clustering in hair motion, Symposium on Computer Animation03, 2003, pp 207-377. [4] Bertails, F., Menier, C. and Cani, M. P., A practical self-shadowing algorithm for interactive hair animation, Graphics Interface, May 2005, pp 71-78. [5] Chang, J., Jin, J. and Yu, Y., A practical model for mutual hair interactions, In Proceedings of Symposium on Computer Animation, Jul 2002, pp 51-58. [6] Chen, L., Saeyor, S., Dohi, H. and Ishizuka, M., A system of 3d hairstyle synthesis based on the wisp model, The Visual Computer, 1999, pp 159-170. [7] Daldegan, A., Magnenat-Thalmann, N., Kurihara, T. and Thalmann, D., An integrated system for modeling, animating and rendering hair, In Proc. of Eurographics 93, July 1993, pp 211221. [8] Guang, Y. and Zhiyong, H., A Method for Human Short Hair Modeling and Real-Time Animation, Proceedings of Pacific Conference on Computer Graphics and Applications, IEEE Computer Press, 2002 pp 435-438. [9] Gupta, R. and Magnenat-Thalmann, N., Scattering-Based Interactive Hair Rendering, In IEEE 9th International Conference on Computer Aided Design and Computer Graphics05, December 2005, pp 489-494. [10] Hadap, S. and Magnenat-Thalmann, N., Interactive hair styler based on fluid flow, In Eurographics Workshop on Computer Animation and Simulation 00, August 2000, pp 8799. [11] Hadap, S. and Magnenat-Thalmann, N., Modeling dynamic hair as a continuum, In Proc. of EuroGraphics 01, September 2001, Vol. 20, No. 3, pp 329-338. [12] Heranandez, B. and Rudomin, I., Hair Paint, In IEEE Proc. of Computer Graphics International 2004 (CGI), Creta, Grecia, June16 19, 2004, pp 578-581. [13] Kajiya, J. T. and Kay, T. L., Rendering fur with three dimensional textures, In Proc. SIGGRAPH 89, July 1989, Vol. 23, pp 271280. [14] Kim, T. and Neumann, U., A thin shell volume for modeling human hair, In IEEE Proc. of Computer Animation 00, 2000, pp 104111. [15] Kim, T. and Neumann, U., Opacity shadow maps, In Proc. of the Eurographics Rendering Workshop 01, 2001, pp 177182. [16] Kim, T.-Y. and Neumann, U., Interactive multi-resolution hair modeling and editing, In Proc. of SIGGRAPH 2002, pp 287294. [17] Koh, C. K. and Huang, Z., Real-Time Human Animation of Hair Modeled in Strips, In Eurographics Workshop on Computer Animation and Simulation, Springer-Verlag, 2000, pp 101-110. [18] Koh, C. K. and Huang, Z., Real-Time Human Hair Modeling and Animation, SIGGRAPH 2000 Sketches and Applications, 2000. [19] Koh, C. K. and Huang, Z., A Simple Physics Model to Animate Human Hair Modeled in 2D Strips in Real-Time, In Eurographics Workshop on Computer Animation and Simulation, 2001, pp 127-138. [20] Koster, M., Haber, J. and Seidel, H. P., Real-time rendering of human hair using programmable graphics hardware, In Proc. of Computer Graphics International (CGI04), 2004, pp 248256. Downloaded by [UOV University of Oviedo] at 07:35 22 October 2014 Computer-Aided Design & Applications, Vol. 3, No. 5, 2006, pp 535-545 545 [21] Kurihara, T., Anjyo, K. and Thalmann, D., Hair Animation with Collision Detection, In Proceedings of Computer Animation 1993, IEEE Computer Society Press, pp 128-138. [22] Leblanc, A., Turner, R. and Thalmann, D., Rendering hair using pixel blending and shadow buffers, Journal of Visualization and Computer Animation, Vol. 2, 1991, pp 9297. [23] Lee, D. W. and Ko, H. S., Natural Hairstyle Modeling and Animation, Graphical Models, Vol. 63, No. 2, 2001, pp 67-85. [24] Lee, C.-Y., Chen, W.-R., Leu, E. and Ouhyoung, M., A rotor Platform assisted System for 3D Hairstyles, Proc. WSCG 2002 (the 10th International Conference in Central Europe on Computer Graphics, Visualization and Computer Vision02), Plzen, Czech Republic, February 2002. [25] Lokovic, T. and Veach, E., Deep shadow maps, In Proc. of SIGGRAPH 00, 2000, pp 385392. [26] Mao, X., Imamiya, A., Anjyo, K., Sketch Interface Based Expressive Hairstyle Modeling and Rendering, IEEE Proc. Computer Graphics International (CGI04). [27] Magnenat-Thalmann, N., Hadap, S. and Kalra, P., State of the art in hair simulation, In International Workshop on Human Modeling and Animation 00, June 2000. [28] Malik, S., A Sketching Interface for Modeling and Editing Hairstyles, Eurographics Workshop on Sketch-based Interfaces and Modeling, 2005. [29] Marschner, S. R., Jensen, H. W., Cammarano, M., Worley, S. and Hanrahan, P., Light scattering from human hair fibers, In Proc. SIGGRAPH 03, July 2003, Vol. 22, pp 780791. [30] Mertens, T., Kautz, J., Bekaert, P. and Reeth, F. V., A self-shadow algorithm for dynamic hair using clustered densities, In Proc. of the Eurographics Symposium on Rendering 04, June 2004, pp 173178. [31] Otaduy, M. A., Jain, N., Sud, A. and Lin, M. C., Haptic Display of Interaction between Textured Models, Proceedings of IEEE Visualization Conference, 2004, pp 297-304. [32] Plante, E., Cani, M.-P. and Poulin P., A layered wisp model for simulating interactions inside long hair, In Proc. of EuroGraphics, 2001, pp 139-148. [33] Rosenblum, R., Carlson, W. and Tripp, E., Simulating the Structure and Dynamics of Human Hair: Modeling, Rendering and Animation, The Journal of Visualization and Computer Animation, Vol. 2, No. 4, 1991, pp 141-148. [34] Schmith, C., Koster, M., Haber, J. and Seidel, H-P., Modeling Hair using a Wisp Hair Model, Research Report MPI-I-2004-4-001, 2004, [35] Volino, P. and Magnenat-Thalmann, N., Animating complex hairstyles in real time, In Proc. of ACM Symposium on Virtual Reality Software and Technology(VRST04), 2004, pp 41-48. [36] Ward, K. and Lin, M. C., Adaptive grouping and subdivision for simulating hair dynamics, In Pacific Graphics Conference on Computer Graphics and Applications 2003, pp 234243. [37] Ward, K., Lin, M. C., Lee, J., Fisher, S. and Macri, D., Modeling hair using level-of-detail representations, In Proceedings of Computer Animation and Social Agents (CASA), 2003, pp 4147. [38] Watanabe, Y. and Suenaga, Y., Drawing human hair using the wisp model, In Special issue on Computer Graphics International89 (CGI89), May 1989, Vol. 7, pp 97 103. [39] Xue, Z. and Yang, X. D., V-HairStudio: An Interactive Tool for Hair Design, IEEE Computer Graphics and Applications, Vol. 21, No. 3, 2001, pp. 36-42. [40] Yang, X. D., Xu, Z., Yang, J. and Wang, T., The Cluster Hair Model, Graphical Models, Vol. 62, No. 2, 2000, pp 85-103. [41] Yu, Y., Modeling realistic virtual hairstyles. In Proc. of Pacific Graphics 2001, 2001, pp 295304. Downloaded by [UOV University of Oviedo] at 07:35 22 October 2014