Cloth simulation does not work for a basic plane, having some specific location values. #111013

Open
opened 2023-08-10 17:35:44 +02:00 by Jeet Guha Thakurta · 10 comments

System Information
Operating system: Windows-10-10.0.19045-SP0 64 Bits
Graphics card: AMD Radeon R5 M335 ATI Technologies Inc. 4.5.13587 Core Profile Context 19.50.26 26.20.15026.1

Blender Version
Broken: version: 3.6.1, branch: blender-v3.6-release, commit date: 2023-07-17 12:50, hash: 8bda729ef4dc
Worked: Nothing found, same error with 3.3, 3.4, 3.5, 4.0 versions

Short description of error
Cloth physics in Blender seems to have a bug. It does not work correctly when the cloth object has some specific locations. Exact steps to reproduce the error are given below. The same cloth physics without any change seems to again work when the object is moved to another location. I could not establish any specific pattern between the location and the working/non-working status, but changing the location randomly solves the issue - although temporarily. If we again move it back to the previous location, cloth physics again stops to work. This is happening with all versions of Blender from 3.3 to 4.0 as far as I could test. I am reporting this officially for 3.6.1 latest version.

Exact steps for others to reproduce the error

  1. Start with the default scene and delete the default cube.
  2. Add a plane, change X-rotation to 90 and Y-location to -2 (minus 2).
  3. Go to edit mode, right-click and subdivide, set subdivision level to 6.
  4. Select only the top-left & bottom-left vertices (blend file is attached for reference).
  5. Create a new vertex group and assign the selected vertices to this vertex group.
  6. Back to the object mode, add cloth physics with all default options.
  7. Enable self collisions, and select the above vertex group in the Pin group.
  8. Now run the simulation, or bake it and run. The cloth physics does not work.
  9. Now change the Y-location to zero. Cloth physics starts working after a few frames.
  10. Again change the Y-location to minus 2. Cloth physics stops working like before.
**System Information** Operating system: Windows-10-10.0.19045-SP0 64 Bits Graphics card: AMD Radeon R5 M335 ATI Technologies Inc. 4.5.13587 Core Profile Context 19.50.26 26.20.15026.1 **Blender Version** Broken: version: 3.6.1, branch: blender-v3.6-release, commit date: 2023-07-17 12:50, hash: `8bda729ef4dc` Worked: Nothing found, same error with 3.3, 3.4, 3.5, 4.0 versions **Short description of error** Cloth physics in Blender seems to have a bug. It does not work correctly when the cloth object has some specific locations. Exact steps to reproduce the error are given below. The same cloth physics without any change seems to again work when the object is moved to another location. I could not establish any specific pattern between the location and the working/non-working status, but changing the location randomly solves the issue - although temporarily. If we again move it back to the previous location, cloth physics again stops to work. This is happening with all versions of Blender from 3.3 to 4.0 as far as I could test. I am reporting this officially for 3.6.1 latest version. **Exact steps for others to reproduce the error** 1. Start with the default scene and delete the default cube. 2. Add a plane, change X-rotation to 90 and Y-location to -2 (minus 2). 3. Go to edit mode, right-click and subdivide, set subdivision level to 6. 4. Select only the top-left & bottom-left vertices (blend file is attached for reference). 5. Create a new vertex group and assign the selected vertices to this vertex group. 6. Back to the object mode, add cloth physics with all default options. 7. Enable self collisions, and select the above vertex group in the Pin group. 8. Now run the simulation, or bake it and run. The cloth physics does not work. 9. Now change the Y-location to zero. Cloth physics starts working after a few frames. 10. Again change the Y-location to minus 2. Cloth physics stops working like before.
Jeet Guha Thakurta added the
Type
Report
Priority
Normal
Status
Needs Triage
labels 2023-08-10 17:35:44 +02:00

Hi, thanks for report. The one thing isn't enough clean for me is what means physics does not work? I can see small wobbles under its own weight, have you can't?

Hi, thanks for report. The one thing isn't enough clean for me is what means `physics does not work`? I can see small wobbles under its own weight, have you can't?

