Chapter 12: Physics Simulation and Dynamics
9/1/25About 3 min
Chapter 12: Physics Simulation and Dynamics
Learning Objectives
- Understand rigid body physics simulation
- Master soft body and cloth simulation
- Learn the fluid simulation system
- Master smoke and fire simulation
- Understand collision detection and constraint systems
12.1 Physics Simulation Basics
Physics Simulation Concepts
- Physics Engine: A system that calculates the motion and interaction of objects
- Time Step: The time interval for simulation calculations
- Collision Detection: An algorithm to determine if objects have collided
- Constraint System: Rules that restrict the motion of objects
Blender Physics System
Properties Panel → Physics Properties
- Rigid Body: Rigid body simulation
- Soft Body: Soft body simulation
- Cloth: Cloth simulation
- Fluid: Fluid simulation
- Collision: Collision detection
World Settings
Scene Properties → Gravity
- Gravity: [0, 0, -9.8] (standard gravity)
- Units: Unit settings affect physics calculations
12.2 Rigid Body Physics Simulation
Basic Concepts
- Active: Dynamic objects that participate in physics calculations
- Passive: Static colliders that are not affected by forces
- Center of Mass: The object's center of gravity
Rigid Body Settings
Physics Properties → Rigid Body:
- Type: Active/Passive
- Shape: Collision shape
- Box: Fast
- Sphere
- Convex Hull
- Mesh: Precise but slow
- Mass
- Friction
- Bounciness
Constraint System
- Fixed: Completely fixes two objects
- Point: Connects at a point, allowing free rotation
- Hinge: Rotates along one axis
- Slider: Slides along one axis
- Spring: Elastic connection
Example: Domino Sequence
# Create a domino sequence
import bpy
import bmesh
def create_domino_sequence(count=10, spacing=2.0):
for i in range(count):
# Create a cube
bpy.ops.mesh.primitive_cube_add(
location=(i * spacing, 0, 1),
scale=(0.2, 1, 2)
)
# Set rigid body
obj = bpy.context.active_object
obj.rigid_body.type = 'ACTIVE'
obj.rigid_body.mass = 1.0
obj.rigid_body.friction = 0.5
12.3 Soft Body Simulation
Soft Body Principles
- Spring-Mass Model: Vertices as masses, edges as springs
- Internal Forces: Elastic forces that maintain shape
- External Forces: Environmental forces like gravity, wind
Basic Settings
Physics Properties → Soft Body:
- Object → Mass
- Object → Friction
- Object → Speed: Motion damping
Goal:
- Strength: Goal strength
- Default: Default weight
Spring Settings
Edges:
- Pull: Stretching strength
- Push: Compression strength
- Damping
- Plastic: Plastic deformation
- Bending: Bending strength
Self Collision
Self Collision:
- Enable
- Size: Collision ball radius
- Stiffness: Collision strength
12.4 Cloth Simulation
Cloth Physics
- Fabric Structure: Weft and warp structure
- Stretching Resistance: Prevents excessive stretching
- Bending Resistance: Maintains the thickness of the cloth
Basic Settings
Physics Properties → Cloth:
Physical Properties:
- Mass: Mass per area
- Air Viscosity
- Bending Stiffness
Material:
- Structural: Structural strength
- Shear: Shear strength
- Bending: Bending strength
Cloth Presets
- Cotton: Medium strength
- Silk: Soft and smooth
- Denim: Heavy and tough
- Leather: Hard material
- Rubber: High elasticity
Pinning Settings
Shape → Pin Group:
1. Select fixed vertices in Edit Mode
2. Create a vertex group
3. Specify the Pin Group in the cloth settings
Wind Effect
Add → Force Field → Wind
- Strength
- Flow: Airflow effect
- Noise: Turbulence noise
12.5 Fluid Simulation
Fluid Types
- Domain: The space where the fluid is calculated
- Flow: Objects that generate or absorb fluid
- Effector: Objects that affect the fluid
Mantaflow Engine
Physics Properties → Fluid:
Type: Domain
Settings:
- Resolution: Calculation precision
- Time Scale
- CFL Number: Stability parameter
- Gravity
Liquid Simulation
Domain → Liquid:
- Viscosity
- Surface Tension
- Density
Flow Object:
- Flow Type: Liquid
- Flow Behavior: Inflow/Outflow
- Initial Velocity
Gas Simulation (Smoke)
Domain → Gas:
- Density
- Temperature
- Vorticity
Flow Object:
- Flow Type: Smoke/Fire/Both
- Density: Smoke density
- Temperature: Temperature difference
12.6 Smoke and Fire Simulation
Quick Setup
Object → Quick Effects:
- Smoke
- Fire
- Smoke + Fire
Advanced Fire Settings
Flow Settings:
- Fuel
- Burn Rate
- Flame Smoke: Smoke generated by fire
- Temperature: Fire temperature
Domain Settings:
- Flame Vorticity
- Burning Rate
- Smoke Color
Material Settings
Shader Editor → Volume:
- Principled Volume: Main volume material
- Density: Connect to smoke density
- Color: Connect to fire color
- Temperature: Connect to temperature attribute
12.7 Collision System
Collision Settings
Physics Properties → Collision:
- Enabled
- Damping
- Thickness: Collision thickness
- Friction
- Permeability
Collision Shape Optimization
- Simple Shapes: Box, Sphere for performance
- Precise Shapes: Mesh for accuracy
- Inside/Outside Detection: Single Sided vs Double Sided
Collision Groups
Relations:
- Collision Group
- Absorb Group
Used to control which objects can collide
12.8 Constraints and Connections
Rigid Body Constraints
Add → Empty → Select constraint type
Rigid Body Constraint:
- Type: Constraint type
- Object 1/2: Connected objects
- Breaking Threshold
Constraint Parameters
Generic Constraint:
- Location: Position limits
- Rotation: Rotation limits
- Springs: Spring settings
Motor Constraint:
- Target Velocity
- Max Impulse
12.9 Advanced Physics Techniques
Cache Management
Cache:
- Start/End Frame: Cache range
- Disk Cache
- Compression
Performance Optimization
- Lower Resolution: Reduce calculation load
- Use Simplified Collisions: Box instead of Mesh
- Limit Influence Range: Set Force Field distance
- Layered Calculation: Decompose complex scenes
Time Remapping
Scene → Time Remapping:
- Speed: Playback speed
- Frame Remapping
Used to create slow-motion or fast-forward effects
12.10 Practical Cases
Case 1: Destruction Effect
- Use the Cell Fracture add-on to break an object
- Set fragments as Active rigid bodies
- Add an explosion force field
- Adjust mass and friction parameters
Case 2: Falling Cloth
- Create a cloth plane
- Set a Pin Group to fix corners
- Add a collision ground
- Adjust cloth parameters for realism
Case 3: Liquid Container
- Create a container (set as a collider)
- Set up a liquid domain
- Add a liquid inflow object
- Adjust viscosity and surface tension
Practical Exercises
- Create a bowling game scene
- Animate a waving flag
- Simulate pouring water into a glass
- Design a destruction scene with an explosion
- Animate rising smoke
Key Takeaways
- Physics simulations require reasonable world settings and units
- Rigid body simulation is suitable for hard object collisions
- Soft body simulation can create organic deformations
- Cloth simulation needs proper pinning and parameters
- Fluid simulation resolution affects realism and performance
- Constraint systems can create complex mechanical motions
- Cache management is crucial for complex simulations
Next Chapter Preview
The next chapter will cover the node system and procedural workflows, including advanced applications of shader nodes, geometry nodes, and composite nodes.