Force field absorption not working with rigid bodies unless a particle system is present #103571

Closed
opened 2022-12-31 18:34:37 +01:00 by Peter Goodman · 5 comments

System Information
Operating system: Microsoft Windows [Version 10.0.19042.2251]
Graphics card: Nvidia Quadro RTX 4000 (driver 512.36)

Blender Version
Broken: 2.83.20; 2.93.13; 3.3.2; 3.4.1
Worked: 2.79

Short description of error
Absorption setting on collision objects and force fields does not work with rigid bodies unless a particle system is also added. Previously in 2.79 this works on rigid bodies whether a particle system is present or not.

Exact steps for others to reproduce the error
Load the attached blend file in blender version 2.83.20 or later (it is saved in 2.79 and opens fine in any newer version)
2022-12-31_rigid_body_field_absorption_blender2-79.blend

See attached image:
rigid_body_absorption3.PNG
Press SPACE to play the animation. Note that world gravity is disabled, the downward motion is caused by the plane force field below.

Initially you will see the left hand cube ('Cube') and particles above it not moving because the block beneath it ('Cube.001') has the physics properties->collision->field absorption set to maximum, thus blocking the force field below affecting anything above 'Cube.001' in the positive z direction (the force field also has the Absorption setting ticked). The cube on the right ('Cube.002') is not shielded by 'Cube.001' so is affected by the force field. This is the expected behaviour.

If you delete the particle emitter plane and repeat the playback, the cube on the left now falls the same as the one on the right, ie the absorption of 'Cube.001' is no longer preventing the force field from affecting it. This is not the expected behaviour.

If you reopen the file in blender 2.79 and repeat this, the absorption works whether the particle sytem is there or not (ie 'Cube' is not affected by the force field).

**System Information** Operating system: Microsoft Windows [Version 10.0.19042.2251] Graphics card: Nvidia Quadro RTX 4000 (driver 512.36) **Blender Version** Broken: 2.83.20; 2.93.13; 3.3.2; 3.4.1 Worked: 2.79 **Short description of error** Absorption setting on collision objects and force fields does not work with rigid bodies unless a particle system is also added. Previously in 2.79 this works on rigid bodies whether a particle system is present or not. **Exact steps for others to reproduce the error** Load the attached blend file in blender version 2.83.20 or later (it is saved in 2.79 and opens fine in any newer version) [2022-12-31_rigid_body_field_absorption_blender2-79.blend](https://archive.blender.org/developer/F14102425/2022-12-31_rigid_body_field_absorption_blender2-79.blend) See attached image: ![rigid_body_absorption3.PNG](https://archive.blender.org/developer/F14102440/rigid_body_absorption3.PNG) Press SPACE to play the animation. Note that world gravity is disabled, the downward motion is caused by the plane force field below. Initially you will see the left hand cube ('Cube') and particles above it not moving because the block beneath it ('Cube.001') has the physics properties->collision->field absorption set to maximum, thus blocking the force field below affecting anything above 'Cube.001' in the positive z direction (the force field also has the Absorption setting ticked). The cube on the right ('Cube.002') is not shielded by 'Cube.001' so is affected by the force field. This is the expected behaviour. If you delete the particle emitter plane and repeat the playback, the cube on the left now falls the same as the one on the right, ie the absorption of 'Cube.001' is no longer preventing the force field from affecting it. This is not the expected behaviour. If you reopen the file in blender 2.79 and repeat this, the absorption works whether the particle sytem is there or not (ie 'Cube' is not affected by the force field).
Author

Added subscriber: @badbunny_uk

Added subscriber: @badbunny_uk
Peter Goodman changed title from Force field absorption on rigid bodies not working unless a particle system is present to Force field absorption not working with rigid bodies unless a particle system is present 2022-12-31 19:53:31 +01:00

Added subscriber: @mano-wii

Added subscriber: @mano-wii

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'

I can confirm.
It appears that the effect of the collision modifier is lost if there is no particle system in the scene.
It seems to be a depsgraph issue.

I can confirm. It appears that the effect of the collision modifier is lost if there is no particle system in the scene. It seems to be a depsgraph issue.
Bastien Montagne added this to the Core project 2023-02-09 15:43:54 +01:00
Bastien Montagne removed this from the Core project 2023-02-09 18:20:29 +01:00
Philipp Oeser removed the
Interest
Nodes & Physics
label 2023-02-10 08:43:15 +01:00
Philipp Oeser added the
Interest
Core
label 2023-02-10 11:09:21 +01:00
Member

It seems to be a depsgraph issue.

Correct. There is a function build_collision_relations which adds a dependency between the absorption object (the one with a collision modifier) and the forcefield object. It's currently only called by

  1. Particle systems (DepsgraphRelationBuilder::add_particle_collision_relations)
  2. Cloth, DynPaint, Fluid, and Softbody (DEG_add_collision_relations and indirectly through DEG_add_forcefield_relations).

The effector function that computes force field strength uses those relations to determine which colliders "absorb" the force field. If there are no such collision relations registered in the depsgraph the visibility function does not add any absorption (code).

Since the rigid body simulation on its own does not add such relations, the absorption does not work. Rigid body depsgraph setup needs to incorporate a call to DEG_add_forcefield_relations. Actually this needs to become a C++ function.

> It seems to be a depsgraph issue. Correct. There is a function `build_collision_relations` which adds a dependency between the absorption object (the one with a collision modifier) and the forcefield object. It's currently only called by 1. Particle systems (`DepsgraphRelationBuilder::add_particle_collision_relations`) 2. Cloth, DynPaint, Fluid, and Softbody (`DEG_add_collision_relations` and indirectly through `DEG_add_forcefield_relations`). The effector function that computes force field strength uses those relations to determine which colliders "absorb" the force field. If there are no such collision relations registered in the depsgraph the visibility function does not add any absorption ([code](https://projects.blender.org/blender/blender/src/commit/4bcd59d644c4cc50692e60899403e3f60ac409de/source/blender/blenkernel/intern/effect.c#L486)). Since the rigid body simulation on its own does not add such relations, the absorption does not work. Rigid body depsgraph setup needs to incorporate a call to `DEG_add_forcefield_relations`. Actually this needs to become a C++ function.
Lukas Tönne self-assigned this 2023-04-03 17:26:14 +02:00
Blender Bot added
Status
Resolved
and removed
Status
Confirmed
labels 2023-04-06 14:49:20 +02:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#103571
No description provided.