If you are familiar with Blender cloth physics, I think you would immediately understand that a cloth should fall down due to gravity, which is not happening here at Step 8, which is the error. If you follow the steps given above, the behavior it shows at Step 9 is the expected behavior. There the cloth falls down while hanging from the pinned corners. It does not happen at Step 8, the cloth only slightly wobbles, it does not fall like a cloth, which is the defect. And this is just one overly simplified example to reproduce the defect. It is happening in many scenarios within cloth physics, making the physics break randomly and quite frequently. This is only the tip of the iceberg.

If you are familiar with Blender cloth physics, I think you would immediately understand that a cloth should fall down due to gravity, which is not happening here at Step 8, which is the error. If you follow the steps given above, the behavior it shows at Step 9 is the expected behavior. There the cloth falls down while hanging from the pinned corners. It does not happen at Step 8, the cloth only slightly wobbles, it does not fall like a cloth, which is the defect. And this is just one overly simplified example to reproduce the defect. It is happening in many scenarios within cloth physics, making the physics break randomly and quite frequently. This is only the tip of the iceberg.

Sometmes perfect meshes such as subdivided plane can fail to collapse. Adding some noise to it(move 1 vertex slightly out of grid) will resolve this issue. Perhaps lowering compression stiffness could help also.

If you have other issues, please make new report(s)

Sometmes perfect meshes such as subdivided plane can fail to collapse. Adding some noise to it(move 1 vertex slightly out of grid) will resolve this issue. Perhaps lowering compression stiffness could help also. If you have other issues, please make new report(s)
Blender Bot added
Status
Archived
and removed
Status
Needs Triage
labels 2023-08-14 08:53:01 +02:00

Hey, why is this closed without a fix? You completely failed to understand that it is a defect in the code because the same mesh works when placed at Y=0 and does not work at Y=-2 A cloth should not behave like this, cloth physics should work even for a perfect mesh. Your suggestion to move a vertex slightly out of the grid can at best be a hack that suits in forums like stackexchange. This forum is for development of Blender and for a constant endeavor to make it perfect. You apparently agree that cloth physics sometimes does not work for a subdivided plane, but it should. This is a defect and it should remain open until this is fixed, even if it takes a few years.

I really disliked your random suggestion and immediate closure of the issue without any real effort behind fixing the defect. I can think of many such hacks to get my work done, your suggestion is not needed. We need your help to fix the defect, not bring hacks here.

Hey, why is this closed without a fix? You completely failed to understand that it is a defect in the code because the same mesh works when placed at Y=0 and does not work at Y=-2 A cloth should not behave like this, cloth physics should work even for a perfect mesh. Your suggestion to move a vertex slightly out of the grid can at best be a hack that suits in forums like stackexchange. This forum is for development of Blender and for a constant endeavor to make it perfect. You apparently agree that cloth physics sometimes does not work for a subdivided plane, but it should. This is a defect and it should remain open until this is fixed, even if it takes a few years. I really disliked your random suggestion and immediate closure of the issue without any real effort behind fixing the defect. I can think of many such hacks to get my work done, your suggestion is not needed. We need your help to fix the defect, not bring hacks here.
Blender Bot added
Status
Needs Triage
and removed
Status
Archived
labels 2023-08-14 10:13:07 +02:00

Moving the mesh introduces larger floating point errors that introduce this noise into mesh. As far as solver is concerned, the piece of cloth is so stiff and flat, that it supports itself. The issue reported here is a request for modified behavior and not a bug in current behavior. this bug tracker is only for bugs and errors.

For user requests and feedback, please use other channels: https://wiki.blender.org/wiki/Communication/Contact#User_Feedback_and_Requests

For more information on why this isn't considered a bug, visit: https://wiki.blender.org/wiki/Reference/Not_a_bug

Moving the mesh introduces larger floating point errors that introduce this noise into mesh. As far as solver is concerned, the piece of cloth is so stiff and flat, that it supports itself. The issue reported here is a request for modified behavior and not a bug in current behavior. this bug tracker is only for bugs and errors. For user requests and feedback, please use other channels: https://wiki.blender.org/wiki/Communication/Contact#User_Feedback_and_Requests For more information on why this isn't considered a bug, visit: https://wiki.blender.org/wiki/Reference/Not_a_bug
Blender Bot added
Status
Archived
and removed
Status
Needs Triage
labels 2023-08-14 10:59:28 +02:00

