Doc:Theory/Physics/Soft Bodies/Solver

提供: wiki
< Doc:Theory
2011年4月22日 (金) 21:23時点におけるwiki>Mont29による版 (moved from Manual soft bodies talk page)
(差分) ← 古い版 | 最新版 (差分) | 新しい版 → (差分)
移動先: 案内検索

Solver stuff

What is a solver

A solver in the soft body context does all the calculations needed to to determine the shape of the soft body when going from frame N to frame N+1. Doing so it will consider what happened to the body in the past ( e.g. how fast it got by falling down ) and what happens during the frame. This includes simple things like gravity is still pulling, but also sudden events like 'oops there is something in my way'. There are a lot of other things the solver cares for but listing them all here would be boring.

Clever solver

To get things done as fast as possible the solver used here follows a strategy called adaptive step sizing and works like this:

  • First try to warp to frame N+1 (or shorter if we were told (MinS will do so)) with all the knowledge we have.
  • Use some voodoo to detect how bad we were doing.
  • If we did not violate the level of badness defined by the error limit we 're done and will happily return our results to the boss.
  • Other ways we failed to hold the badness line go to plan B.
  • Plan B:
  • Assume there happened something we need to look at closer.
  • Reduce the warp distance, if we are allowed to do so. (MaxS or internal emergency break will tell )
  • Try to warp to reduced distance with all the knowledge we have.
  • Use some voodoo to detect how bad we were doing.
  • If we did not violate the level of badness defined by the error limit we continue trying to warp to next step with reduced distance with all the knowledge we have until we reach destination. Once hopefully there return to boss with a smile.
  • Here we start to get optimistic: if voodoo tells us we were doing pretty good we'd even could try to go faster then!
  • If we could not meet the level of badness still we will follow plan B recursively provided we are allowed to do so(MaxS or internal emergency break will tell )
  • When we were not allowed to decrease step size any more (MaxS or internal emergency break did say), we will do our very best and return the poor results to the boss.

Note: you can kick, fire, kill your computer it won't give better results.

material memory

BM did add option to have springs a 'memory' for now the (turn on)limits are hard coded and i know that sucks .. however i think that is pretty cool. Works like that: When ever soft body step call succeeded it adjusts the the spring length according to a linear creeping law hum much more realistic things can be done here :) I have a hidden (but working) slip stick algorithm running .. if you want to control that drop a mail