Clothsim pressure depends on mesh position #119288

Open
opened 2024-03-10 17:52:50 +01:00 by Max Mustermann · 4 comments

System Information
Operating system: Fedora Linux
Graphics card: AMD

Blender Version
Broken: 4.0.2
Worked: (newest version of Blender that worked as expected)

Short description of error
The clothsim pressure seems to depend heavily on the mesh position when I don't see a reason for it to do that.
I have seen it be affected only by the X axis or only by Y and Z like in the video. Crossing the 0 mark on an affected axis always makes the simulation explode.
Could be related to #106562.

Exact steps for others to reproduce the error
Open the file clothsim-position.blend and move or duplicate the object.
Play animation.

**System Information** Operating system: Fedora Linux Graphics card: AMD **Blender Version** Broken: 4.0.2 Worked: (newest version of Blender that worked as expected) **Short description of error** The clothsim pressure seems to depend heavily on the mesh position when I don't see a reason for it to do that. I have seen it be affected only by the X axis or only by Y and Z like in the video. Crossing the 0 mark on an affected axis always makes the simulation explode. Could be related to #106562. **Exact steps for others to reproduce the error** Open the file [clothsim-position.blend](/attachments/f3bef827-0b4d-413b-8858-e4beabdd9372) and move or duplicate the object. Play animation. <video src="/attachments/54d76bc7-70ee-43aa-9bfa-b664259d2e5e" title="clothsim-position.webm" controls></video>
Max Mustermann added the
Priority
Normal
Type
Report
Status
Needs Triage
labels 2024-03-10 17:52:51 +01:00
Iliya Katushenock added the
Interest
Nodes & Physics
Interest
Physics
labels 2024-03-10 18:03:52 +01:00
Contributor

Looks like it is caused by

f235990009/source/blender/simulation/intern/SIM_mass_spring.cc (L94-L97)

It calculates the fluid gradient force on each vertex based on the vertex's global coordinates. I'd like to make PR for it but I am confused about the intention of the function.

@mod_moder May I get any suggestions?

Looks like it is caused by https://projects.blender.org/blender/blender/src/commit/f235990009f2980680d7e6cdda71fee8fa4d9758/source/blender/simulation/intern/SIM_mass_spring.cc#L94-L97 It calculates the fluid gradient force on each vertex based on the vertex's global coordinates. I'd like to make PR for it but I am confused about the intention of the function. @mod_moder May I get any suggestions?

Well, its first time i see this function at all. Not sure if there is active developer which is know something about concept of this functions. You know, legacy physic.. If you can make sure this is right solution and this will not cause regressions, feel free to fix that. If this will be trivial fix (like just subscruct positions..), this can be reviewed without the developer of this physics i guess.

Well, its first time i see this function at all. Not sure if there is active developer which is know something about concept of this functions. You know, legacy physic.. If you can make sure this is right solution and this will not cause regressions, feel free to fix that. If this will be trivial fix (like just subscruct positions..), this can be reviewed without the developer of this physics i guess.
Author

Could its purpose be the fluid distribution within the mesh?
Like in this screenshot, the fluid sinks to the bottom when it's working correctly.
fluid.png

Maybe it could use the coordinates of the bounding box of the currently deformed mesh or local coordinates instead if that's the case?

I'll upload a simple file if you want to test the fluid distribution with those lines removed or changed.

Assuming this is what this is for:

The problem with using local coordinates is that unconnected meshes within a single object will share a fluid volume and the fluid will flow from the upper mesh into the lower mesh with not physical connection between them. This is what already happens currently too.

Could its purpose be the fluid distribution within the mesh? Like in this screenshot, the fluid sinks to the bottom when it's working correctly. ![fluid.png](/attachments/a3afca14-a904-4cd5-9048-704b73a286ab) Maybe it could use the coordinates of the bounding box of the currently deformed mesh or local coordinates instead if that's the case? I'll upload a simple file if you want to test the fluid distribution with those lines removed or changed. Assuming this is what this is for: The problem with using local coordinates is that unconnected meshes within a single object will share a fluid volume and the fluid will flow from the upper mesh into the lower mesh with not physical connection between them. This is what already happens currently too.
Contributor

The problem with using local coordinates is that unconnected meshes within a single object will share a fluid volume and the fluid will flow from the upper mesh into the lower mesh with not physical connection between them. This is what already happens currently too.

I agree. Looks like the current implementation only considers the simplest setting.

> The problem with using local coordinates is that unconnected meshes within a single object will share a fluid volume and the fluid will flow from the upper mesh into the lower mesh with not physical connection between them. This is what already happens currently too. I agree. Looks like the current implementation only considers the simplest setting.
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#119288
No description provided.