3
$\begingroup$

I have these balls with Soft Body on, when the cylinders are still, they interact with them without issue and bounce off of them. But I animated the cylinders to move side to side (sort of like an obstacle course) and after baking it, it properly interacts with the collision objects like 80%, but somewhat intersect with the cylinders (the cylinders are moving at a fairly fast speed). Is there a setting I need to change to make sure the balls bounce around properly although the bars are going back and forth quickly? I have provided a link to the blend file.

Thank you! enter image description here

$\endgroup$
5
  • $\begingroup$ Try increasing the Soft Body Solver Min Step Size setting in the Soft Body properties panel. This will increase the number of soft body simulation steps which should help with fast moving collisions. $\endgroup$ Commented Jul 5, 2018 at 8:40
  • $\begingroup$ @RichSedman I bumped up the min step size to 250, leaving the max at 300 and it seems to have made little to no difference... I'm thinking I may need to change a combination of settings? $\endgroup$
    – Noelle
    Commented Jul 5, 2018 at 10:04
  • $\begingroup$ Possibly something else is going wrong. Check your normals to ensure they're pointing 'outwards' for each mesh. Also, what's the topology of the 'balls'? Can you share your Blend file by uploading to blend-exchange.giantcowfilms.com and edit your question to include the link. $\endgroup$ Commented Jul 5, 2018 at 10:14
  • $\begingroup$ @RichSedman I have added the .blend file! The normal are all pointing outwards. (I'm not sure if it should be inside or outside). $\endgroup$
    – Noelle
    Commented Jul 5, 2018 at 17:31
  • $\begingroup$ Thanks @Noelle - taking a look. Found a couple of things to help so far - apply scale on ‘pins’ (and remove scale keyframes) and reduce Soft Body choke to 0. Baking taking a while so it’s a slow process. $\endgroup$ Commented Jul 6, 2018 at 6:53

2 Answers 2

2
$\begingroup$

This isn't perfect but does improve the behaviour somewhat. I believe there are some limitations to the Soft Body simulation that make it very difficult to get consistent behaviour in your situation (where soft bodies are being 'hit' at relatively high speed by solid collision meshes). There also appear to be issues with baking the simulation - if the 'bake' is attempted while the timeline is at Frame 1 then performance seems to be fine. However, if the timeline is part way through the animation then the bake takes orders of magnitude longer to complete.... I suspect this is a bug but will need to do more work to pin this down. Anyway, regardless of that...

There are a few things you can do to improve your simulation.

For starters, you should always run your simulation with objects which have had their scale applied (so their scale is 1.0,1.0,1.0). The reason for this is that the simulation will assume they are at their natural scale and any physical properties will be base on that scale. In your scene the 'pins' have been scaled - but there are also keyframes on the scale to set it back again. Therefore, select each 'pin' in turn and remove the keyframes on the Scale properties. Once done, select them all and Ctrl+A and Apply Scale.

Once you have applied the scale you can adjust your collision properties to set each of the 'pins' Soft Body 'Inner' zone to 0.35 (from the default of 0.2). This value is chosen to be around half the minimum size of the pin - so that the collision zones are as large as they can be without opposing faces' zones overlapping. This should result in more chance of the soft body vertices being repelled in the correct direction.

Since the collision objects are moving quite fast into the soft body meshes, the 'choke' Soft Body Solver setting could be resulting in the soft body being prevented from being repelled away from the collision mesh as fast as it otherwise would - it usually prevents intersecting objects from being flung away too fast but in this case we want to maximize the repulsion force, so reduce them to zero on each of the soft body meshes.

Freeing all baked dynamics and then re-baking them all (after first rewinding the timeline to the start) should now produce better results - although it's still not perfect.

The next stage would normally be to increase the Step sizes so that smaller steps are used when calculating the simulation and reduce the Error Limit. This does seem to help to a point but beyond certain values the collision appears to get worse again - as far as I can tell there is a bug in the soft body calculation with very large number of steps, to the point where using a very large number (eg, 30000) results in very odd results where the soft bodies appear to be sometimes repelled and at others completely ignore the pins moving through them. I'll attempt to pin this down further and, perhaps, report this as a bug if I can.

Anyway, I hope this gives you some pointers. My best simularion was using about 100 soft body steps (100 for Min and for Max) and reducing the Error Limit to 0.01. This produced the following result :

animated


One further point I noticed is that your scene is at a rather non-realistic scale - the balls are around 2BU in diameter which equates to 2 metres in the 'real' world. I don't know if this is intentional. This means that the 'pins' are about 0.75 metres thick and are travelling at around 12 metres per second! It's hard to imagine how a 75cm thick bar hitting a 2m soft ball at nearly 30mph would behave but it probably wouldn't be pretty!

To get more of an idea of a more realistic scale I scaled the scene down so that the balls are a more reasonable scale and produced the following :

animated2

$\endgroup$
4
  • $\begingroup$ Thanks for all of this information! I started Blender a month ago and I somehow never really touched on actual scaling of objects relative to the real world (despite the millions of tutorials I have followed). Measurements are still somewhat of an unknown to me, so I will have to look more closely at those values with future projects. And regarding the 'setting the scale/rotation/location', would you say it is essential to do that for every object/whole scene any time I am ready to bake or render an animation? Don't quite know when I'm suppose to do that or leave it. $\endgroup$
    – Noelle
    Commented Jul 7, 2018 at 8:07
  • $\begingroup$ @Noelle Glad to help. Getting the scale right is good practice from the start - it’s much easier to model to a realistic scale initially than it is to change it later, and it’s essential for any physics simulations. Generally 1 blender unit matches 1m - unless you set the units of the scene different. If you rescale any mesh it’s a really good idea to make sure to Apply Scale - unless you have a good reason not to. If not you can get sone weird effects with modifiers, physics, etc. $\endgroup$ Commented Jul 7, 2018 at 13:55
  • $\begingroup$ @RichSedman Could you confirm if lowering the error limit causes getting weird behavior and it could possibly be a bug? $\endgroup$
    – Amir
    Commented Oct 16, 2018 at 22:56
  • 1
    $\begingroup$ @Amir I’m convinced that there is a bug in there but I’ve not had the time to pin this down. I’ve been picking through the source code to try and identify the issue and suggest possible improvements. I’ve identified one change that does help with collision stability but it needs more work. I’ll pick this up again hopefully soon. $\endgroup$ Commented Oct 17, 2018 at 9:09
1
$\begingroup$

Your "collider" meshes cannot be a plane. They must have solidness. Try adding solidify (from the modifiers) on them. They need to be solid at least by 1 cm.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .