FAQ/3D to Masks

From VFXPedia

< FAQ
Jump to: navigation, search

To use 3D-tracking data for rotoscoping,

  1. Create a Polygon mask
  2. Import the camera animation to a Camera3D node and the object's coordinates to a Locator3D.
  3. Feed the Camera3D output to to the Locator3D 3D Data input.
  4. Set appropriate values in Locator3D.CameraSettings
  5. RMB on your mask's Center, select Expression, enter Locator3D.Position
  6. RMB on Size, select Expression, enter 1/math.tan(Camera3D.AoV/180*math.pi/2)*2/math.sqrt((Camera3D.Transform3DOp.Translate.X-Locator3D.Transform3DOp.Translate.X)^2+(Camera3D.Transform3DOp.Translate.Y-Locator3D.Transform3DOp.Translate.Y)^2+(Camera3D.Transform3DOp.Translate.Z-Locator3D.Transform3DOp.Translate.Z)^2)
  7. RMB on Z Rotation, select Expression, enter -Camera3D.Transform3DOp.Rotate.Z
  8. After all this start drawing the shape.

Beware that in your particular case the name of the Camera3D and Locator3D may be different. You need to consider this in the expressions.

An example comp: 3D_Data_to_Mask_v02.comp


Gregory Chalenko
www.compositing.tv