Jump to content
  • Advertisement
Sign in to follow this  
Mystery

Global configuration

This topic is 5123 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!