Skip to main content
GameDev.net gamedev.net
🔒 Locked

computing an OBB how?

Started by ogracian Apr 6, 2003 at 7:49 PM 0 replies 2.8k views
Original Post
ogracian
ogracian
Hello Could someone explain me how can I compute a thight OBB for a model (ex: character keyframe), or maybe point me to some docs of code where I can learn this? Thanks in advance, Oscar
oliii
oliii
tight fitting OBBs is more complicated than it first looks. For the best results,

1) compute a convex hull of your vertices (look at qhull on the net), or take the vertices, or take the centre of your triangles (that or srtaight vertices should be enough for a character animation).
2) compute the mean (the 'centre') of the hull/vertices/centre of triangles.easy.
3) compute the covariance matrix (in the paper) of the hull/vertices/centre of triangles. not too difficult.
4) find the eigen vectors of the covariance matrix (which is symmetric). Hard work.
5) normalise the vectors (easy).

ftp://ftp.cs.unc.edu/pub/users/manocha/PAPERS/COLLISION/obb.ps.gz

and one of the best sites for collision detection (also related to other stuff),

http://www.magic-software.com/Documentation.html

look at documentation, eigen systems for 3x3 matrices, eigen solver for symmetric matrices, that with the obb.ps above. The eigen source code should also be available at magic-software.com



[edited by - oliii on April 7, 2003 8:24:33 AM]
Everything is better with Metal.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.