Cloth simulation machine units scale is off.. it have to be 10 times smaller #62631

Closed
opened 2019-03-16 00:02:30 +01:00 by Isak Thjellesen · 20 comments

Operating system: Win10
Graphics card: Nvidia 1060

Blender Version
Broken: v2.80.248

Short description of error
Cloth simulation machine units scale is off.. it have to be 10 times smaller

Exact steps for others to reproduce the error
If you want to make a Simulation off a piece of canvas there is a square meter,you have to make it Ten times bigger (10m x10m).
Then default presetting for canvas works, as Long as you don't change the settings for the mass, it should be 10 times less Around 0.2 to 0.3 kg

Operating system: Win10 Graphics card: Nvidia 1060 **Blender Version** Broken: v2.80.248 **Short description of error** Cloth simulation machine units scale is off.. it have to be 10 times smaller **Exact steps for others to reproduce the error** If you want to make a Simulation off a piece of canvas there is a square meter,you have to make it Ten times bigger (10m x10m). Then default presetting for canvas works, as Long as you don't change the settings for the mass, it should be 10 times less Around 0.2 to 0.3 kg

Added subscriber: @Harvid

Added subscriber: @Harvid

Personally I think the default scale of Blender is way too big..
The default cube is 2x2x2 meters, When You Look at a screen without any reference to compare with,you will properly think It is a lot smaller.
I'm guessing between 2x2x2cm and 20x20x20cm depending of the size of the screen you are working on.
but I don't think anyone with ges in the meters range

Personally I think the default scale of Blender is way too big.. The default cube is 2x2x2 meters, When You Look at a screen without any reference to compare with,you will properly think It is a lot smaller. I'm guessing between 2x2x2cm and 20x20x20cm depending of the size of the screen you are working on. but I don't think anyone with ges in the meters range

Added subscriber: @brecht

Added subscriber: @brecht

Can you describe exactly what the bug is? What fails if you don't make it bigger? It seems to work fine here.

Can you describe exactly what the bug is? What fails if you don't make it bigger? It seems to work fine here.

Here is two file/scenes with baked in keyframes - world scene scale is 1.0
if I change the scene scale to 0.1 the Mass is 0.0003kg and max out at 0.01kg

test 10mx10m.blend

test 1mx1m .blend

