camera position

How can I get the actual position of the camera ? Specifically, I have it parented to a null, do a rotation on the null and then want to be able to read the world space camera position so I can have objects point at it. I want the actual coordinates so I can control how much the objects point at it . . . for example, an eye in the scene is doing some random rotations, then points directly at the camera.

Thanks,
Jeff

Hey jeff,

an object CHOP targeting the Camera and a Null COMP (@ the origin) should give you world space coordinates

Hi Achim,

Thanks, though I’m kind of dense . . . how do I actually get the coordinates out of the null COMP and into a CHOP ?

Jeff

The object CHOP has a target object and a reference object parameter. Just drag your objects onto those.

Yeah, I get how to do that, but far as I know that just points the object at one other object. What I want to do is be able to transition from pointing at one object to a different object. From what I’ve been able to figure out the way to do that is to get the actual coordinates into a CHOP, then do some math to calculate the angle.

Does that make sense ?

Thanks again,
Jeff

no, this gives you world space coordinates. I believe you can set the object CHOP to bearing, then it calculates the rotations necessary to look at the other object

If you just wanna blend lookats, take a look at this example. lookatBlend.toe (2.44 KB) You can blend by adjusting /project1/blend1/blendw1
Does this work for your scenario?

Thanks for the sample, I don’t think it will work. Let me clean up what I’m working on and send it to you along with a better explanation.

Thanks for your help,
Jeff

hmmm the Object CHOP gives the XYZof one object relative another. You can export the channels to another object’s XYZ parameters.

Anyway, another way is to use a Blend object - It blends the positions of multiple objects together. You can point your other object at that.

Yeah, the Object Chop does what I want . . . but it seems to have trouble updating quickly.

Take a look at this example, move slider 13 to rotate the camera. The eye tracks OK (though jerky) with small changes, but doesn’t track large, fast changes well, sometimes takes a few seconds to snap into place.

It is workable, I can lag camera motion and filter the output of the object CHOP. But, would be nice to have it work more accurately, any suggestions ?

Thanks,
Jeff
Eye_solo.zip (402 KB)

a bit related to the object CHOP

i’m making a virtual aquarium, so the fish will wander up to people (which are tracked by a vision tracking system)
so i want to be able to find the position of people and get the fish to move over to them and also to look at them
i’m using object chops but because i’m moving one of the objects to follow the other(with lag and noise), i get into nasty infinite loops

any suggestions/done something similar?

Jais

I think this bug was fixed recently. Should be in the latest released build 281.

Hey,

i have a old project here that works with a spring sop. To see the effect just slightly transform the box sop in any direction. The spring sop has a couple fixed points which could work as the fish that move first to the people. The rest of the points of the box just follows. If you play around a bit with the parameters of the spring you might get a good result without any feedback loops :slight_smile:
Also changing the fixed points dynamically depending on which one is closest to the next person would make it look nicely dynamic.

cheers
markus
spring.tox (814 Bytes)

Yep, the Object Chop now works smoothly in 281, thanks !

Jeff