Kinematic Actor: usually player
not affected by physics rules
push other objects
Shapes: capsule, box, convex
Different from other physics, we want the player to slide along the wall as it walks at an angle towards the wall.
We also want the players to be able to move up stairs:
We also want the player to move up slopes, but slide down for steep slopes.
When walking on slopes, a real human's walking behavior is drastically different from normal walking. The animation system should take care of that.
Sometimes we need to resize character capsule. We need to do a overlap test before update to avoid insertion inside objects.
For moving platform, we can't use physics engine. We need to do a ray cast to detect which platform the character is standing on.
Not just for character, potentially every moving objects. Objects in elevator will look shaky because there is always a 1-frame difference for object to fall down and push up by elevators.
Ragdoll: use physics simulation at the end of animation. (usually when character dies)
A character might have more joints than we need for physics simulation. We only pick about 10 joints for ragdoll. Since physics simulation is done on about 10 joints, we need to calculate the rest of joint positions for animation to play. (Animation Re-targeting)
Active Joints: position provided by physics simulation.
Leaf Joints: endpoint, controlled solely by animation
Intermediate Joints: calculate and interpolated by animation re-targeting.
Ragdoll need to satisfy joint's constraints (since human joints do not have al degrees of freedom) in order to provide satisfying animation.
Ragdoll can interleave with animation, providing more realistic looking transitions. (e.g. when a conscious human hang on a dynamic object)
Traditional: animated bone
Rigid Body-based Cloth Simulation: bones of cloth are bounded with rigid bodies and constraints solved by physics engine
Pros: cheap, interactive
Cons: undetermined quality, not robust, need good physics engine
We separate render mesh with physical mesh for reducing computation complexity.
We set different amount of constaints for each vertex: to prevent penetration to attached body (human characters)
To simulate cloth, we use spring force and dampling on vertices
spring force: elasticity
In cloth simulation, Verlet integration provides more stability and better computational complexity than Euler's Semi-implicit.
Position-based Dynamics is now commonly used.
Self-collision: when cloth collide with itself or other cloths
Make Cloth Thicker
Use substeps: trade computation with accuracy
Set maximum velocity: so you don't penetrate too far
Contact Constaints and Friction Constraints: apply a force with negative direction
When a projectile hit a surface
For texture coordinate, we can:
offline generate 3D volume texture and sample from it when things break
online generate 3D volume texture and sample from it when things break
Usually the new rigid body does not collide with other rigid bodies other than the children of original body. This is because for consistency issue, physics simulation might diverge. (e.g. you can't shoot down a wall to hit a player)
The current solution is not at all physics based
Common Breaking Patterns:
Besides the pipeline, we need to add many callback function for realistic side effects
nevigation logic update
Destruction can consume 10x to 100x computational power than we currently have.
Popular Destruction Implementation
NVIDIA APEX (UE4, PhysX Lab), deprecated in 2017
NVIDIA Blast in Omniverse
Havok (Unity) with high license fee
Chaos Destruction (Epic Games, beta in UE5)
Table of Content