imported .abc camera: how to access position/orientation with a wrangle? SOLVED

   3677   2   0
User Avatar
Member
1075 posts
Joined: April 2017
Offline
Hi!

I've imported a camera with the Alembic Archive node. When I press play, I can see the camera animated.

When I dive down, I can see a Camera node with it's world transforms animated (t, r, s). If I dive once more, and press play, there's no animation and the camera is at the origin and my perspective is sideways…

How can I access the position(@P) and orientation(@N) so I can so I can pass it through a wrangle? I'm trying to create a point/N per frame.

-Olivier
Edited by olivierth - March 26, 2019 17:18:39

Attachments:
camera_animation_infos.jpg (127.5 KB)

User Avatar
Member
8045 posts
Joined: Sept. 2011
Offline
In a separate object's pointwrangle:

string camera = "/obj/alembicarchive1/Camera2/CameraShape2"; // path to your camera
@P = ptransform(camera, "space:current", {0,0,0});
@N = ntransform(camera, "space:current", {0,0,-1});

(You can also object merge the point from inside the camera object into your source object. If you need the z axis, add N to the point inside the camera with a value of {0,0,-1})
User Avatar
Member
1075 posts
Joined: April 2017
Offline
Wow, amazing!

Thanks a lot.

-Olivier
  • Quick Links