Cloth simulation compatibility is broken in 2.74 #44157

Closed
opened 2015-03-27 19:22:45 +01:00 by Satoshi Yamasaki · 37 comments

System Information
Windows8.1 pro x64, GeForce GTX660

Blender Version
Broken: 2.74TB1(ed5df50) and later (I've verified with TB1 - RC4 too)
Worked: 2.72, 2.73a

Short description of error
When using "Lether" preset of the Cloth simulation, the results are differences between before 2.74 and later.
I just verified this preset, but probably, other presets have also same problem...

ClothBug.jpg

Exact steps for others to reproduce the error
See the attached files please.

LetherCloth.blend

Thanks,

**System Information** Windows8.1 pro x64, GeForce GTX660 **Blender Version** Broken: 2.74TB1(ed5df50) and later (I've verified with TB1 - RC4 too) Worked: 2.72, 2.73a **Short description of error** When using "Lether" preset of the Cloth simulation, the results are differences between before 2.74 and later. I just verified this preset, but probably, other presets have also same problem... ![ClothBug.jpg](https://archive.blender.org/developer/F155612/ClothBug.jpg) **Exact steps for others to reproduce the error** See the attached files please. [LetherCloth.blend](https://archive.blender.org/developer/F155614/LetherCloth.blend) Thanks,
Author
Member

Changed status to: 'Open'

Changed status to: 'Open'
Author
Member

Added subscriber: @SatoshiYamasaki

Added subscriber: @SatoshiYamasaki
Member

Added subscriber: @JulianEisel

Added subscriber: @JulianEisel
Member

Coud you test the 2.74 RC ? We had some issues that were fixed since the TB1, so maybe it works again.

Coud you test the [2.74 RC ](http://download.blender.org/release/Blender2.74/)? We had some issues that were fixed since the TB1, so maybe it works again.
Author
Member

Yes of course, I've tested with RC4 too...
OK, I'll add the information. thanks,

Yes of course, I've tested with RC4 too... OK, I'll add the information. thanks,

Added subscriber: @sindra1961

Added subscriber: @sindra1961

I think that this is a cause like #43911 .
This is the image which carried out blend file attached in 2.73a(sub0).
But I reduce a value so that influence of bending decreases.
LetherCloth_Bending.png

There is little influence of bending in new spring code.

I think that this is a cause like [#43911 ](https://developer.blender.org/T43911). This is the image which carried out blend file attached in 2.73a(sub0). But I reduce a value so that influence of bending decreases. ![LetherCloth_Bending.png](https://archive.blender.org/developer/F156207/LetherCloth_Bending.png) There is little influence of bending in new spring code.

By the way, the result is the same even if I set bending to 10000 in 2.74RC4.

By the way, the result is the same even if I set bending to 10000 in 2.74RC4.

2.74RC4
different_bending_274RC4.png

2.73a(sub0)
different_bending_273a_Sub0.png

different_bending.blend

2.74RC4 ![different_bending_274RC4.png](https://archive.blender.org/developer/F156224/different_bending_274RC4.png) 2.73a(sub0) ![different_bending_273a_Sub0.png](https://archive.blender.org/developer/F156226/different_bending_273a_Sub0.png) [different_bending.blend](https://archive.blender.org/developer/F156230/different_bending.blend)
Lukas Tönne was assigned by Satoshi Yamasaki 2015-03-30 16:54:38 +02:00
Author
Member

Added subscriber: @LukasTonne

Added subscriber: @LukasTonne
Author
Member

@LukasTonne
So could you please verify once again, lukas?

@LukasTonne So could you please verify once again, lukas?

cloth stiffness scaling is incompatible, too.

2.73a(sub0)
screen2.png
2.74RC4
screen274RC4.png
.blend
untitled.blend

cloth stiffness scaling is incompatible, too. 2.73a(sub0) ![screen2.png](https://archive.blender.org/developer/F156719/screen2.png) 2.74RC4 ![screen274RC4.png](https://archive.blender.org/developer/F156721/screen274RC4.png) .blend [untitled.blend](https://archive.blender.org/developer/F156723/untitled.blend)

Added subscriber: @lfb3d

Added subscriber: @lfb3d

@sindra1961 Thank you for the test images regarding the different Bending Stiffness values. I can see the differences you mention. As an additional note: I usually have a hard time seeing a difference in Bending values such as 1.0, 150.0, 10000.0. So I usually tend to use values such as 0.0001, 0.01, and 10.0 to see noticeable differences in the cloth. It's hard for me to tell the differences between cloth's with high bending stiffness values (values > 1.0). Thanks again!

@sindra1961 Thank you for the test images regarding the different Bending Stiffness values. I can see the differences you mention. As an additional note: I usually have a hard time seeing a difference in Bending values such as 1.0, 150.0, 10000.0. So I usually tend to use values such as 0.0001, 0.01, and 10.0 to see noticeable differences in the cloth. It's hard for me to tell the differences between cloth's with high bending stiffness values (values > 1.0). Thanks again!

@lfb3d:
BendingExamp.png
This is a value of bending of presets set in blender.
This is the same as an old spring system.
BendingExamp.blend

@lfb3d: ![BendingExamp.png](https://archive.blender.org/developer/F197458/BendingExamp.png) This is a value of bending of presets set in blender. This is the same as an old spring system. [BendingExamp.blend](https://archive.blender.org/developer/F197461/BendingExamp.blend)

Added subscriber: @MartinNorris

Added subscriber: @MartinNorris

Hi,

I opened a bug #45084 and have just posted a patch D1454.
I think this also solves this problem

e.g. for 2.75a patched

#44157 with patch.png

Best regards

Martin

PS. And also the original post blend ...

#44157 with patch original.png

Hi, I opened a bug #45084 and have just posted a patch [D1454](https://archive.blender.org/developer/D1454). I think this also solves this problem e.g. for 2.75a patched ![#44157 with patch.png](https://archive.blender.org/developer/F222391/T44157_with_patch.png) Best regards Martin PS. And also the original post blend ... ![#44157 with patch original.png](https://archive.blender.org/developer/F222396/T44157_with_patch_original.png)

Added subscriber: @YAFU

Added subscriber: @YAFU

Hello MartinNorris.
I tried the patch and it seems the simulation with the "LetherCloth.blend" file from this report is quite similar between 2.73a and patched 2.75.4 from master.
But with the "flag3_collision.blend" file from the following thread (post #3):
http://www.blenderartists.org/forum/showthread.php?365655-Slow-Cloth-Simulation-in-2-74

the result of the simulation is still very different (although I think it has improved a little in the patched version). I do not know, maybe I'm wrong, but it seems to me much more natural the simulation result with 2.73a. Perhaps a different problem to what your patch fixes?

Hello MartinNorris. I tried the patch and it seems the simulation with the "LetherCloth.blend" file from this report is quite similar between 2.73a and patched 2.75.4 from master. But with the "flag3_collision.blend" file from the following thread (post #3): http://www.blenderartists.org/forum/showthread.php?365655-Slow-Cloth-Simulation-in-2-74 the result of the simulation is still very different (although I think it has improved a little in the patched version). I do not know, maybe I'm wrong, but it seems to me much more natural the simulation result with 2.73a. Perhaps a different problem to what your patch fixes?

Hi YAFU,

I tried the flag3 blend with both 2.73a and 2.75a with patch

For 2.73a SupportFlag_273a.png
And for 2.75a with patch SupportFlag_275a_patch.png
And for reference 2.75a without the patch SupportFlag_275a.png

Is this what you get?

I am sorry, but I do not think the patch makes any difference in this situation
Because the material is already very 'light and flexible' the structural coefficients do not effect the simulation very much
All the problems I was trying to solve are related to structural stiffness e.g. #45084 #44157 and #43911

Looking at your BA thread the original problem you identified was the drop in frame rate
Again, sorry, but the patch does not impact this at all.
Maybe you should open a bug just for the frame rate issue?

Best regards

Martin

Hi YAFU, I tried the flag3 blend with both 2.73a and 2.75a with patch For 2.73a ![SupportFlag_273a.png](https://archive.blender.org/developer/F223584/SupportFlag_273a.png) And for 2.75a with patch ![SupportFlag_275a_patch.png](https://archive.blender.org/developer/F223587/SupportFlag_275a_patch.png) And for reference 2.75a without the patch ![SupportFlag_275a.png](https://archive.blender.org/developer/F223590/SupportFlag_275a.png) Is this what you get? I am sorry, but I do not think the patch makes any difference in this situation Because the material is already very 'light and flexible' the structural coefficients do not effect the simulation very much All the problems I was trying to solve are related to structural stiffness e.g. #45084 #44157 and #43911 Looking at your BA thread the original problem you identified was the drop in frame rate Again, sorry, but the patch does not impact this at all. Maybe you should open a bug just for the frame rate issue? Best regards Martin

@MartinNorris, I'm sorry for not having explained well.
In that thread I mentioned two problems, one referred to the fps speed (flag3.blend shared file in post #1), There is already a report:
https://developer.blender.org/T44031

But the other problem I meant is concerning the broken compatibility where the simulation result is different between 2.73a and 2.74/2.75 (flag3_collision.blend file shared in post #3):
http://www.pasteall.org/blend/35062

@MartinNorris, I'm sorry for not having explained well. In that thread I mentioned two problems, one referred to the fps speed (flag3.blend shared file in post #1), There is already a report: https://developer.blender.org/T44031 But the other problem I meant is concerning the broken compatibility where the simulation result is different between 2.73a and 2.74/2.75 (flag3_collision.blend file shared in post #3): http://www.pasteall.org/blend/35062

@YAFU

OK, it is good the performance hit is reported.
I can try some tests to see if it is calculation of the stiffness scaling with bending_damping that is caused the problem {though I suspect not, the change for this calculation is too small}

Do you see the same results in the screen shots I posted?
For the flag under different versions.

It looks to me as though the patch does not make any difference, but that is most probably because the cloth settings for cotton do not have any significant stiffness.
But with the patch you can try different values for the stiffness, for example raise both the structural and bending stiffness {leave the mass unchanged}, and expect a better result than without the patch.

@YAFU OK, it is good the performance hit is reported. I can try some tests to see if it is calculation of the stiffness scaling with bending_damping that is caused the problem {though I suspect not, the change for this calculation is too small} Do you see the same results in the screen shots I posted? For the flag under different versions. It looks to me as though the patch does not make any difference, but that is most probably because the cloth settings for cotton do not have any significant stiffness. But with the patch you can try different values for the stiffness, for example raise both the structural and bending stiffness {leave the mass unchanged}, and expect a better result than without the patch.

Added subscriber: @RayMairlot

Added subscriber: @RayMairlot

@MartinNorris. Yes, I see a similar result. But it's hard to know if anything changes a lot with that "flag3.blend" file.
Here I have done some testing with the other file involving collision, comparing 2.73a, 2.75.4 and patched 2.75.4. Here videos and files:
https://www.dropbox.com/s/6cjm0g603l6r6qp/Blender%20Cloth%20Test.zip?dl=0

Really I have the feeling that the simulation is correct as happens in 2.73a. So I do not know if this still means breaking compatibility between versions as the title of this report shows.

@MartinNorris. Yes, I see a similar result. But it's hard to know if anything changes a lot with that "flag3.blend" file. Here I have done some testing with the other file involving collision, comparing 2.73a, 2.75.4 and patched 2.75.4. Here videos and files: https://www.dropbox.com/s/6cjm0g603l6r6qp/Blender%20Cloth%20Test.zip?dl=0 Really I have the feeling that the simulation is correct as happens in 2.73a. So I do not know if this still means breaking compatibility between versions as the title of this report shows.

@YAFU

That is a great illustration of what you mean
I can see that there is a big difference in the simulation
But I do not think it is anything to do with the stiffness, it is something to do with collision

As a test I built a version where kb = cb = ... {these are the structural properties of the cloth}
Essentially reverting the cloth structural properties to the 2.73a state
But this has no effect on the collisions and it looks like the 2.75a simulation

When I have time I will look into the collision code!

@YAFU That is a great illustration of what you mean I can see that there is a big difference in the simulation But I do not think it is anything to do with the stiffness, it is something to do with collision As a test I built a version where kb = cb = ... {these are the structural properties of the cloth} Essentially reverting the cloth structural properties to the 2.73a state But this has no effect on the collisions and it looks like the 2.75a simulation When I have time I will look into the collision code!

Ok, thanks Martin.

An observation. As I said, the result of the simulation with 2.73a is what I think is right. The only thing I find weird with 2.73a is that the result after the rebound seems in slow motion. But I have found this changes and get little better when increase the value of "Steps" in Quality. The simulation with 2.75 also improves when this value is increased, but the simulation result still seems different and worse than 2.73a to me (although fps between 2.73 and 2.75 seem a little more paired with large values in quality "Steps").
Anyway, just using that same .blend file with these same values, the simulation does not result similar between versions.

Ok, thanks Martin. An observation. As I said, the result of the simulation with 2.73a is what I think is right. The only thing I find weird with 2.73a is that the result after the rebound seems in slow motion. But I have found this changes and get little better when increase the value of "Steps" in Quality. The simulation with 2.75 also improves when this value is increased, but the simulation result still seems different and worse than 2.73a to me (although fps between 2.73 and 2.75 seem a little more paired with large values in quality "Steps"). Anyway, just using that same .blend file with these same values, the simulation does not result similar between versions.
Member

Added subscriber: @Blendify

Added subscriber: @Blendify
Member

I think this was fixed today am I correct?

I think this was fixed today am I correct?

Hi @Blendify

At least the cloth stiffness and bending is fixed so it is the same as previous version of Blender
But @YAFU has also indicated that the cloth collision is different and patch D1454 has not touched the collision code
Perhaps the original poster @SatoshiYamasaki can comment if the patch is sufficient for the original problem?
And then we could track a different more specific bug for the cloth collision being different.

Best regards

Martin

Hi @Blendify At least the cloth stiffness and bending is fixed so it is the same as previous version of Blender But @YAFU has also indicated that the cloth collision is different and patch [D1454](https://archive.blender.org/developer/D1454) has not touched the collision code Perhaps the original poster @SatoshiYamasaki can comment if the patch is sufficient for the original problem? And then we could track a different more specific bug for the cloth collision being different. Best regards Martin

Added subscriber: @bireos

Added subscriber: @bireos

Added subscriber: @JuB

Added subscriber: @JuB

Added subscriber: @angavrilov

Added subscriber: @angavrilov

I did a bisect to find what causes the difference in cloth collision behavior between 2.73 and 2.74/current, and found that it's commit c6e5f6afe0, which changed the code used by cloth to solve equations. However, it turns out that it most likely didn't introduce any bug . In fact, actually the 2.73 version of the code was exiting the iteration too early to produce a precise solution. Changing the old code to always do 100 iterations makes it produce results close to what current solver does.

Thus it seems that cloth collision in 2.73 was more stable simply because imprecise solutions for spring equations somehow resulted in unintended dissipation of energy in the cloth; but the current solver does more iterations, so that doesn't happen. This increase in iteration count may also explain #44031.

I did a bisect to find what causes the difference in cloth collision behavior between 2.73 and 2.74/current, and found that it's commit c6e5f6afe0, which changed the code used by cloth to solve equations. However, it turns out that it most likely didn't introduce any bug . In fact, actually the 2.73 version of the code was exiting the iteration too early to produce a precise solution. Changing the old code to always do 100 iterations makes it produce results close to what current solver does. Thus it seems that cloth collision in 2.73 was more stable simply because imprecise solutions for spring equations somehow resulted in unintended dissipation of energy in the cloth; but the current solver does more iterations, so that doesn't happen. This increase in iteration count may also explain #44031.

Added subscriber: @purpleskydev

Added subscriber: @purpleskydev

Added subscriber: @brecht

Added subscriber: @brecht

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'

Cloth bending was revamped in 2.8, this bug is no longer relevant.

Cloth bending was revamped in 2.8, this bug is no longer relevant.
Sign in to join this conversation.
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
13 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#44157
No description provided.