Here is two file/scenes with baked in keyframes - world scene scale is 1.0 if I change the scene scale to 0.1 the Mass is 0.0003kg and max out at 0.01kg [test 10mx10m.blend](https://archive.blender.org/developer/F6836437/test_10mx10m.blend) [test 1mx1m .blend](https://archive.blender.org/developer/F6836436/test_1mx1m_.blend)

Added subscriber: @ZedDB

Added subscriber: @ZedDB
Sebastian Parborg self-assigned this 2019-03-28 12:22:41 +01:00

The weight of the cloth sim is indeed scaled too much it seems.

The weight of the cloth sim is indeed scaled too much it seems.

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'

This is actually the correct behavior.

The mass is calculated as mass = density * volume and volume = m^3. So if you scale the scene to 0.1 units, the new mass will be oldmass * 0.1^3 = 0.3kg * 0.1^3 = 0.0003kg

This is actually the correct behavior. The mass is calculated as `mass = density * volume` and `volume = m^3`. So if you scale the scene to 0.1 units, the new mass will be `oldmass * 0.1^3 = 0.3kg * 0.1^3 = 0.0003kg`

Changed status from 'Archived' to: 'Open'

Changed status from 'Archived' to: 'Open'

My bad now I see the issue. The weight can't go up higher than 0.01kg.

My bad now I see the issue. The weight can't go up higher than 0.01kg.

@brecht this is really old, but do you remember why we cap the weight 6ec52fc1b5 ?

I'm guessing it has to do with simulation stability etc.

@brecht this is really old, but do you remember why we cap the weight 6ec52fc1b5 ? I'm guessing it has to do with simulation stability etc.

There's no good reason I imagine, it's easy to get unstable simulations anyway. That commit is porting things from even older UI code that had these limits. Just remove the limits.

There's no good reason I imagine, it's easy to get unstable simulations anyway. That commit is porting things from even older UI code that had these limits. Just remove the limits.

This issue was referenced by d98d4fce93

This issue was referenced by d98d4fce93f4b7ae2f4c48d70a3e5f4b324ac1ba

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

Added subscriber: @padone

Added subscriber: @padone

edit. Blender 2.92

Brecht, Sebastian, you're confusing the unit scale with the object size. There is no reason why physics attributes should depend on the unit scale, including camera lens and light falloff, other than simulations.

Here's the proof that's simple enough:

  1. Set the unit scale to 1.0 then run a cloth simulation with a 1m cube and a 2m cloth.

  2. Then set the unit scale to 0.1 and run the same simulation with a 1m cube and a 2m cloth, with also the same simulation parameters of course. You will get very different results.

Physics simulations should only depend on the object size, not on the unit scale. That is, the unit scale is there to set the measure units, not the size of the objects. This is also reported in the blender docs.

https://docs.blender.org/manual/en/latest/scene_layout/scene/properties.html

Below the example above and the two scene files included. The objects size and physics attributes are exactly the same. It is only changed the unit scale.

cloth-1.jpg

cloth-2.jpg

cloth-1.blend

cloth-2.blend

**edit.** Blender 2.92 Brecht, Sebastian, you're confusing the unit scale with the object size. There is no reason why physics attributes should depend on the unit scale, including camera lens and light falloff, other than simulations. Here's the proof that's simple enough: 1. Set the unit scale to 1.0 then run a cloth simulation with a 1m cube and a 2m cloth. 2. Then set the unit scale to 0.1 and run the same simulation with a 1m cube and a 2m cloth, with also the same simulation parameters of course. You will get very different results. Physics simulations should only depend on the object size, not on the unit scale. That is, the unit scale is there to set the measure units, not the size of the objects. This is also reported in the blender docs. https://docs.blender.org/manual/en/latest/scene_layout/scene/properties.html Below the example above and the two scene files included. The objects size and physics attributes are exactly the same. It is only changed the unit scale. ![cloth-1.jpg](https://archive.blender.org/developer/F9880907/cloth-1.jpg) ![cloth-2.jpg](https://archive.blender.org/developer/F9880910/cloth-2.jpg) [cloth-1.blend](https://archive.blender.org/developer/F9880913/cloth-1.blend) [cloth-2.blend](https://archive.blender.org/developer/F9880916/cloth-2.blend)

What the Blender docs say is that if you have an existing scene and change the unit scale value, then nothing will change in physics simulation, and I believe that is how it works.

If you set the unit scale value and then start editing the scene and setting sizes, the result will be different. That's due to numerical precision differences. The whole point of the unit scale setting is that you can set it to a particular value to improve numerical precision when working at small or larger scales, if there would be no difference there would be no point in having the option.

The aim is for physics simulations to be as independent as possible from the unit scale, but in practice that's not always the case. Note that there are also physics simulation settings like collision distance that will change units when you change the unit scale, that you need to set to matching values to get a correct comparison.

What the Blender docs say is that if you have an existing scene and change the unit scale value, then nothing will change in physics simulation, and I believe that is how it works. If you set the unit scale value and then start editing the scene and setting sizes, the result will be different. That's due to numerical precision differences. The whole point of the unit scale setting is that you can set it to a particular value to improve numerical precision when working at small or larger scales, if there would be no difference there would be no point in having the option. The aim is for physics simulations to be as independent as possible from the unit scale, but in practice that's not always the case. Note that there are also physics simulation settings like collision distance that will change units when you change the unit scale, that you need to set to matching values to get a correct comparison.

Thank you Brecht for your reply, it is just great to have you caring about this.

As for the unit scale, the precision difference is intended for microscopic or astronomical scale, as the popup explains. If changing the scale by 1/10 messes up the whole simulation precision I hope we can agree there's something odd. As for the simulation values, in my test scenes I did change the values according to the unit scale, for example the vertex mass stills 0.3 kg in both scenes, that's the cotton preset, as also shown in the pictures. Again, it doesn't make sense that two simulations where the objects have the same physical attributes differ so much, just for precision issues by changing the unit scale by 1/10.

As a side note, since we're here. The cloth vertex weights in the presets seem off enough. I mean, a cotton fabric is about 140 gsm (grams per square meter) while the cotton preset gets 300 grams per vertex, this means we must have one vertex per two square meters to get it right.

And really, thank you so much again for your reply and attention on this.

edit. Then I understand this can be hard to fix. If so, it would be useful to add a note in the blender docs stating that cloth simulation must be used with unit scale = 1 to avoid bad precision issues.

Thank you Brecht for your reply, it is just great to have you caring about this. As for the unit scale, the precision difference is intended for microscopic or astronomical scale, as the popup explains. If changing the scale by 1/10 messes up the whole simulation precision I hope we can agree there's something odd. As for the simulation values, in my test scenes I did change the values according to the unit scale, for example the vertex mass stills 0.3 kg in both scenes, that's the cotton preset, as also shown in the pictures. Again, it doesn't make sense that two simulations where the objects have the same physical attributes differ so much, just for precision issues by changing the unit scale by 1/10. As a side note, since we're here. The cloth vertex weights in the presets seem off enough. I mean, a cotton fabric is about 140 gsm (grams per square meter) while the cotton preset gets 300 grams per vertex, this means we must have one vertex per two square meters to get it right. And really, thank you so much again for your reply and attention on this. **edit.** Then I understand this can be hard to fix. If so, it would be useful to add a note in the blender docs stating that cloth simulation must be used with unit scale = 1 to avoid bad precision issues.

blender 2.92

You may also want to look at the diffeomorphic discussion where Thomas implemented dforce assets for Blender. Specifically, it seems that the minimum distance of 1 mm for collision is not enough for real case simulations, and we need to scale the whole scene up to get more precision and avoid the simulation stalling. This is also reported in the tutorial linked below.

So if you could remove the limit for the minimum collision distance, or at least make it less than 1 mm, it will be useful. Thank you.

https://bitbucket.org/Diffeomorphic/import_daz/issues/410/better-dforce

https://www.youtube.com/watch?v=AbyfuW5Aocg

blender 2.92 You may also want to look at the diffeomorphic discussion where Thomas implemented dforce assets for Blender. Specifically, it seems that the minimum distance of 1 mm for collision is not enough for real case simulations, and we need to scale the whole scene up to get more precision and avoid the simulation stalling. This is also reported in the tutorial linked below. So if you could remove the limit for the minimum collision distance, or at least make it less than 1 mm, it will be useful. Thank you. https://bitbucket.org/Diffeomorphic/import_daz/issues/410/better-dforce https://www.youtube.com/watch?v=AbyfuW5Aocg
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
5 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#62631
No description provided.