About Me

I've been working freelance at various animation and vfx studios in NYC for the last few years and have recently gone bi-coastal working temporarily in LA.  I also teach animation at the School of Visual Arts.

Search
Required Reading
Social

 


 

 

« Grabbing and Releasing Objects the Easy Way | Main | Movable Pivot Control in Maya »
Monday
04Aug2008

Dynamic Camera via Maya Hair

Hand keying steady cam effects can be a drag, and we used to have to set up complex soft-body rigs to simulate it. Here is a way to set up a dynamic camera utilizing Maya's dynamic curves that's fast, easy, and fun. These steps assume that you have a basic knowledge of Autodesk Maya 8 and up and know basic terms (like dynamic simulation) and tasks (like renaming nodes and parenting) so we can keep this article small.

1: In the first step we will create the camera for simulation. It's going to be a three node camera as we want to have the twist of the camera be dynamic as well (Create > Cameras > Camera, Aim, Up.)

This creates the camera1_group. Parented to that is camera1 (which will be our dynamic camera), camera1_aim (the point at which the camera looks), and camera1_up (the point which keeps the camera's vertical alignment).

2: The next step is to create 2 simple curves, one horizontal and one vertical. So using the ep curve tool (create > EP Curve Tool) we will snap the start cv (hold down the x key for grid snap) one unit on the z axis and then the end cv at negative one unit on the z axis. As long as our tool is set to create cubic, our curve will actually end up with four cvs which will be enough for what we are looking for.

We will create another curve the same way except this time, in the side view, we will snap the start point at the origin (0,0,0) and the second point at two units on the y axis. We should now have two curves shaped like an upside down T.

I like to rename nodes as I go to avoid conflicts and confusion later on, so we will name the first curve horizontal_crv and the second vertical_crv.

3. Time to add the dynamics. Select the two curves and make a hair system out of them ( under dynamics menu set > hair > make selected curves dynamic).

Now we created all kinds of stuff. We have the hairSystem (hairSystem1), the follicle group with two follicles parented to it and then the curves we created parented to each of those (hairSystem1follicles,follicle1,follicle2), then we have the output curve group with two new curves parented under that (hairSystem1OutputCurves). the hairSystem node is where all the dynamic attributes are, this is where we will control what kind of shake we get. Right away we are going to find the gravity attribute and change it to 0 as we only want to simulate shake. Adding gravity will just get in the way of our composition in the camera view.

The follicle nodes house dynamic overrides which we will not need as well as the original curves we created which act as the control, goal, or rest curves for the new dynamic or "output" curves. Basically the output curves will try to match the follicle curves as the simulation is run. On the follicle nodes we will make sure that point lock is set to "BothEnds." This will keep the output curves locked at the start and end so the simulation keeps to a shake rather then whipping around uncontrollably.

We will do some renaming to keep things clean. We will replace everything with "hairSystem1" in it to "cameraSystem". We will also change the follicle names to match the curves parented to them. For example the follicle that has horizontal_crv parented to it will become horizontal_fol. Similarly, we will change the names of the output curves to match the original curves names. The example being that the output curve associated with horizontal_crv will become horizontalOutput_crv.

4. Now we create two locators and rename the right away to horizontal_loc and vertical_loc.

These locators need to be attached to their assosiated output curve. To do this we will use our output curves as motion paths. Select horizontal_loc then shift select horzontalOutput_crv and under the animation menu set choose (animate > motion paths > attach to motion path.) Select vertical_loc and verticalOutput_crv and do the same.

Select both locators and in the channel box find either motionPath1 or motionPath2 and click it to open its channels. Select U Value and right click, then choose delete selected. This will stop the animation of the locators animating down the curve over time. Now change U Value to .5. This will lock the locators to the center of their respective curves where the maximum change will happen during simulation.

5. The final step is to parent the camera1_group to the horizontal_loc then parent the camera1_up to the vertical_loc and thats it.

If you animate cameraSystemFollicles and play it back (make sure your settings are set to "play every frame") the camera will dynamically react to the type of motion is recieves. You can also do an interactive playback (dynamics menuset > solvers > interactive playback) and drag around cameraSystemFollicles to see the effects in real-time. For easy animation make a curve control object and parent cameraSystemFollicles to it. Now you can play with the cameraSystem attributes to fine tune your dynamic camera shake. Try turning up the turbulence settings to get that steady cam effect.

Reader Comments (4)

Locators on Motion Paths... of course!
That's pretty genius, I'm gonna try it out right now.
Thanks, Jordan.

December 21, 2008 | Unregistered CommenterHenning

Very good explanation, thanks...

April 10, 2009 | Unregistered CommenterDownloadic

I thought of this the other day, and i hoped on line to see if anyone did what i wanted, this was as close as i found but at least it proved i was not crazy. I am making some upgrades for more dynamic control.

Blend the Up and AIM controls between the master and the world, to allow the Aim and Up controls to lock to the Root control to kill the Up and AIM abilities to turn it into a regular Camera. One Attribute for each so i can blend the Up and AIM individually.

Also i am adding Dynamic to the AIM and Up Controls for more dynamic capability. So There will be three hair curves (Camera, Up, Aim) I am making bends on all 3 to turn the dynamics on or off to control the dynamics.

All dynamics will move a group with a control under the group that the camera is Point Constrained and Aim Constrained to. This way if the dynamic don't go as far as you want in one spot or too far, but the rest is good you can Tweek the animation after the dynamics simulation.

I will try to make a tutorial to show how i am doing it all. the first few attempts made cycle so i am making a new way of building this system to handel the extra data flows with out blowing up. I will try to post a something in a bit.

If anyone wants to know more or if you have questions feel free to email me.

May 9, 2009 | Unregistered CommenterPaul McGregor

forgot to add my email address. if you get to confused by my explanation i will upload a Tutorial in a week or two. This came is shaping up to be pretty cool. The animation team found a dynamic camera and had a fit over it and challenged me to make a super dynamic system with a full camera rig and heads up helpers. But i have found that when using dynamics like this to help speed up the animators there should be a non dynamic camera on this as well so the animators can get real feed back of where there camera is looking with out needing to calculate the dynamics, This will also give you a reference between Dynamics and Non Dynamics.

paulmcgregor1@mac.com

May 9, 2009 | Unregistered CommenterPaul McGregor

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>
click tracking