Global configuration

Started by
1 comment, last by Mystery 19 years, 6 months ago
For a mesh with interconnected springs e.g one that is found in cloth simulation, do you guys actually move towards a global configuration at each time step i.e attempt to restore each spring to its original length or somewhere near? Currently I am only using a relaxation method with a few iterations at each time step.
Advertisement
Sounds like what you are describing is iterating until the object comes to rest, e.g., achieves equilibrium. Usually in games you do NOT want to iterate until the object comes to rest, since the interesting thing is the motion of the object.

That said, have you implemented an implicit solver? Is that why you're using a relaxation method? If you ARE using an implicit solver, then my answer would be that you should iterate sufficiently that the error in your solution is smaller than some tolerance such as 1e-4 or 1e-5 before stopping the iterations. You can use a larger tolerance if you need to achieve better frame rates, but the error will be larger in that case. Note that this is NOT the same as running until the springs have reached equilibrium. It just means that you've converged on the solution for one time step.

If you have an explicit solver, please say how it is that you're using a relaxation method?
Graham Rhodes Moderator, Math & Physics forum @ gamedev.net
Quote:Original post by grhodes_at_work
Sounds like what you are describing is iterating until the object comes to rest, e.g., achieves equilibrium. Usually in games you do NOT want to iterate until the object comes to rest, since the interesting thing is the motion of the object.

That said, have you implemented an implicit solver? Is that why you're using a relaxation method? If you ARE using an implicit solver, then my answer would be that you should iterate sufficiently that the error in your solution is smaller than some tolerance such as 1e-4 or 1e-5 before stopping the iterations. You can use a larger tolerance if you need to achieve better frame rates, but the error will be larger in that case. Note that this is NOT the same as running until the springs have reached equilibrium. It just means that you've converged on the solution for one time step.

If you have an explicit solver, please say how it is that you're using a relaxation method?


I dun exactly want it to come to rest. Each time-step, my mesh will be subjected to different external forces. The looping through the springs in the mesh part is to preserve its surface area by using Hooke's law. However, I can only achieve a local solution with a single pass since the restored springs might be affected by restoration of other springs during the loop.

Currently I have two different implementations for the solver. One is using Euler(explicit?) and another is by using verlet integration.

This topic is closed to new replies.

Advertisement