Game Development Reference
In-Depth Information
1
2
3
Figure 2.1. Discretization can cause fast-moving objects to travel through walls.
Another big source of artifacts is the linearization that most physics engines
employ—the assumption that during the time step everything travels in a linear
motion. For particle physics, this is a pretty good approximation, but as soon as
you introduce rigid bodies and rotation, it falls flat to the ground. Consider the ball
joint illustrated in Figure 2.2. The two bodies are rotating in opposite directions.
At this particular point in time, the two bodies are lined up as shown. Even if
the solver manages to entirely solve the relative velocity at the joint-attachment
point to zero, as soon as time is advanced, no matter how small the amount, the
two attachment points will drift apart. This is the fundamental of linearization,
which makes it impossible to create an accurate physics engine by solving just for
relative linear velocities at discrete points in time.
Even though linearization and discretization are two different approximations,
they are somewhat interconnected. Lowering the step size (increasing the number
of substeps) will always make linearization less problematic, since any nonlinear
motion will appear more and more linear the shorter the time span. The ambitious
reader can make a parallel here to the Heisenberg principle of uncertainty!
The major takeaway here is that as long as a physics engine employs dis-
cretization and linearization, which all modern physics engines and all algorithms
1
2
Figure 2.2. Even if relative linear velocity at the joint attachment is zero, objects can
separate during integration due to rotation.
 
Search Nedrilad ::




Custom Search