treid34 122 Report post Posted March 9, 2007 I have a set of data for animated points in 3d space, some of which move relative to each other. I need to sort them into groups of those that are virtually attached and move together as one object, and figure out the center of rotation of each group, its rotation axis and angle, and translation on each frame. The sorting part was quite easy (if the distance between two points is roughly on each frame, they belong to the same group). However I'm unsure about how to calculate the actual movement of the controlling origin point. An analogy is if I was constructing an animated skeleton from motion capture data (except in this case, having a joint heirarchy isn't too important, as each 'joint' can be independent if required). 0 Share this post Link to post Share on other sites
chand81 187 Report post Posted March 10, 2007 You would need atleast 3 points in a group. The same 3 points need to be tracked in each frame.Next, convert the 3 points to an orthogonal system of 3 unit vectors. Use one of the three points as origin or average the 3 points or use any other combination as long as the same convention is used for all frames.3 orthogonal unit vectors + one origin for the group = 4x4 transformation matrix per group per frame. 0 Share this post Link to post Share on other sites
treid34 122 Report post Posted March 10, 2007 Seems to me that with the above method you would get the joint positions wrong (they are not some arbitrarily chosen point) and interpret a lot of rotation as linear translation. This might be undesirable ( as it is in this case) because you would miss out on being able to slerp the skeleton later on. This is how I'm currently thinking about doing it:-Group the vertices (done)-Subtract each vertex position between two frames to get translation vectors.-For each of the above translation vectors, construct a plane that is perpendicular to the vector (plane normal = translation vector).-For each plane within a group, for each frame transition, find the average line of intersection between all the planes. This should give something approximating the axis of rotation.-Compute the actual angle of rotation around this axis. This shouldn't be too hard.-Do all the above for each group and each frame transition. We now have axes and angles of rotation, but we need to select some point along the axes that will be the actual joint position. I propose that this should be the point along an axis that is closest to a vertex group's average position.-All that now remains is to subtract the joint positions between each frame, and we have the joint translation.Its probably not the most efficient method, but is quite simple to think about (to me at least). I'll keep this thread updated if I have success. 0 Share this post Link to post Share on other sites