Cloth physics depends on location? WTH?

ezgif-2-d22f200a59e8

Can someone explain me this? Cloth in both locations has the same settings:

forum%20cloth

No winds, force fields or anything else in the file. It’s blender 2.78.
Location coordinates in the gif belong to the plain axes you can see. This is the parent of the cloth and the camera.

At large distances precision issues can come up as you are witnessing. This could be potentially fixed by doing the calculations in the objects local space but then likely the issue will be interaction with other objects. An interesting solution could be to have an option of parenting the physics objects to a parent and doing the calculations withing the domain space of the parent.

1 Like

As Felxis says, it’s likely floating point precision: A number in a computer program is defined as a bunch of binary digits and their offset from zero. It has a fixed number of numbers after the “decimal” place, and then shifts the decimal place around. It’s as if you could define 12.345 or 1234.5 or 12345000, but you cannot define 12345006.

What this means is that if your cloth is very far away from the centre, it will be represented less accurately. This often isn’t noticeable as you tend not to care about nanometers if you are moving your object through kilometers, but in the case of cloth simulation, you may care about both.

1 Like

Thanks for a fast replies :slight_smile:

Do you mean moving the cloth to the center (0,0,0), bake physics there, and then moving it where it belongs (e.g. 1500,1500,1500)?

Does it apply to other simulations as well? Like for example water?

That could certainly be a user side workaround to the same effect but is not what i actually meant. I was talking more from the developmental/software architecture perspective.

This would apply to everything dealing with spatial floating-point precision. I suppose my above mentioned interesting solution is sort of in place for fluids though since you can use a custom domain for the simulation.

Ok, let’s say i want to create an animation where a character drives a car and he has a scarf with cloth simulation, which is moved by the wind. The car moves fast and it passes a banner (with cloth simulation) by, which, at the beginning, is moved away from the car at the distance of 1 km. Let’s say a camera always watches both clothes from the beginning of animation to the end, and I want both clothes’ moves to not be distorted in any way. How can i workaround it?

  1. Simulate and cache a reasonably well looping motion for the scarf.
  2. Simulate and cache the banner and play the simulation back at an appropriate time.
  3. ???
  4. Profit.

For simulation caching as you mentioned you can simulate and cache it in/near/around the world center first, then save the cache and you should be able to move the objects to where you want.

I’m also guessing you are talking about simulation for animation/film so you should probably be working a shot at a time, meaning your banner by-pass doesn’t really need to happen that far away from “world” center. Read as: each shot can be a separate scene.

Well… i actually don’t know much about caching a cloth (you mean bake it, right?), or looping it. I will have to look at the topic closely in the future. Thanks for the help for now.

Yes, i mean baking. And to be fair, it’s been a long while since I’ve done anything with the physics within blender so I can mostly just speak in conceptual terms.

Lately i noticed another anomaly and i wonder if it’s also caused by the same rule. It’s about displayed subdivision surface modifier in a viewport.

In the first image the root bone of the rigged character is aprox. 60 units from the center. In the second it’s 1000 on every axes. What is strange is if i move the whole armature that far then no distortions happen.

Probably. I’ve never needed to deal with such edge cases myself though.