From BlenderWiki

Jump to: navigation, search
If you want to document Blender 2.5 features please edit pages under Doc:2.5/Manual.
If a "2.5" page doesn't exist please copy the text from 2.4x Manual and edit the new page (i.e. you should paste the wikitext from this 2.4x page to this new 2.5x page and then update the latter with 2.5 features)


[edit] Balls

Image 1a: Simple Soft Body balls.
Animation
Blend file

A Soft Body ball is best created from an IcoSphere, because an IcoSphere has evenly spaced vertices and is composed of triangles.

  • Insert the standard IcoSphere mesh object.
  • Move it a few units in a positive Z direction (upwards).
  • Activate Soft Body.
    • The ball is pretty light, every vertex weighs 0.001kg, so the total object weight is 0.042kg.
    • Turn off Goal. We want the ball to be moving freely and reacting only to external forces.
    • Set both Push and Pull to 0.8. Edges tend to be stiffer when they are being pushed together or pulled apart.
    • Set Be(nd) to 0.8. This introduces additional virtual connections between the vertices in the object which restricts the amount of bend (see Interior forces). If you want a harder ball increase Be.
  • Activate Collision in the Collision panel. This is not necessary for the ball to collide with other objects, but it is necessary so that other Soft Bodies can collide with the ball.
  • Insert a plane and activate Collision on it.
  • Ensure that you are at frame 1 of the animation and press AltA.

Now the ball will move in a negative z direction (fall downwards). When it hits the plane it should be repelled.

Image 1b: Settings for the Soft Body balls.


[edit] Flag in the wind

Image 2a: Soft Body flag in the wind.
Animation
Blend file

This example shows how you can create a simple flag moving in wind (Image 2a). The steps are:

  1. Create the Flag as a mesh.
  2. Assign Weights to a Vertex Group.
  3. Designate the flag as a Softbody.
  4. Add Wind.

Let’s start:

  • Remove the cube and save your file.
  • Add a plane.
  • Rotate it by 90° along the X axis (R-X-90).
  • Scale it by a factor of 2 in the X-direction.
  • Subdivide the plane 4 times. This creates a lot of vertices, but you need that to create nice, smooth movement.
  • Add a SubSurf modifier. Unfortunately the simulation will not use the virtual vertices that are created by this modifier (at least not in this version of Blender), but it will make the flag simulation look smoother.
  • In the Editing context, Link and Materials panel, press Set Smooth.
Image 2b: Weight paint for the Soft Body flag.

Now we will use weight painting to pin the leading edge of the flag simulating where the flag would be attached to a flagpole (otherwise it will blow away).

  • Change to weight paint mode (see Weight Paint).
  • Paint the vertex weights as seen in (Image 2b). The corners get a weight of 1. The leading edge of the flag must get a weight close to (but not quite) 1. This is how you go about introducing stiffer zones in a mesh with different weights.

A vertex group called “Group” is automatically created in this case.

Image 2c: Soft Body settings for the flag.
  • Change to Object mode.
  • Activate Soft Body.
    • Select the vertex group “Group” next to Use Goal. Now vertices with a weight of 1 will not be affected by the simulation, while vertices with a weight of 0 are fully affected by the simulation.
    • Set Pull to 0.8, so that the flag is not stretched too much.
    • Set Aero to 100, activate N. This will add a bit of random movement to the flag, even without animating the force field.
    • Set the end frame for Bake to 500, because we want the simulation to last longer than 250 frames (even if you don’t bake you still have to adjust the end frame).
    • Activate Self Collision.
  • Now, you can press AltA to see the flag react to gravity and air resistance until it comes to rest.


[[Image:Manual-Part-X-SoftBodyExampleWindSetup.pngthumb|320px|Image 2d: Example Wind setup.]]
Image 2e: Example Wind Strength IPO.

Now let’s add some wind to the simulation:

  • Add an Empty to the scene at the location where we want the wind to blow from. Select Wind from the Fields panel. Set the strength to 0.2.
  • Rotate and move the empty so that the Z axis points towards the flag (Image 2d). You can temporarily increase the Strength value so that you can more easily see the effect of wind.

Press AltA to see the flag react to wind.

  • Add an IPO curve to simulate changing wind strength. This will add more realism to the animation (Image 2e).


[edit] Interaction

Image 3a: Setup. The green object shall sink into the pink mattress.
Blend file

We’re going to use the Soft Body simulation as a modeling tool in this example. The goal is to place an object on a mattress and let it sink in a bit.

  • Activate collision on the object that will be placed on the mattress.
  • Activate Soft Body on the mattress. Make sure the Soft Body has enough subdivisions, to that it will deform properly.

We don’t do anything fancy here, so you should stick to the default settings.

  • Open a Timeline window.
  • In the Playback menu of the Timeline window, select Continue Physics.
  • Click on Play Timeline in the window header of the Timeline window.

This is important, don’t use AltA to play the simulation here.

  • Select the collision object and move it slowly towards the mattress.

The moment the collision object touches the mattress, the mattress will start deforming on collision.

  • Move the collision object until you’re satisfied with the result.

Don’t stop timeline playback!

Image 3b: The result. Soft Body interactive modeling.
  • Select the mattress.
  • Apply the Soft Body modifier.

This removes the Soft Body modifier and makes the changes permanent.

  • Now you can stop the animation playback!




If you have any question about this page topics, please leave a message in the talk page.
Please report any problems editing or creating these pages: Missing images in this page, Broken links in this page, thanks!


Redirects to fix

  • Doc:Manual/Modelling/Meshes/Weight Paint → Doc:Manual/Modeling/Meshes/Weight Paint