11.07.2015 Views

Artistic Simulation of Curly Hair - Pixar Graphics Technologies

Artistic Simulation of Curly Hair - Pixar Graphics Technologies

Artistic Simulation of Curly Hair - Pixar Graphics Technologies

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

p0p r 01p r 12pr 23p r 3 4p0p r 01p2pr 23p4h 1< h 1, h 2>< h 1, h 3>< h 2, h 3>h 2h 3h 1h 2h 3P 1h 4h 5h 9h 8h 10h 6h 7h 11h 12P 2r 4r 4Before pruningAfter pruningP 3Figure 7: Each particle ¯p i has an associated sphere with radius r i(left). We prune particles contained in overlapping spheres (right)to reduce the number <strong>of</strong> potential contacts.stretch. We compute the blend weight from the ratio <strong>of</strong> the totallength <strong>of</strong> the current curve, b, to the total length <strong>of</strong> the rest curve,¯b. By automatically adjusting the core stiffness and damping, weavoid the need for per-shot parameter tuning.4 <strong>Hair</strong>-<strong>Hair</strong> ContactsIn addition to modeling a single hair, we must also model hair-haircontacts so that we can capture the interesting interactions whensimulating a mass <strong>of</strong> hair. If we were to consider every possiblepair <strong>of</strong> particles for interaction, the algorithm would become quiteexpensive. Instead, we reduce the number <strong>of</strong> interactions consideredby performing two kinds <strong>of</strong> pruning, enabling us to parallelizeour hair simulation and improve performance.We prune contact points along the hair, as described in Section 4.1.We also prune hair pairs allowed to interact during the simulationbased on the observation that for visually palusible complex hairinteraction we <strong>of</strong>ten do not need to model every individual interaction,only the aggregate effect. This pruning, described in Section4.2, enables us to parallelize our simulation and optimize thecommunication pattern between processors.We could have alternatively used a bounding hierarchy to accuratelyhandle contacts in all situations. The advantage <strong>of</strong> our method oversuch hierarchies is that we can statically compute the processorcommunication pattern; otherwise, we would need to dynamicallyupdate the processor communication or exchange all hair data betweenprocessors. The disadvantage <strong>of</strong> our algorithm is that thecontacts may be incorrect in certain situations, such as when longhair is flipped from one side <strong>of</strong> the scalp to the other. For our productionneeds, we have run into few examples where this limitationhas caused artifacts. In these rare cases, we decrease pruning toguarantee the correct contacts.4.1 Pruning <strong>Hair</strong> ParticlesOur hair-hair contact model must account for volume betweenguide hairs, each representing several rendered hairs. We usespheres around individual hair particles to indicate the volume eachparticle represents. Increasing these sphere radii increases the volume<strong>of</strong> the hair. Because spheres <strong>of</strong> neighboring particles on thesame hair overlap, we can reduce particles used for contact testingby pruning those contained inside neighboring spheres (see Figure7 left). Even with hair motion, the spheres around neighboringparticles will provide enough contact for hair-hair interactions.Our pruning test starts at the root <strong>of</strong> the hair (j = 0), which wenever prune, and compares the sum <strong>of</strong> the edges ē i to the potentiallyoverlapping spheres. We set k = 1 and continue to increment kFigure 8: By pruning hair pairs (simple example on left), we reducethe overall number <strong>of</strong> edges in the larger contact graph C(right). This reduction enables us to cluster the graph into processorswith reduced communication cost between P 1, P 2, and P 3.until the following equation is satisfied:k−1Xi=j‖ ē i ‖ > s(r j + r k ) (6)where r j is the radius for the j th particle and s a parameter controllingparticle sparsity. We then prune all particles between j and k,set j = k, k = k + 1 and repeat the process until we have reachedthe end <strong>of</strong> the hair. This process controls how much overlap there isbetween the contact spheres after pruning. Setting s = 1 means thatspheres would just touch with no overlapping. We have found thata value <strong>of</strong> 0.75 provides a good balance between performance andaccuracy. The result is a subset <strong>of</strong> available particles for handlingcontacts, as illustrated in Figure 7 right.4.2 Pruning <strong>Hair</strong> Pairs<strong>Hair</strong>-hair contact models are used to represent forces such as staticcharge and friction among neighboring hairs. We have observedthat when many hairs interact in a complex manner, it is not necessaryto capture all <strong>of</strong> the individual hair-hair interactions in orderto produce a plausible, visually appealing result. In fact, we can ignorecertain hair-hair interactions and their effect will <strong>of</strong>ten be feltthrough similar or indirect interactions with neighboring hairs. Forexample, consider three hairs h 1, h 2 and h 3 that are aligned in arow, as in Figure 8 left. We can prune the interaction < h 1, h 3 >and assume that the effect <strong>of</strong> this interaction will happen throughcontacts between < h 1, h 2 > and < h 2, h 3 >. As the numbers<strong>of</strong> hairs increase, the effects <strong>of</strong> these individual hair-hair interactionbecome less important as we mainly see the aggregate effects<strong>of</strong> many hair-hair interactions. Using this observation, we havedeveloped an algorithm to prune hair pairs used for contact testing- effectively sampling the hair-hair interactions. This pruningallows us to reduce the number <strong>of</strong> necessary hair-hair contacts, reduceinterprocessor communication and more efficiently parallelizethe simulation.To indicate the hairs allowed to interact during simulation, we use agraph C where each node is a hair and an edge C(h i, h j) indicatesthat hairs h i and h j are allowed to interact. Initially a full graph,we statically prune our contact graph at initialization time as follows:First, we multiply each r i by a constant, r c, and compute andsum all contacts between spheres on hair i and hair j, calling thesum n i,j. We prune edges where n i,j < n t, a threshold indicatingthe minimum number <strong>of</strong> hair contacts required for interaction. Wealso stochastically prune graph edges based on our observation thatneighboring hairs will <strong>of</strong>ten handle the interactions. It is importantto note that we are pruning hair-hair interactions from the graph;we are not pruning the hairs themselves.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!