Since your explanation supports that it is a Defect, not merely a change request or suggestion, I am reopening this issue. You said, moving the mesh from 0,0 position introduces larger floating point errors that in turn introduces a noise. But the fact is just the opposite if you carefully read the problem statement or practice it by hand. Moving the mesh from 0,0 location breaks the cloth physics in this case, keeping it at 0,0 location actually works fine! If moving the mesh from 0,0 position is expected to introduce noise and help the cloth to collapse, that is not happening in reality, just the opposite is happening. That disconnect is the defect or the bug here.

Note: Please give more time to read the problem statement and try to help it, instead of being in a hurry to somehow close an issue with incorrect information. Developers always have this tendency to argue that a defect is not a defect but just a new user requirement, however they are often wrong.

Since your explanation supports that it is a Defect, not merely a change request or suggestion, I am reopening this issue. You said, moving the mesh from 0,0 position introduces larger floating point errors that in turn introduces a noise. But the fact is just the opposite if you carefully read the problem statement or practice it by hand. Moving the mesh from 0,0 location breaks the cloth physics in this case, keeping it at 0,0 location actually works fine! If moving the mesh from 0,0 position is expected to introduce noise and help the cloth to collapse, that is not happening in reality, just the opposite is happening. That disconnect is the defect or the bug here. Note: Please give more time to read the problem statement and try to help it, instead of being in a hurry to somehow close an issue with incorrect information. Developers always have this tendency to argue that a defect is not a defect but just a new user requirement, however they are often wrong.
Blender Bot added
Status
Needs Triage
and removed
Status
Archived
labels 2023-08-14 11:16:09 +02:00

I have also faced similar issue.

I have also faced similar issue.

While this is yet to be resolved, I can see that the same error arises in many different positions. The cloth (subdivided plane) does not collapse when placed in some random locations while it does collapse on other locations. The same has been reported earlier by several people and as usual the dev team has closed them without a proper fix (like this one was closed twice and I only reopened).

It may be that the cloth physics is not buggy, the source of the error may be in the noise that is being used internally. My intention is to make cloth physics behave as it should be. A perfectly subdivided straight plain is not an exception that it should not collapse under the cloth physics. It is neither a new feature request nor an enhancement, it is a bare minimum functionality expected out of cloth physics. If we can agree on this, we can definitely look for a solution. A simple tweak in the noise pattern used by cloth physics can probably solve this. We can super-impose two noise patterns placed with a 90 degree shift and use that as our base - just one of the many possibilities that the dev team can think of.

While this is yet to be resolved, I can see that the same error arises in many different positions. The cloth (subdivided plane) does not collapse when placed in some random locations while it does collapse on other locations. The same has been reported earlier by several people and as usual the dev team has closed them without a proper fix (like this one was closed twice and I only reopened). It may be that the cloth physics is not buggy, the source of the error may be in the noise that is being used internally. My intention is to make cloth physics behave as it should be. A perfectly subdivided straight plain is not an exception that it should not collapse under the cloth physics. It is neither a new feature request nor an enhancement, it is a bare minimum functionality expected out of cloth physics. If we can agree on this, we can definitely look for a solution. A simple tweak in the noise pattern used by cloth physics can probably solve this. We can super-impose two noise patterns placed with a 90 degree shift and use that as our base - just one of the many possibilities that the dev team can think of.

Cloth solver works with poin like masses on springs. Blend file you provided acts like polystyrene squares(not really though) of size 30x30cm. If there are no external forces, it will just support itself standing. To simulate real world more accurately, you can also subdivide mesh bit more, add some turbulence, decrease compression stiffnes, rotate mesh a bit so it is not aligned with gravity and as I mentioned introduce imperfections. I am only trying to provide most realistic solution to this problem.

Indeed there have been same reports that were closed, and that is for a reason. If you would check the link I posted above, It says, that there are 4K of open reports. This was written 3 years ago and now the number of reports is at 6K. Cloth solver is now only maintained. It seems to not be functionally improved for last 3 years. I can confirm this issue, but likely it will stay open for fairly long time if not for forever.

