Page 1 of 1

I need a 3D orientation (from 2 positions). Motion capture

Posted: January 9th, 2007, 5:20 pm
by kruty
Hi everybody,
I'am a regular visitor of aenhancers.com.

I would need an expression that apply a 3D orientation to a layer.

I'm working on a "3D Motion Capture at Home" project.
I shot myselfs with 2 cameras, then, with After Effects, I track several part of my body : hand, shoulder, neck, feet,...

I get 3D positions value, from each of the 18 points of my body.

Here is the deal.

I NEED to "know" the value of the rotation of my arm. My arm is liked to my bend's position,... and should rotate in direction of the wrist...
I suppose it's just a trigonmetric stuff,... i can do it in 2D, ...

I'have found at "jjgifford.com" some expression that helped me with trigonometrics stuffs,..
I'have found at "aenhancers.com" a topic like "orient a 3D layer with 3 points",..

These topics are great, and i think that i just need a mix of their expressions,... but i can't find a solution so far.


If my request is not clear enough,.. you can see an example of what i'm trying to do : a 3D mocap at Home. http://starbacon.free.fr/krutyblog/inde ... er-effects There is a video that shows what i did, and.. you will see what kind of problems i had.


kruty :roll:

Posted: January 17th, 2007, 7:51 am
by byronnash
I'm going to move this over to the Expressions Forum, you may have better luck getting an answer there.

Posted: January 18th, 2007, 5:08 am
by kruty
Hoo thanks Byronnash! :wink:

I proceeded like this:

Image

there is 2 caméra, a light, and a performer with marker on him.

Image

here is a part of my expression (for position):

tempx = (thisComp.layer("ROBOTG").motionTracker("A")("Point de piste1").featureCenter[0]+thisComp.layer("ROBOTD").motionTracke("A'" ("Point de piste 1").featureCenter[0])/2;

tempy = (thisComp.layer("ROBOTG").motionTracker("A")("Point de piste 1").featureCenter[1]+thisComp.layer("ROBOTD").motionTracker("A'" ("Point de piste 1").featureCenter[1])/2;

tempz = (thisComp.layer("ROBOTD").motionTracker("A'")("Point de piste 1").featureCenter[0]-thisComp.layer("ROBOTG").motionTracker("A")("Point de piste 1").featureCenter[0])*7;



Repeat the same opération for each marker B, C, D,....
then i use a "look_at":

look_at(thisComp.layer("A").position,thisComp.layer("B").position)

Problem is that "look_at" use orientation's expression. I would like to create someting with XY en Z rotation. And controls them separatly.

i've found some help here, great expression page with simple trigonometric's stuffs:

http://jjgifford.com/expressions/geomet ... tions.html
and http://jjgifford.com/expressions/geomet ... raphs.html

but i can use these only in 2D,.. when i add X+Y rotation it gives me a weird angle... in my preview...

So I keep trying, but is there an other way to proceed?

:P

http://starbacon.free.fr/krutyblog/inde ... er-effects[/b]

Posted: January 29th, 2007, 6:22 am
by kruty
:oops:

Posted: January 30th, 2007, 1:16 pm
by lloydalvarez
have you looked at Dan Ebberts' stuff on motionscript.com on layer space transformations? Maybe there's something there that might help you out:

http://www.motionscript.com/mastering-e ... flare.html