do you think you’d be better off using the 3d camera data on a 3d camera and position your layers in 3d space? you should get more realistic movement in you scene.
Yeah, that was my first notion as well, but I’ve never been a fan of After Effects’ 3d stuff and I ran into a problem. I was compositing in a flat image as a matte painting background (some stormy clouds, a castle on a hill) but when the camera rotated (panned) in 3d, the flat background was heavily skewed due to the perspective offset. So it was evident that it was just a flat plane in 3d space. My other solution would be to create a makeshift cylinder, composed of 4 different flat planes…but I figured there may be a more optimal solution using a script to turn the 3d rotation into 2D movement.
As it turns out I did some more Googling, and there’s a set of scripts called MoCon for AE that help when importing/exporting cameras to and from AE.
http://www.3dmation.com
One of those scripts was called 3D to 2D which does excatly what I needed.
I’ll still play around with your script though becuase I always prefer having some understanding of what I’m doing rather that just clicking a button.