PDA

View Full Version : Maya Cam to After Effects - zoom factor bug?


AndersEgleus
02-01-2005, 08:02 AM
Hi. I've been experimenting with exporting camera animation from Maya to After Effects. Basically, you just save the maya scene as .ma, and import it as a composition in AE. Cameras are imported, as well as any transforms above them in the hierarchy get imported to AE, which is great.

Now, while the translations and rotations of cameras and nulls get imported correctly, the zoom factor is wrong.

My current workaround is to create a bunch of "tracking points" in Maya, each consisting of a transform and a camera parented to it, which I then place at corners of objects and other easily identifiable features so I can compare the nulls with the render in AE. I then zoom in or out until the nulls conform to their corresponding features in the render. If the zoom is static, this is fine.

If the zoom is animated I go to a good frame (where a lot of features and their nulls are visible over a large space), make a note of the current focal length in AE's camera settings, then I zoom in/out until it's correct, and make a note of this new focal length. I then divide the new focal length with the old one and get a focal length proportion factor. In Maya, I then create a multiply/divide node and insert it between the camera's focal length and its animation curve (connect the animcurve's output to input1X) and set its input2X property to the focal length proportion factor I calculated before. I then bake the animation and export again and I get it right when I import in AE.

Well, as you can see, the workaround is quite cumbersome, it would be nice to get a correct zoom factor without going through all these steps.

Has anyone else come across this problem and possibly found a solution for it? There are so many factors involved with the zoom factor (aperture, output resolution etc.), I really wish AE translated the angle of view instead of the focal length, since that's usually what you want to conform between the cameras.
|edit| It just occurred to me that Angle of View is actually not an attribute of the camera, it just shows up in the attribute editor, but still, there must be some way to translate it correctly |/edit|

Hope I made sense here.

Shayder
02-01-2005, 02:30 PM
OK I have not done this at all before but I use the 3d layers in AE a lot. Maybe that is a start to look at, or when you import the .ma file does it automatically create the layers in 3d mode?

I am interested in learning the importing the maya files into AE as I have been doing it the hard way. If I have something like a screen playing a movie in my animation I use a .tiff sequence in maya and assign it as a texture to the actual screen geometry. This makes it a pain to change the screen movie if required. Are there tutorials for doing what you are doing?

AndersEgleus
02-01-2005, 04:13 PM
Well I don't think you need a tutorial to get it into AE. Just save your Maya scene as .ma and import it into AE. (I have AE6, not sure if it can be done in earlier versions). All cameras are imported (you need to bake simulations on any animated attributes - AE keyframes work differently than maya ones), as well as any transform nodes above them in the hierarchy - conversion to 3d layers and parenting is automatic, you can just open the composition created upon import and start adding your render sequences to it. This also means that you can import nulls (animated or not) into the AE comp, as long as you parent a camera to each one. Try it, it's really simple.

So, like I said, the only snag is the zoom factor which gets imported wrong.

Shayder
02-02-2005, 05:42 PM
mmm, not sure I get what you mean about parenting a camera to each null(locator)?

I need to do a scene fairly quickly, I have a 3d computer moniotor and I would like to place some sort of screen shot on it but I would rather not create a texture sequence in case the client wants something diffferent. I was planning on using the tracking feature in AE but is the importing Maya camera more efficient/better?



How would I set it up in Maya to get it ready for AE? The camera in may pulls(dollies) out a bit.

Would I put a locator on each ot the corners of the screen?

Thanks for any help.

AndersEgleus
02-03-2005, 11:43 AM
Simple.

Unless it's absolutely necessary, don't animate the focal length of the camera (you can dolly in and out and tilt and pan and move around though). Select your Main camera, and select your animated attributes in the channel box (like translate and rotate). Bake Simulation (look in the manual if you haven't done it before) on the selected channels.

Make a camera (don't need to tweak it, it will be deleted in AE). Group the camera (ctrl-g). It is now parented to an empty transform (that's what I meant).

Select the group in the outliner and point-snap-move (hold v pressed while moving) it to a corner of the an object (e.g. the monitor).

Duplicate the group (make sure the camera is duplicated as well) and point point-snap-move it to another corner of the object. Repeat until you have these group/camera pairs in all the places that you want.

Make sure your output resolution is correct in the render globals window (e.g. PAL 768).

Batch render (don't playblast) the animation.

Save the scene as .ma and import it into AE. Impot the render sequence into AE too.

Open the imported comp and drag the render into it. Don't make it a 3d layer.

Delete all cameras in the comp except the main camera(s) and scrub. Your null objects should be pinned to the corners where you placed them. If they're not, you have the same problem as I, and you need to zoom in or out until it's correct. If you did animate the focal length, you'll have to use my clumbsy workaround.

That should get you there, good luck.

Shayder
02-03-2005, 01:53 PM
Anders,

Thank you very much with your explanation I will try this. I really appreciate all the effort you put into helping me!!

I will let you know how it turns out.

Jack

AndersEgleus
02-04-2005, 07:46 AM
No problem. I would actually appreciate very much if you tried it and told me how it went, so we can see if you get the same zoom factor bug as I.

Shayder
02-04-2005, 06:15 PM
Anders,

I tried what you said but it didn't work that well. Then I tried just making locators and snapping them to the vertex's. I named them Null_1 etc, I read somewhere that this is how they need be named in order to import properly.

I put in a zoom as well, in Maya, just to test it.

I then imported my scene into maya. One thing I had to do was change the anchor points in AE for each of the Nulls. I just moved them to the center of the comp and it worked.

The move and the zoom matched up great!.

I am using Maya 4.5 and After Effects 6.0 on a Mac.

AndersEgleus
02-08-2005, 07:44 AM
Cool, so you don't actually have to create a camera for every null then. Interesting also that you didn't get the same camera error as I. Thanks for the help!

CGTalk Moderation
02-08-2006, 08:00 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.