Cloth Physics Bending #43911
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
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
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
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
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
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
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
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
12 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#43911
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System Information
Windows
Blender Version
Broken: 2.73
90e1b83
Worked: 2.73
273fa0a
Short description of error
Simulation results are not the same between versions. On the current version, and in the past, a cube, with each edge connected to two edges, and a high bending stiffness, behaves relatively rigidly. Using the most recent test build, I received an unexpected result.
Exact steps for others to reproduce the error
Open file and press play. The results should be different between the main build and the test build.
untitledD.blend
Changed status to: 'Open'
Added subscriber: @Arcayer
#43406 was marked as duplicate of this issue
Added subscriber: @mont29
Can confirm results are different. Not sure whether this is bug or expected behavior of new code, though, Lukas, your call here. :)
Added subscribers: @adrian2608, @zeauro, @Sergey, @ZauberParacelsus, @tischbein3-2, @Lapineige, @kevindietrich, @sindra1961, @LukasTonne, @rajaditya_m
Added subscriber: @genscher
The problem here seems to be related to spring compression:
https://developer.blender.org/diffusion/B/browse/master/source/blender/physics/intern/implicit_blender.c;8a551394e50a96d3a78f37525df0825e11ba9fd8$1643
All debugging indicates that this works exactly as before:
https://developer.blender.org/diffusion/B/browse/master/source/blender/blenkernel/intern/implicit.c;95182d1465bb9e39b5ec79f18d5f3df53610538e$1263
I can't say why the result is different now - but if i simply disable the compression test (always calculate structural springs) the new cube also keeps it's shape.
It actually looks like the old code was somehow incorrect: it should allow compression of structural springs, meaning the cloth should collapse in on itself.
Possibly some of the other spring types worked against this (bending, shearing) and have changed in some way.
@genscher: Maybe you could have a look at the old code too?
These only set presets and do not change other parameters.
version 2.73 (sub 9), branch b'master', commit date b'2015-03-10' b'22:08', hash b'0d05315', b'Release'
![DailyBuild.png](https://archive.blender.org/developer/F149773/DailyBuild.png)
version 2.73 (sub 0), branch b'master', commit date b'2015-01-20' b'18:16', hash b'bbf09d9', b'Release'
![273Release.png](https://archive.blender.org/developer/F149775/273Release.png)
This blend file was made by version 2.73 (sub 0).
.blend
ClothDefault.blend
This blend file was made by a daily build version.
version 2.73 (sub 9), branch b'master', commit date b'2015-03-10' b'22:08', hash b'0d05315', b'Release'
![DailyMakeDaily.png](https://archive.blender.org/developer/F149785/DailyMakeDaily.png)
version 2.73 (sub 0), branch b'master', commit date b'2015-01-20' b'18:16', hash b'bbf09d9', b'Release'
![DailyMakeRelease.png](https://archive.blender.org/developer/F149788/DailyMakeRelease.png)
.blend
ClothDefaultDaily.blend
I confirm that results are different with provided .blends opened in official 2.73 and hash
61eab74
.But for this blend made from scratch with hash
61eab74
on ubuntu 14.04 64bits.ClothFromScratch.blend
Result is almost the same but with more spring effect and no rebound in master.
If binaries are different, results may be different.
The point that I changed in blend which I provided is only presets.
I want to see the screenshot of the result that you carried out.
I noticed an interesting thing.
![Made274SameMass.png](https://archive.blender.org/developer/F152006/Made274SameMass.png)
![Made2730SameMass.png](https://archive.blender.org/developer/F152009/Made2730SameMass.png)
I want you to watch this.
This changed presets as well as the blend file which I attached before.
But I made all mass a value same as silk this time.
I made this blend in 2.74.(blender-2.74-3824e0f1-win32.zip)
Made274SameMass.blend
It is this to have made blend of the same setting in 2.73(sub0).
Made2730SameMass.blend
Do you not look Silk more firmly than rubber?
![ClothSim274.png](https://archive.blender.org/developer/F152014/ClothSim274.png)
ClothSim274.blend
Silk is stiff than rubber?
2.71
![271Result.png](https://archive.blender.org/developer/F152025/271Result.png)
271Result.blend
Removed subscriber: @rajaditya_m
Added subscriber: @YAFU
Hello.
I'm noticing this problem in 2.74, View posts #3 and #11 in the next thread:
http://www.blenderartists.org/forum/showthread.php?365655-Slow-Cloth-Simulation-in-2-74
@LukasTonne:
Even if a condition is the same in new code because the concept of the spring is different from old code, a result may not be the same.
New code may be suitable for Hair, but may not be suitable for cloth.
I think that it cannot express the difference in subject matter well.
Hair is a line, but cloth is a plane.
![spring.png](https://archive.blender.org/developer/F155676/spring.png)
One point thinks that a position is decided under the influence of neighboring power.
However, I think that neighboring power does not influence it with the new spring.
The old spring is based on influence of neighboring power.
It rises if I pick up the cloth for silk.
![Bend50_273a_Sub0.png](https://archive.blender.org/developer/F155679/Bend50_273a_Sub0.png)
I can realize it if I coordinate bending with the old spring.
In the case of 2.73a(sub0):
Bend50_273a_Sub0.blend
I cannot realize it even if I maximize bending with the new spring.
![Bend_274RC4.png](https://archive.blender.org/developer/F155682/Bend_274RC4.png)
In the case of 2.74RC4:
Bend_274RC4.blend
@LukasTonne:
I watched the file which you revised and noticed.
There is code about benging spring in more bottoms where are different from the revised point.
The following comment is written.
/* calculate force of bending springs */
current?
Is a judgment of no_compress not enough?
Why does weighting not disperse equally?
![DailyMakeDaily.png](https://archive.blender.org/developer/F149785/DailyMakeDaily.png)
Added subscriber: @lfb3d
@sindra1961 I believe the suggested code for no_compress is a bit off. You would want to have the "no_compress" condition when there is no compression happening (length > L). This is more similar to Lukas' condition. So something like this is more in order:
But that's only when you're comparing (length < L) and (length > L), so the completed code would look something like:
And that doesn't really make sense for bending springs. I would argue that the bending springs only need to be at rest length or compressed to represent the bending/wrinkling of cloth. Wouldn't you agree? So you really only want to calculate bending forces when length < L (specifically for bending forces). The function Lukas was changing was specifically for stretching and shearing springs (you don't really want those other two spring types to compress, as I explain below); however, for bending springs you only want them to compress (not expand) so that they represent bending in cloth.
@LukasTonne I've tried implementing shearing&stretching springs that allow compression, and usually this leads to instability/explosions. In an ideal and correct world, you'd expect that stretching&shearing springs should be able to compress (just as they expand). However, real cloth does not have "super-elastic" behavior. So just like you don't want the springs to stretch too far past rest length; you also don't want cloth to compress too much at all (e.g., once it starts compressing, don't let it continue). The point where compression (for shearing/stretching springs) might lead to instability is where a shearing/stretching spring compresses so much that it potentially "flips direction" (I can go further into detail if you like) -- the length of the stretching/shearing spring is no longer in the direction of the rest length spring, but it has inverted/negated into the opposite direction (and I ask: does this make any sense? Especially in a 1D spring? I think not).
So for cloth, I believe no compression is the way to go (as @genscher originally implemented) for stretching and shearing springs (oppositely, you need compression for the bending springs, as explained above). Can you elaborate on why the "no_compression" flag is needed for hair (or point me towards the commit comment)?
Any relevant feedback/questions are highly appreciated.
@lfb3d:
When I was able to build blender with vs2010, I acquired a source file to my PC.
Therefore I was not able to check a source file freely anymore when I wrote that comment.
I checked how a source file was changed when a new spring system was introduced, but did not know it which was right.
I wanted to confirm it whether there was not the need to use it because no_compress was not used.
If I pick up cloth and raise it, it collapses, but stays by neighboring power.
I think that this power to interfere mutually was included by the conventional spring system.
However, I did not seem to be able to express it by the new spring system.
Because only the part of the source file looks, I may say a wrong thing.
I only want the system which can express material of the cloth to go back up.
I feel a question in treating cloth and hair equally personally.
Added subscriber: @JimG
from 2.74 to 2.72 there were some refactoring changes.
in 2.74 'scaling' is set twice.
and 'cb' is set to the new value.
I've extracted the changes here.
please look at this. In my tests it seemed to have caused the differences between the releases.
Thank you and regards.
2.74------------------------------ IMPLICIT_BLENDER.C
2.72------------------------------IMPLICIT.C
Thanks for testing the differences. This is what I believe is causing the differences as well. This is the only major change in the cloth code that I am aware of. cb should be changed based on the calculations in the research paper from Choi&Ko 2002; I'm not sure what cb is based on with these changes.
Added subscriber: @MartinNorris
Hi Everyone,
I added a patch D1454 for #45084 which I think also solves this problem
That is using the blend file from the opening with the patch the cude stays rigid {has a high stiffness}
With 2.75a there is no stiffness to the cube
Hope this helps
Martin
Added subscriber: @Blendify
Has this been fixed with today commit
After testing with several models using the most recent build (
a7dd209
) and 2.73 (273fa0a
), none of the models failed to exhibit reasonable behavior. Collision detection was superior in the most recent build. Results were otherwise similar.I would consider this fixed.
Changed status from 'Open' to: 'Resolved'
We can always reopen this if it appears to be broken still but glad to here this finally works again