1 / 14

3 . 7. Other Game Physics Approaches

3 . 7. Other Game Physics Approaches. Overview of other game engine physics approaches . Other Approaches. Overview of other game engine physics approaches . Simultaneous Contact Resolution.

denver
Download Presentation

3 . 7. Other Game Physics Approaches

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 3.7.Other Game Physics Approaches Overview of other game engine physics approaches

  2. Other Approaches Overview of other game engine physics approaches

  3. Simultaneous Contact Resolution As an alternative to resolving contacts one at a time, a group of contacts can be solved simultaneously. Physics engines using this approach tend to employ force calculations rather than impulses, i.e. resting objects are kept apart by a constant force (and not a series of single-frame impulses). A simultaneous resolution calculation tries to find the forces and impulses to apply at each contact, taking the interaction of all contacts into account. The most common approach to doing this is by using a Jacobian and solving what is known as the “linear-complementary problem”.

  4. The Jacobian The Jacobian is a mathematical construct (a matrix) that encodes how one contact affects another. It can be solved (usually) to provide a set of forces to be applied. It operates by firstly combining the forces and torques for all objects into a single (long) vector (requiring 6xn entries, where n is the number of rigid bodies – 3 force components, 3 torque components). Next, all accelerations (linear and angular) for all objects are also combined into another (long) vector. The entries in the Jacobian matrix relate these two vectors, i.e. each location in the matrix encodes the amount of acceleration caused by the application of a unit of force or torque.

  5. The Jacobian Some of the entries in the matrix are very simple to calculated (using the equations of motion and rotation as used earlier). The more complex entries arise when encoding the interaction of objects at contact points, but the same approach holds true – i.e. the effect per unit of applied force is calculated and encoded. Components within the Jacobian will also be used to model frictional forces. The flexibility of the Jacobian to represent interactions between objects, as well as the basic motion of the object itself, allows it to be used to create a much wider range of joints. For example, the motion of one object along one axis can be fixed; motors can be implemented by adding elements to the Jacobian that generate forces, etc.

  6. Linear Complementary Problem Resolving all the contacts, using a constructed Jacobian, J , requires that the following be resolved: where f is a vector of force and torque components for all rigid bodies and is the resulting accelerations. f comprises two components: Where fknown is the set of forces and torques we know we are applying (forces due to gravity or due to other force generators) and fcontactsis the set of forces that are generated in the contacts, which is what we’re trying to find out. Relying on the distributive properties of matrices (i.e. A×(B +C) = A×B+A×C.), this can be written as: In other words, the Jacobian is multiplied by the known force vector to get a known acceleration.

  7. Linear Complementary Problem Calculating is accomplished before contact resolution (i.e. this value does not change during the resolve process). Stated as such, one approach (albeit computationally expensive and possibly without a solution) is to solve the equation by computing the inverse of the Jacobian. However, this does not take into account an additional constraint that: where r is a vector of limits on how big the forces can be (frictional forces will have a defined limit) The final calculation, finding f so that it fulfils both equations, is called the “linear complementary problem”.

  8. Linear Complementary Problem A commonly used algorithm for solving the LCP is called the “pivot algorithm.” It works by making guesses for components in f and checking the results. The errors from one set of guesses can be used to modify components one at a time and converge at a solution. Under some assumptions that are commonly met in rigid body simulations, the guesses will always converge toward the solution. Complications can arise due to numerical instability and the approximation of fixed-length time steps. This can result in a situation where the pivot algorithm cannot be solved. A robust implementation must detect such situations and provide alternatives (although this adds to the overall complexity).

  9. Breakable / Deformable Bodies Overview of breakable and deformable bodies

  10. Video not available in on-line slides

  11. Video not available in on-line slides

  12. Directed reading Directed Reading Directed reading concerning other physics approaches

  13. Directed reading Directed reading

  14. Summary Today we explored: • Summary of other physics approaches To do: • Think if you want to explore the more complex physics approaches.

More Related