Jump to content

  • Log In with Google      Sign In   
  • Create Account

Dirk Gregorius

Member Since 24 Apr 2002
Offline Last Active Jun 09 2016 11:59 AM

Posts I've Made

In Topic: Identifying polygons of one mesh inside another mesh?

05 June 2016 - 04:43 PM

Maybe you can use a BSP tree for this. I remember we used this for some project quite some time ago.


In Topic: FBX Transformation problem

03 June 2016 - 11:18 PM

You cannot just use the local translation, rotation, and scaling. You need to use EvaluateLocalTransform() and then decompose.

In Topic: Quaternion as angular velocity

02 June 2016 - 04:38 PM

You can do this all without trig functions. The quaternion derivative is defined as:

 

dq/dt = 0.5 * w * q 

 

You can approximate this using the differential quotient:

 

(q2 - q1) / h = 0.5 * w * q1

 

Solving for w which gets you from q1 to q2 in h time yields:

 

w = 2 * (q2 - q1) * conj( q1 ) / h

 

Here w is pure quaternion containing the angular velocity omega. E.g. w = ( omega.x, omega.y, omega.z, 0 )

 

This method works great in practice e.g. to initialize ragdoll velocity given two keyframes when switching from animation to physics.


In Topic: Getting bounding box of convex polyhedron without the points?

29 May 2016 - 04:30 PM

What Randy suggests *only* works if the origin is inside the convex polyhedron. I guess you can use the original points to shift the polyhedron before constructing the dual.

 

From the QHull link: 

"Assume the origin is inside the cone and let the first cone's facets define a set of halfspaces"


In Topic: Plane equation, + or - D

16 May 2016 - 03:38 PM

I think about planes as being defined by a normal n and a point on the plane p. Then we can define the plane as (read * as dot-product):

 

P: n * x - n * p = n * ( x - p ) = 0

 

We can now define d = n * p and get:

 

P: n * x - d = 0

 

I thinks this is the more formal definition that you would find it in a textbook. If you use 4D vectors for planes and want to define the distance of a point to a plane using the dot product you would define d = -n * p which yields:

 

P : n * x + d = 0

 

I think the 4D vector definition also works well with transformations where you simply multiply the 4D 'plane' vector with a 4x4 transformation matrix (not sure though). Personally I prefer with the more formal definition and use explicit plane functions to evaluate the distance to planes or transform them. If you want to wrap everything into a generic 4D vector the later might be the better choice.

 

HTH,

-Dirk


PARTNERS