Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Placing camera as if rightclick -> New – > Camera

  • Placing camera as if rightclick -> New – > Camera

    Posted by Jacob Danell on February 3, 2014 at 12:25 pm

    I’m writing a script where it adds a new camera.
    I’m having some problems placing the camera. I want it to be places as if I would rightclick and pick new -> Camera.
    Right now it’s positioned in compHeight/2 and compWidth/2 but the z-depth I can’t figure out how to calculate it.
    In a 1080p project (1920*1080p) the Z = -2666,6667 and in a 4K project (4096*2160) the Z = -5688,8889. Both cameras is using 50mm.
    Does anyone know the math or an easyer way to place the camera correct?
    Thanks!

    Jacob Danell replied 12 years, 3 months ago 1 Member · 1 Reply
  • 1 Reply
  • Jacob Danell

    February 4, 2014 at 10:58 am

    I calculated it some and got this number: 1,3888889
    So the calculation is: Width*1,3888889
    (1920*1,3888889 = 2666,6667 – 4096*1,3888889 = 5688,8889)

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy