Page MenuHome

Rigid body stops simulating when an object is selected
Closed, ResolvedPublic

Description

System Information
Operating system: Windows-10-10.0.17763 64 Bits
Graphics card: Intel(R) UHD Graphics 630 Intel 4.5.0 - Build 25.20.100.6373

Blender Version
Broken: version: 2.80 (sub 64), branch: master, commit date: 2019-05-15 23:47, hash: rB02a7e57d9c07
Worked: (optional)

Rigid body stops simulating when an object is selected. I really don't know if its a bug but it doesn't happen in 2.79. Also, it does not happen with other simulation like cloth, smoke, etc. I I've attached the screen recorded video below

Event Timeline

I see this too.

Running Blender in a shell with --depsgraph option shows a depsgraph update at the frame corresponding to the mouse-click select. As a matter of course, that depsgraph update exhibits USER_EDIT change sources, and copy_on_write and layer_update logical functions are placed in the update list. I surmise (but I have not established a causality chain) that transform calculations are invalidated as a side effect, disrupting a cache entry at the mouse click on frame T. By the
nature of simulations, if data are not available for frame T, then T+1, T+2... can't be calculated, giving rise to the original observation. The depsgraph evaluation time also drops dramatically. For about 100 objects in the simulation I experimented with, depsgraph update for me ran about 0.02 seconds on average before the offending mouse selection attempt. Subsequent to that, depsgraph evaluation dropped an order of magnitude to 0.002 seconds, on average. Of course, no position or rotational transformations were taking place, gravity was suspended, etc. One could see in the depsgraph dumps to the shell that transform functions were being called, but I surmise they were virtually no-ops, returning immediately upon being called. I did not step through a typical call to confirm this.

There seems to be a trivial workaround. Should I hold off selecting anything while the cache is being built, then, after a cache is wholly in place, I can select objects with the animation running and the animation doesn't freeze. The simulation has actually finished at that point and the animation is running off the cache.

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