Download presentation
Presentation is loading. Please wait.
Published byBridget Wiggins Modified over 6 years ago
1
Computer Animation Ying Zhu Georgia State University
Soft Bodies and Rigid Bodies
2
Soft body and clothes In older versions of Blender, cloth is part of Soft Body simulation But in the latest version, cloth simulation has its own parameters and controls So now soft bodies are mainly used for simulating closed meshes
3
Background Dampened Mass Spring model
Soft bodies are simulated by connecting neighbor vertices with dampened mass springs The same applies to cloth simulation too Many Soft Body related parameters are better understood in the context of a dampened mass spring Mass Stiffness Damping: a friction force that resists the motion
4
Dampened Mass Spring http://www.myphysicslab.com/spring1.html
5
Dampened Mass Spring model
The behavior of a simple spring is governed by Hook’s law : Fspring = −k x K is spring stiffness X is stretch Add damping force then we have acceleration x'' = − k⁄m x − b⁄m x‘ m: mass b: damping coefficient X’: velocity
6
Dampened Mass Spring model
Increase object mass will reduce the acceleration of the object Increase object mass will reduce the frequency of spring oscillation (i.e. soft body will be less bouncy) Stiffness: Increase spring stiffness will increase the restoring force generated by the spring Increase stiff will increase the frequency of spring oscillation (i.e. soft body will be bouncier)
7
Dampened Mass Spring model
Damping: A force that reduces the amplitude of spring oscillations Increase damping makes a soft body less bouncy
8
How to create a soft body in Blender?
Create a soft body object In “Object”, “Physics buttons” panel, “Soft Body” tab, press “Soft Body” button
9
Soft body parameters
10
Soft body parameters Friction: “media friction” Mass: mass of vertices
Friction with the surrounding air or liquid Increase this friction make the soft body move slower in the air Mass: mass of vertices Larger mass slows down motion Speed: internal timing of physical simulation Use values less than one to simulate dense air or very light fabric dropping
11
Use Goal By default the “Use Goal” button is pressed
This is similar to “Pinning of cloth” Part of the soft body is pinned and doesn’t move How to set goal for soft body? Create a vertex group on the soft body object In “Soft Body” tab, press “Use Goal” Click on the (up and down arrow) button next to the “Use Goal” button, select the vertex group from the drop down menu
12
“Use Goal” parameters G Stiff: the stiffness of the connection between the pinned vertex group and rest of the mesh If set to 0.0, the object may swing G Damp: the damping of the connection between the pinned vertex group and rest of the mesh “G Min” and “G Max”: usually keep the default values Setting “G Max” below 1.0 and the goal (pinning) would have no effect
13
Why doesn’t the soft body fall under gravity?
By default “Use Goal” is enabled If no vertex group is selected as a “goal”, the entire soft body object is pinned To make soft body object fall under gravity, release the “Use Goal” button
14
Soft body parameters Use Edges: connect neighbor vertices with springs
Stiff Quads For quad faces, also connect diagonal vertices with springs
15
Soft body parameters Stiffness
Pull Stiffness: spring stiffness when pulled Push stiffness: spring stiffness when pushed (usually the same as Pull Stiffness) Bending stiffness: spring stiffness when bended Shear stiffness: spring stiffness when twisted Increasing stiffness generally creates stiffer and bouncier soft bodies (if everything else remains the same)
16
Soft body parameters Damping: Friction for edge springs
Higher damping means higher resistance to motion Higher damping means that the spring will go back to its rest position quicker (i.e. object will calm down quicker)
17
Collision In the Collision tab, press “Self Collision” if you see soft body faces penetrating each other during animation
18
Baking Baking happens automatically the first time you press Alt + A to start the animation When you make changes and press Alt + A, baking automatically restarts A cache folder is automatically created under the “output” folder you set in the “Scene” panel Set baking start and end frames to match your animation Note that each soft body has its own baking start and end frames
19
Create a deflector Create an object (e.g. a flat plane)
Under “Object”, “Physics buttons” panel, “Collision” tab, press “Collision” button There is a group of parameters under “Soft Body and Cloth Interaction”
20
Collision parameters You can define a collision layer surrounding the actual mesh Inner: thickness of the collision layer inside the object Outer: thickness of the collision layer outside the object Damping Low damping: hard surface High damping: soft surface
21
Soft Body example: a soccer ball
Add an Icosphere Subdivision: 3 Radius: 1 Set Soft Body parameter as follows
22
Soft Body example: a Jell-O
Create a cube Set Soft Body parameters as follows:
23
Soft Body example
24
Rigid bodies Rigid bodies are handled in the Logic (F4) panel
Select an object Go to Logic Panel Select “Rigid body” from the Object type menu The default is “Static” Move mouse cursor to 3D View, press P to start the physics simulation
25
Rigid body A “Rigid body” object will fall under gravity
A “Static” object will not fall under gravity A rigid body object will collide with other rigid body objects and static objects Unlike soft bodies, there is no need to explicitly make an object “collide-able” with rigid body
26
Rigid body parameters Ghost: if enabled, the rigid body will not collide with other objects Mass Damp: general movement damping Reducing damping makes the object bouncier RotDamp: rotation damping
27
Bounds Blender uses bounding boxes for collision detection
Bounds: bounding box shape Choose a bounding box shape that is close to the shape of the mesh For example, choose box for cube, sphere for ball, etc. Choose “Convex Hull” for more complex objects “Triangle Mesh” is the most accurate but also the slowest
28
Baking Unlike soft bodies, there is no explicit baking button for rigid bodies The process In Game menu, select “Record Game Physics to IPO” In “Scene” panel, adjust start and end frames in “Anim” tab Move mouse cursor to 3D View, and press P to start physics simulation The physics simulation will be “baked” into IPO curves Next time you can press Alt + A to play back the rigid body simulation
29
User interaction with rigid bodies
There are three set of parameters under the Logic panel Sensors: event trigger Controllers: link sensors with actuators Actuators: how to manipulate the rigid body obj Together they make it possible for users to control a rigid body object with keyboard, mouse, or joystick They can also make the rigid body move without user interaction
30
Sensors Press the “Add” button under “Sensors” to add a new sensor
Always: always on (no user interaction) Keyboard: triggered by keyboard input Mouse: triggered by mouse input Joystick: triggered by joystick input Collision: triggered by collision
31
Controllers Press the “Add” button under “Controllers” to add a new controller Usually use the default “AND” controller type Use mouse to connect a Sensor with a Controller
32
Actuators Press the “Add” button under “Actuators” to add a new actuator Actuator types Motion Visibility Camera Sound and many more types Use mouse to connect a Controller with an Actuator
33
Motion Actuators Can transform the rigid body object
Loc Rot Can apply forces to the rigid body object Force Torque Can change its velocity LinV: linear velocity AngV: angular velocity
34
Simple game With Sensors, Controllers, and Actuators, you can create a simple game For examples see
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.