Stress maps

Sometimes I noticed that is not realistic to animate softbodies without having a good stress map that makes the stretched object to look more realistic. Try for example to think about a balloon, when you fill it with air the material stretches, becoming more transparent on the stressed areas. This effect can be reproduced as well in Blender using stress maps. If you check the second tab of the Texture field in the Material view (Map Input) you can see that one of the possible choices is Stress. That’s what we are going to use in our tutorial and it means that the texture will be mapped on the basis of the difference of edges length compared to the original ones of the mesh. Since a softbody has springs and they stretch, this is perfect for us :D
In this tutorial I’ll assume that you are already familiar with BlenderĀ  and know how to follow the basics steps that are not explained in this tutorial ;)
Clear the scene and add a UV Sphere with default values. Add a plane and place it above the sphere, more or less 5 Blender units on the z-axis. Subdivide the plane pressing W and subdivide multi, input 18 and press enter. Switch to weight paint mode and give a weight of 1 to the corners of the plane, so that they don’t float away when we animate it, but they stay still. Name the vertex group softgoal from the Edit panel.
Here it should look the scene after the weight painting:

Weight painting

Weight painting

Create a simple rubber material for the plane, it’s enough to use the default material and assign it your favourite colour, change the specular shader to WardIso (my favourite :D ) to give a shiny, rubbery look. I’ll come back to its stress map later. Set the plane as a soft body from the physics menu and change the values in this way:
- Click “Use goal” and select softgoal that you created previously
- GStiff 0.186
- Bend 0.500

All the rest leave it as default. Now select the sphere and activate collision from the physics tab. Set damping 0.100 , Inner 0.020 and Outer 0.200.
Animate the plane downward, be careful to do not push too down the plane, otherwise it will go through the sphere. This part requires as usual with soft bodies in Blender, some tuning. So play with settings until you have something that looks like the picture below and you get the best result from the soft body solver.

The soft plane stretched

The soft plane stretched

Now you are ready for the stress mapping! First thing add a new texture to the plane material. It should be a Blend texture and the mapping has to be as below:
Map Input -> Stress
Map to -> Col, Alpha then change the mode from Mix to Add.

Now let’s play with the Blend texture! Basically you need something as in the picture below:

Blend texture settings

Blend texture settings

The range of the colorband determines teh range of values between high stress and low stress areas of the mesh. A gentler fade on the colorband yields a gentle fade from low stress to high stress areas and viceversa.
When you’re done, try to render the frame in which the rubber plane is stretched and it should look something like this:

Looks cool! Definitely a realistic soft body!

Looks cool! Definitely a realistic soft body!

Play with settings and try to customize this tutorial as you wish and for your needs! If you have any question, leave a comment below :D


Leave a Reply