Cloth solver works with poin like masses on springs. Blend file you provided acts like polystyrene squares(not really though) of size 30x30cm. If there are no external forces, it will just support itself standing. To simulate real world more accurately, you can also subdivide mesh bit more, add some turbulence, decrease compression stiffnes, rotate mesh a bit so it is not aligned with gravity and as I mentioned introduce imperfections. I am only trying to provide most realistic solution to this problem. Indeed there have been same reports that were closed, and that is for a reason. If you would check the link I posted above, It says, that there are 4K of open reports. This was written 3 years ago and now the number of reports is at 6K. Cloth solver is now only maintained. It seems to not be functionally improved for last 3 years. I can confirm this issue, but likely it will stay open for fairly long time if not for forever.

Thank you so much for confirming this issue, and for sharing an in-depth explanation. Your solutions are realistic and highly appreciated. They are workarounds though.

My thought is this: We are talking about imperfections or noise in a perfect mesh. Can we not handle it within the physics itself & add whatever imperfections we may need at times? There are two advantages here: 1) The user is least burdened in experimenting with what works and what does not work, the cloth physics takes up that load 2) Even if the user does something and it works well for one scenario, it may not work so well for another case. If we can handle it more professionally within the cloth physics, it will have a higher success rate and the user will get more confidence.

Coming to the solution part: I am currently using a displace modifier just before the cloth physics with a very low influence. The displace texture is a cloud texture (default settings, Blender original). This seems to work always so far as I could test. So, all that we need is to add an option (checkbox) in the Cloth Physics UI to add initial displacement. Still better, we can name this as Displacement Strength and make it a float input (0.0 to 1.0). The default value can be zero, or a low number like 0.1 (open to debate). Cloth physics will add a similar displacement to the initial state of the cloth before doing whatever it does today. It is a pretty simple solution, and it won't need a huge testing effort because we are essentially just combining two modifiers together. The user can always turn it off by making the Strength to zero (or we can make zero as the default).

Let us look forward to suggestions from more knowledgeable people (and of course any better solution is highly welcome). One should note that the Displacement Strength field I discussed above, is not a feature request. It is just a suggestion for a possible solution of the original issue.

It's perfectly ok if this remains open for a long time. Let other serious issues take priority, that's fine. Many people do get into this same issue in cloth physics and they can add their thoughts here. If I get a developer access/approval in the future, I will certainly try to fix this myself.

Thank you so much for confirming this issue, and for sharing an in-depth explanation. Your solutions are realistic and highly appreciated. They are workarounds though. My thought is this: We are talking about imperfections or noise in a perfect mesh. Can we not handle it within the physics itself & add whatever imperfections we may need at times? There are two advantages here: 1) The user is least burdened in experimenting with what works and what does not work, the cloth physics takes up that load 2) Even if the user does something and it works well for one scenario, it may not work so well for another case. If we can handle it more professionally within the cloth physics, it will have a higher success rate and the user will get more confidence. Coming to the solution part: I am currently using a displace modifier just before the cloth physics with a very low influence. The displace texture is a cloud texture (default settings, Blender original). This seems to work always so far as I could test. So, all that we need is to add an option (checkbox) in the Cloth Physics UI to add initial displacement. Still better, we can name this as Displacement Strength and make it a float input (0.0 to 1.0). The default value can be zero, or a low number like 0.1 (open to debate). Cloth physics will add a similar displacement to the initial state of the cloth before doing whatever it does today. It is a pretty simple solution, and it won't need a huge testing effort because we are essentially just combining two modifiers together. The user can always turn it off by making the Strength to zero (or we can make zero as the default). Let us look forward to suggestions from more knowledgeable people (and of course any better solution is highly welcome). One should note that the Displacement Strength field I discussed above, is not a feature request. It is just a suggestion for a possible solution of the original issue. It's perfectly ok if this remains open for a long time. Let other serious issues take priority, that's fine. Many people do get into this same issue in cloth physics and they can add their thoughts here. If I get a developer access/approval in the future, I will certainly try to fix this myself.
Iliya Katushenock added the
Interest
Physics
label 2023-08-16 12:51:02 +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
4 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#111013
No description provided.