Page MenuHome

Soft body cache not being cleared when it should be in Blender 2.8
Closed, ResolvedPublic


Operating system: Windows 10 Home, 64-bit
Graphics card: Nvidia GTX 1070

2.80, ce3475f74794, blender2.8, 2019-1-11

Worked: Seems to work in 2.79b

Soft body cache not being fully cleared / overwritten when it should be (e.g., when the animation player loops while a soft body object is being manipulated in the viewport, or when adjustments are made to keyframes of objects that influence the soft body simulation). Cache has to be cleared manually by entering & exiting Edit Mode on soft body object.

  1. Create a cube and enable soft body physics on it.
  1. Create an armature with a single bone, and parent the cube from step 1 to the bone.
  1. Enter pose mode, hit play on the timeline, and manipulate the bone. The attached soft body should behave as expected during the first loop through the timeline, but will behave erratically on subsequent loops.
  1. Stop the animation, clear the soft body cache (by entering & exiting Edit Mode with soft body object selected), and set some rotation keyframes on the bone the soft body is parented to. Hit play on the timeline to fill the cache, then stop the animation and change some of the keyframes. When the animation is played again, results will be similar to those from step 3: i.e., erratic behavior of the soft body due to the cache not being cleared.

Event Timeline

Sebastian Parborg (zeddb) triaged this task as Confirmed, Medium priority.

This is depsgraph building issue I think, we probably need to add calls to something like DEG_add_object_pointcache_relation() for all objects which affect the softbody one (like it is done for forcefields and collision ones already). Will let that to @Sergey Sharybin (sergey) though, am not so sure where/how to do that properly.

Fwiw, tried to apply same fix as rB9d10fc13e770 to softbody, does not fix that issue. Also, files from T61046 exhibit same problem as in this report, so this is something generic to all pointcached simulations.