Independent camera XYZ animation channels

Moho allows users to write new tools and plugins. Discuss scripting ideas and problems here.

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
ponysmasher
Posts: 370
Joined: Wed Aug 04, 2004 6:23 pm
Location: Los Angeles
Contact:

Independent camera XYZ animation channels

Post by ponysmasher »

I find that having the X, Y and Z animation of the camera in only one keyframe is often less than optimal so I whipped up a quick script to be able to do smooth camera moves.

Download here

It's a layer script, so you embed it in a layer and then you control the camera using that layer.
Since the XYZ of layers are also in only one keyframe I remapped the controls like this:

The X position of the layer sets the X position of the camera.
The Shear X of the layer sets the Y position of the camera.
The scale X of the layer sets the Z position of the camera.

I reversed the x position number so that moving the mouse left for example, moves the camera left. Felt more natural.

I also made a script that always sets the camera to the same XYZ of a layer so you could for example use follow path with the camera.

Download here

EDIT: Here's a quick video http://www.youtube.com/watch?v=s6QGigcviX4
Last edited by ponysmasher on Sun Jul 24, 2011 7:42 am, edited 1 time in total.
User avatar
funksmaname
Posts: 3174
Joined: Tue May 29, 2007 3:31 am
Location: New Zealand

Post by funksmaname »

great! I do this in after FX by using XYZ seperation filter on a null and parenting the camera to it... i'm sure this will be very useful :)

Thanks for sharing.
User avatar
GCharb
Posts: 2276
Joined: Sun Oct 09, 2005 6:31 pm
Location: Montreal, Quebec, Canada
Contact:

Post by GCharb »

Yes, thanks!
User avatar
uddhava
Posts: 318
Joined: Tue Nov 04, 2008 10:24 am
Location: American back in Hungary

Post by uddhava »

I tried this and it works! Could be useful for exact camera moves. Thanks.

I also tried the bind camera to layer script, but when I used it everything
disappears. Seems like it could be very useful though.

I hope telling these problems is helpful.

udd
ponysmasher
Posts: 370
Joined: Wed Aug 04, 2004 6:23 pm
Location: Los Angeles
Contact:

Post by ponysmasher »

uddhava wrote: I also tried the bind camera to layer script, but when I used it everything
disappears. Seems like it could be very useful though.

I hope telling these problems is helpful.

udd
The reason why everything seems to disappear is probably because the layer you bind the camera to is at 0 Z depth (the default for layers). So the camera jumps to the same position as your layers and you can only see behind them.
If you move the layer back things should show up again (the default Z position for the camera is 1.7321)
User avatar
uddhava
Posts: 318
Joined: Tue Nov 04, 2008 10:24 am
Location: American back in Hungary

Post by uddhava »

I did as you suggested and it reappears, but if I click on another layer it again disappears and has to be reset. If I click on a different tool everything disappears.

Does this need a new layer for the script only?
Post Reply