Cumulative Submission Assignment 5: Collision Response Implement - - PowerPoint PPT Presentation

cumulative submission assignment 5 collision response
SMART_READER_LITE
LIVE PREVIEW

Cumulative Submission Assignment 5: Collision Response Implement - - PowerPoint PPT Presentation

Assignment 5 + Cumulative Submission Assignment 5: Collision Response Implement collision response of a This assignment is worth ~8-12% of single convex object falling onto an the module infinite plane Minimum requirements: Rigid Body state


slide-1
SLIDE 1

Assignment 5 + Cumulative Submission

slide-2
SLIDE 2

Assignment 5: Collision Response

Implement collision response of a single convex object falling onto an infinite plane Required Reading: Baraff, Pixar Course Notes Siggraph 2001, Rigid Body Simulation, Section 8 – Colliding Contact This assignment is worth ~8-12% of the module Minimum requirements:

Rigid Body state (from previous) Unconstrained State update (from previous) Impulse magnitude j calculation Application of impulsive force and torque Detect a point of collision (from previous)

Marking:

brute force solution tailored to minimum requirements: max ~80% General implementation: +~ 20%

slide-3
SLIDE 3

Collision Response

Calculate instantaneous change in rigid body state (linear and angular momenta) Based on impulse J We require:

Point of contact, p Direction (contact normal), n Magnitude of impulse, j

P and n are obtained as part of contact

  • modelling. j is calculated based on a

number of variables ...

slide-4
SLIDE 4

Collision Impulse Magnitude

Constants RB State variables Derived values Contact variables

p is the contact point Associated with a contact direction n

 

 

 

 

b b 1 b a a 1 a b a rel

m 1 m 1 v 1 j r n r I n r n r I n          

  

ˆ ˆ ˆ ˆ ) ( 

Inertial tensor in world space base on I body (constant) and orientation R Displacement vector from com to point of collision Relative velocity of contact points – based on instantaneous velocity of point due to angular and linear velocity

  • f object
slide-5
SLIDE 5

Implementation

For ease of coding, Baraff et al break down the impulse equation as follows:

4 t 3 t 2 t 1 t N j    

rel

v 1 N ) (    

a

m 1 1 t 

   

b b 1 b

4 t r n r I n    

) ˆ ( ˆ

   

a a 1 a

3 t r n r I n    

) ˆ ( ˆ

b

m 1 2 t 

where

slide-6
SLIDE 6

Notes

For efficiency (and stability), we normally store..

instead of m and instead of Ibody

For immovable objects (e.g. ground plane) use

Mass: infinite mass Inertial Tensor: infinite moment of inertia

t2 and t4 are 0 in this case

m 1

1 body 

I

I 

1 body

m 1 

zero matrix (all entries 0)

slide-7
SLIDE 7

Inertial Tensors During Simulation

Inertial tensor is invariant to translation but changes with a body’s orientation Thankfully we can calculate IWORLD based on IBODY and R IBODY is a constant associated with the object. But how do we calculate this for general objects?

slide-8
SLIDE 8

Inertial Tensor Examples

h d w h r Above values are for an axis about the center of the object. m the is total mass.

slide-9
SLIDE 9

Approximating IBODY: Bounding Volume

Approximate object with a simpler bounding volume. Use tensor of the volume as IBODY of object. Enough for this assignment

slide-10
SLIDE 10

Approximating IBODY: Other Approximations

Approximate object as collection

  • f volumes (this may be

required for other purposes anyway) treat collection as collections of point masses of varying mass. (some overlap error) Alternatively we could work from a voxel representation of the object (Voxelization is slightly more common) . Treat each pixel as sampled point mass. Might take advantage of variable density.

slide-11
SLIDE 11

Approximating IBODY: By Integration

See: Brian Mirtich, “Fast and Accurate Computation of Polyhedral Mass Properties”, Journal of Graphics Tools. Vol. 1 (2) , 1996. Source Code Available at: http://jgt.akpeters.com/papers/Mirtich96/ Also see: http://www.geometrictools.com/

slide-12
SLIDE 12

Cumulative Submission for all Labs

Due 08/03/2010: This will account for ~30% of the labs so far (i.e. 15% of the full module) Implement a particle and rigid body dynamics engine capable of simulating a nonconcave object colliding with an infinite plane Submit a report detailing your implementation of the following:

Particle simulation Rigid Body Unconstrained Motion Collision detection: broad and narrow phase Collision Response Any possible improvements (MAX 300 words) Optional: Add a Link to a you tube video

The report should mention any specific design choices you made, any implementation beyond the required minimum spec. Include names of any approaches you used with references where appropriate and optimisations. How your implementation differs from the notes or from Baraff et al. You will not be judged on the quality of the submission (style, grammar) but it is important that it clearly written and relatively concise (approx 0.5 – 1 page on each of the above points). You may submit a separate executable for each section or a demo featuring all the above points as

  • nce.

Submission: submit on a CD to Computer science Reception, by 5pm 8th March, code, executables and necessary files + a PDF of your report with the title <Yourname- Yourstudentnumber-cs7057.pdf>

slide-13
SLIDE 13

Marking

Requirements met for all sub-assignments and sufficiently documented: ~80% Additional kudos for efficiency, completeness of code, complexity of demos, generality of implementation, soundness of implementation, consistency (“well-integratedness”) of different sections: ~20%