Graphics Reference
In-Depth Information
0
0
p i
p i +1
w i
p i +1 -
p i
0
(|
p i +1 -
p i
| -
l i
)
Δ
p i = +
w i
+
w i +1
|
p i +1 -
p i
|
p i
p i +1
w i +1
p i +1 -
p i
0
Δ
p i +1 = -
(|
p i +1 -
p i
| -
l i
)
w i
+
w i +1
|
p i +1 -
p i
|
Δ
p i
Δ
p i +1
Figure 1.4. Edge length constraint:
w i and w i +1 are inverse masses of p i and p i +1 ,
respectively.
safe to update vertex positions without conflict. In hair, it is easy to create the
two batches as an even edge index group and an odd edge index group. We
run the first batch followed by the second one. This approach gives us a good
parallelism. Unfortunately, the trade-off is that it has poor convergence, so we
iterate it multiple times to make all edges reach their rest lengths.
In Tomb Raider , the main character can move and turn very fast. Basically,
users can create a strong acceleration, which causes very long elongation to hair.
In this case, ELC does not converge well even with more than 20 iterations. It
is easy to check the convergence by measuring the first movable edge length and
comparing it with its rest length. To fix this problem, we switch to the ad-
hoc constraints, which update only one vertex position, p i + in Figure 1.4. By
updating one vertex position per edge starting from the root of the hair strand,
we can simply satisfy ELC by one iteration. However, this approach can add
extra energy to the system and cause unnatural simulation results. To remove
this extra energy, we add high damping. Due to this, we only use this approach
when it is really necessary. The interested reader is referred to [Muller et al. 12]
for deeper understanding of this problem and different solutions.
1.5.2 Global Shape Constraint
The main idea of GSC is quite simple. We take the initial hair shape as a target
and try to move vertices to it. It is similar to shape matching. Probably the
easy way to understand it is to think of the initial hair shape as a cage and
GSC enforcing hair to trap inside it. Before simulation begins, we save the rest
positions of vertices P i . We use these rest positions as goal positions to apply
global shape constraints. In equation (1.1), S G is a stiffness coecient for the
global shape constraint. It ranges between 0 and 1. If S G is 0, there is no effect;
if it is 1, the hair becomes completely rigid, frozen to the initial shape:
P i += S G ( w T H ·
P i
P i ) .
(1.1)
In many cases, we apply global shape constraints on a part of the hair strand
such as close to the root. We can also gradually reduce S G from the root of
the hair to the end. This is because hair seems to behave more stiy close
Search WWH ::




Custom Search