Forum
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: What exactly do the Simulation Iterations and Subdivisions control?

What exactly do the Simulation Iterations and Subdivisions control? 7 months 2 weeks ago #31

  • marcD78
  • marcD78's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 2
  • Thank you received: 0
So far, I have been setting Simulation Iterations and Subdivisions almost arbitrarily, until I was happy with the resulting simulation, but I would love to understand a bit more about what exactly they do and how they are different.
Does anyone know where I can find information on this?

Marc

Please Log in or Create an account to join the conversation.

What exactly do the Simulation Iterations and Subdivisions control? 7 months 2 weeks ago #32

  • Sebastian
  • Sebastian's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 40
  • Thank you received: 10
Hi Marc,

This is a great question. If you go to our documentation and open the "Avatar Cloth" tutorial, there is a "Simulation Parameters" section explaining the differences.
It states as follows:

Iterations
The number of Simulation Iterations control the convergence, so the more iterations the better the convergence towards the problem solution. The convergence is directly impacted by the size of the problem, the mass ratios between objects interacting, the stiffness desired, etc… In other words, in a complex system it is impossible to tell how many iterations might be needed to converge at a given precision and it gets even worse considering that most problems end up over constrained locally by pinching or collisions singularities. So, we allow you to set a hard limit in number of iterations to balance processing time and convergence while avoiding systems iterating forever around a solution that might not even exist.

Subdivisions
Simulation Subdivision is the number of substeps the simulation performs for each frame. Imagine you have a scene at 24 frames per second. So, if you set 10 subdivisions, then the physics solver will perform 10 substeps between each frame, interpolating the information internally to run at 240 Hertz (10 x 24 per second). So, the output is still at a frame every 1/24 seconds but the solver will run 10 solves per frame through substeps of 1/240 second. The number of subdivisions is very important because it controls the accuracy of the collision. If you have small / thin objects and fast motion, then you need higher number of subdivisions to better sample the time to avoid objects interpenetrating. The number of subdivisions is also very important to capture fast oscillations. The time sampling must be smaller than the frequency of the oscillation and the number of subdivisions is your friend in this case too.

Iterations & Subdivisions Relationship
The number of iterations and the number of subdivisions also combine. For example, imagine a simulation using 10 subdivisions but also needing 50 iterations to converge as desired. The same problem with a setting of 20 subdivisions might only need 20 iterations or less to reach the desired convergence while increasing the accuracy of a problem that struggled to converge. The computation time in both cases is roughly the same since the physics will execute 500 solver steps with 10 collision detections in the first case and 400 solver steps with 20 collision detections in the second case.

I hope this helps. Please let me know if anything is unclear.

Cheers,
Sebastian
The following user(s) said Thank You: marcD78

Please Log in or Create an account to join the conversation.

What exactly do the Simulation Iterations and Subdivisions control? 7 months 2 weeks ago #33

  • marcD78
  • marcD78's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 2
  • Thank you received: 0
Hi Sebastian,

Fantastic. This makes things much clearer. Thanks a lot.

Marc

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Time to create page: 0.067 seconds