GMask Tracer translation to a different FOV and CAM position

Hello hive! I have a tech question: I have a clip with res 2880x1518 and GMask Tracer node with the roto done. Now, I’ve got a 3D Camera tracked from Syntheyes. I need to create 3D Shapes from those rotos, and obviously they don’t match the position with the new 3D Camera. I know there was a trick like DefaultCam.position.z: 540/tan(radians(.5*DefaultCam.fov)) to match cameras depending on the size of raster, but in this case I’m lost :slight_smile: Any ideas?

The trick you speak of is to parent the image (or perhaps in this case, just the tree of Axis>3DShape>Axis>Gmask) to the camera, and in the top axis .position.z add the expression 759/tan(radians(-.5*NameOfCamera.fov)). Note that I am assuming your raster is 2880x1518. The number 759 is derived from the height of the raster divided by 2. If your raster is different, then substitute accordingly. Also note that I have used the name “NameOfCamera.” Enter the correct name of you camera there. Not sure if this is what you are looking for, but good luck.

I presented this in a tips and tricks video for a logik live event during the pandemic. You can find the video here. The part you may be interested in is a 2:45. https://www.youtube.com/watch?v=zeOwYiVgD84

3 Likes

Hi Tim,

Thank you for the tip. I’ve tried the trick and it does indeed translate gmask to match live action, but in terms of position in 3D space it’s off. Let me try to explain more :slight_smile: A person is holding a book, we see it’s cover. The cover is track in Syntheyes and brought in to Flame with a plane for the book cover. I have roto done for thumbs over the cover and some going over cover fingers. What I need a 3D shapes of thumbs and fingers made from my Gmask tracer node. Does it make sense?

Imported 3D camera doesn’t have 0 x,y,z translation and rotation.

Are you trying to do like a z buffer occlusion thing between the plane of the book and the roto? Is that why you need it in 3d space? I don’t know if this is possible going from your 2d masks in the tracer and applying depth to them as 3d shapes without just redrawing them in their correct depth, but I could be wrong here!! Sounds like you’re describing what the deep holdout stuff in Nuke does perhaps…

Yep, some sort of :slight_smile: I’m trying to cast shadows from 3D-Shapes.