PDA

View Full Version : Position and rotation based on reference objects


gozzer
09-11-2007, 07:42 AM
Hi guys,

As always, I'm in need of some assistance :)

I'm trying to 'draw a plane' between 4 reference objects (optical data from a motion capture sequence). On this 'plane' I want to place a dummy object that keeps itself in center between the makers and also reads out the rotation based on the object movements.

Much like the reference object work for an Actor Face in Motionbuilder, if anyone is familiar with that.

I've sort of figured out how to keep the object centered with a few expressions, it's the rotation bit that has me struggling. So far I've thought to find the center between top-left and top-right, then top-left and bottom-left, etc. With these 4 new axis centerpoints, then constrain the object in the middle of these points.

Poor explaination, I know, but if there is anything more I could provide to help you with insight in this matter, please don't hesitate to ask.

Thanks,
Daniel

gozzer
09-13-2007, 02:45 PM
Just answering my own post here, in case someone comes across a similiar problem.

My solution is hardly perfect, but it seems to do the trick - and passed all the tests I put it through. As mentioned, this is just going to be used as a reference node for a motion capture markerset, so extremes are hardly at hand... but still :)

Anyways, I drew a poly plane, and assigned one locator per vertex as an influence for a smooth skin bind. This way, when the locators move, the plane distorts between them.

Then I point constrained a cube to stay in the center of these locators. After which, the cube got normal constrainted to said poly plane.

Now the whole thing was working almost like intended, but the cube was not rotating along its x-axis. I think I tried everything in the book before I somehow must have pressed the wrong button or something. Turned out to be a good mishap though, cause after having a fifth locator (middle top) aim constrainted to the cube (not the other way around, which I franticly tried time after time), the cube suddenly started aiming towards the locator too. Hence rotating along the mysterious x-axis.

I scripted myself half to death, and I think I had as much as 8 dummy locators and 4 cubes at one point. Then I gave up, and then the solution suddenly stumpled over me. Needless to say, I gladly accepted its presence :)

So, long story short; it seems to work now. I've attached a couple of screenshots and the actual .mb file (Maya 8.5) should anyone find it interesting in the future.

--
Daniel

CGTalk Moderation
09-13-2007, 02:45 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.