Page MenuHome

Depsgraph: connect up drivers on various physics properties.
Needs ReviewPublic

Authored by Alexander Gavrilov (angavrilov) on Jan 12 2021, 11:03 AM.

Details

Summary

It seems drivers for physics properties weren't being linked to
evaluation nodes. This connects settings used by modifiers
to Geometry; particle settings and rigid body data to Transform
which seems to contain rigid body evaluation; and force fields
to object Transform, since fields can exist on empties.

Diff Detail

Repository
rB Blender
Branch
temp-angavrilov-depsgraph-physics (branched from master)
Build Status
Buildable 12135
Build 12135: arc lint + arc unit

Event Timeline

Alexander Gavrilov (angavrilov) requested review of this revision.Jan 12 2021, 11:03 AM
Alexander Gavrilov (angavrilov) created this revision.

Noticed cloth field weights slipped through the cracks in refactoring.

Do you have file which was failing before and is working fine now?

I just looked at Depsgraph As Image while working on D10064 and noticed that the driver nodes on physics properties have no output dependency links. Unless there is some magic built into the 'parameters' component, that would automatically mean things aren't working right, so I looked to fix it.

Added links for drivers on rigid body object and constraint fields - it seems dynamically changing some of them may not actually work currently, but it should really.

Test file for use with Depsgraph To Image that I think should demonstrate all cases of drivers on physics properties:

Test file for use with Depsgraph To Image

Do you have a test file of an actually failing case? Or does this just add lines to an image where you think lines should be?

It would be extremely difficult to produce a 'failing case', because the potential failure mode here is a threaded race condition causing off-by-one-frame evaluation glitches.

We've had such threading issues with the Rain rig (clothes being incorrect or downright disappearing in some situations).
If you really think this is impossible to test, at least show us some (crops of) depsgraph images, so that it's possible to see what the patch does without having to export and compare images before and after applying the patch.

Generated a depsgraph image (manually edited to make the relevant relations into thick green lines).