Maniphest T80248

2 Rigidbody force fields will create dependency cycle
Closed, Archived

Assigned To
Richard Antalik (ISS)
Authored By
Patrice (metal3d)
Aug 30 2020, 2:40 PM
Tags
  • BF Blender
Subscribers
Dalai Felinto (dfelinto)
Patrice (metal3d)
Richard Antalik (ISS)
Sergey Sharybin (sergey)
Sybren A. Stüvel (sybren)

Description

System Information
Operating system: Linux
Graphics card: Intel and NVidia

Blender Version
Broken: any version, as for 2.90.0 beta
Worked: None

Short description of error

Add a "force" property in "physics" tab doesn't set the object as a "force field"

Exact steps for others to reproduce the error
Add an object (icosphere) and go to physic tab
Activate "Force" and set strength to -10 for example (make attraction)
Activate Rigid Body to make the object interact
Duplicate the object, and move it on X (5 units for example)
Press Space to see animation: nothing happen

One other test
Add a force field somewhere, set strength to -50
press Space => nothing happens too
On both icospheres, remove "Force"
press Space => now icospheres interact with the force

What I expected is that the objects attract others (rigid body) objects. and because they are rigid bodies too, they should be attracted by others.

To simulate what I expect, I need to make an rigidbody object, a force field, and set the object parent of force field. But there is a problem with this, the child force interact with the parent too, so "gravitation" is not reacting like I expect.

Event Timeline

Patrice (metal3d) created this task.Aug 30 2020, 2:40 PM
Richard Antalik (ISS) changed the task status from Needs Triage to Needs Information from User.Sep 2 2020, 4:43 PM
Richard Antalik (ISS) added a subscriber: Richard Antalik (ISS).

Please click on Window > Toggle System Console and check if any dependency cycles are reported.
Otherwise please upload example file. Always report one issue, so I am not sure if another test is another way to demonstrate issue or completely different issue.

Patrice (metal3d) added a comment.Sep 4 2020, 8:46 AM

Hello,

There are no cycle dependency.

You can check my tutorial here https://youtu.be/8bcqLZJcTSY?t=127 (2:27) I show what doesn't work (and how to fix by using a force field inside the icoshpere)

What I mean is that (AFAIK) "force field" on an abject is only working with particles, it doesn't attract others objects. My video shows how to simulate gravitation between objects.

But... the problem of my method is that the field "attract the parent object also", that generate not wanted rotations in some cases.

Patrice (metal3d) added a comment.Sep 4 2020, 8:49 AM

Ho, you can also see that there is a glitch at 3:34 of the video, we need to refresh the viewport to see the force field going back to its real location :) But that's another report to do ;)

Richard Antalik (ISS) closed this task as Archived.Sep 8 2020, 3:06 AM
Richard Antalik (ISS) claimed this task.

At first sight steps did not look exact, but they were good to follow, so I could have looked at this without file. Even though it is always better to supply file unless it is impractical.

In first case, there is dependency cycle created by one field affecting other field. You can see this errors in console (Window > Toggle System Console). So this is not a bug, even though it is quite big limitation. Second case is expanded first case so the issue is same. Unfortunately I am not aware of any good resource on how to deal with this situation.

For help using Blender, please try one of the community websites: https://www.blender.org/community/

Closing as this is not a bug.

Patrice (metal3d) added a comment.Sep 10 2020, 6:45 AM

Sorry for the cycle dependecy, didn't seen in the terminal.

What you mean is that 2 objects that are declared to be "force field" creates a dependency cycle, it looks like a bug... There is no reason for this to not work excepting something that is not well managed inside Blender.

When I change the scene to make a force field parented to my rigibody objects, the attraction works (even with cycle dependencies).

Sorry to say that but... I'm using Blender for years, the problem is not a comprehension problem here, it's a propoety managment that is not respected. 2 Objects declared as fields should be able to attract them each others. Like I simulate on the file

(explained in my video https://youtu.be/8bcqLZJcTSY?t=127 (2:27) )

Richard Antalik (ISS) renamed this task from Add Force to an object doesn't work with rigid body to 2 Rigidbody force fields will create dependency cycle.Sep 11 2020, 2:36 AM
Richard Antalik (ISS) added subscribers: Sergey Sharybin (sergey), Sybren A. Stüvel (sybren).
In T80248#1012922, @Patrice (metal3d) wrote:

There is no reason for this to not work excepting something that is not well managed inside Blender.

Well this could also be "too well" managed, as in dependency system is too restrictive, to make sure there are no dependency cycles.

I would like to hear what @Sergey Sharybin (sergey) or @Sybren A. Stüvel (sybren) thinks about this case, because I can't imagine any workaround for this scenario.

Example file:

Patrice (metal3d) added a comment.Sep 11 2020, 7:54 AM

Thanks a lot to consider my report 🙂

The only workaround that have cycle dependency anyway is my second file, by parenting force to rigibody object. It works with a lot of duplicate without big problem.

But there is some drawbacks like "the parented object is also affected by its own force", that generates weird rotation sometimes.

To be able to make an object rigibody and force could make us able to simulate nice animation.

Thanks 😉

Dalai Felinto (dfelinto) added a subscriber: Dalai Felinto (dfelinto).Sep 11 2020, 10:16 AM

Hi @Richard Antalik (ISS) if this is closed even, there is no reason to drag in other developers and pour more time into this.

For help using Blender (in this case to find a workaround) the users can try instead one of the community websites: https://www.blender.org/community/

Patrice (metal3d) added a comment.EditedOct 8 2020, 6:05 PM

Hi @Dalai Felinto (dfelinto) I'm sorry but IMHO it's a "bug".
Cycle dependency on 2 rigid bodies is a problem. Event if my workaround gives some results, the cycle dependency error appears on the terminal.

Anyway, my workaround is not exactly what should do Blender by itself, because using a force field as "child" makes that field to interact with the parent. And it yields some weird and unwanted rotations.

Activating a "force" directly on the rigid body should be correct (because the force will not interact with itself) - but one more time, a second rigid body with force should be attracted by the first, and vice versa.

In others words: cycle dependency is a bug. With or without workarounds :)