CGTalk > Software Specific Forums > Autodesk Maya
Login register
Thread Closed share thread « Previous Thread | Next Thread »  
 
Thread Tools Search this Thread Display Modes
Old 01-31-2013, 07:03 PM   #1
brickton
New Member
portfolio
brickton
British Indian Ocean Territory
 
Join Date: Jan 2013
Posts: 2
Adjusting Keyframed Animation

I need to alter the initial transform/rotation of an animated object. Consider a bouncing ball - how does one move that object to a different starting location, keeping the animation intact, without editing every single keyframe individually?

The actual purpose is to fix a very long character animation. One bone is out of alignment throughout the animation, and must be rotated +20 degrees. I would rather not cycle through every keyframe adding +20 Z.

Thanks for your time.
 
Old 01-31-2013, 09:54 PM   #2
Horganovski
Freelance Animator/Rigger
 
Horganovski's Avatar
portfolio
Brian Horgan
Graphite9
Dublin, Ireland
 
Join Date: Apr 2007
Posts: 4,826
There are a number of ways to fix this, probably the simplest is to select the rotation curve in the graph editor, select all the keys on it and in the value field (the second one beside 'Stats') type:
+=20
and hit enter.
That will add 20 to all selected keys.


Other options are to add an animation layer and just add one key of 20 degrees to it. Option one is cleaner though IMO.

Cheers,
Brian
 
Old 01-31-2013, 10:09 PM   #3
newguy4life
Generalist
portfolio
Quin Barclay
3d Generalist
Chicago, USA
 
Join Date: Mar 2011
Posts: 198
Group it, move the group, ungroup it.
__________________
Demo Reel 2012-13!
 
Old 01-31-2013, 11:00 PM   #4
Horganovski
Freelance Animator/Rigger
 
Horganovski's Avatar
portfolio
Brian Horgan
Graphite9
Dublin, Ireland
 
Join Date: Apr 2007
Posts: 4,826
When you ungroup it and the animation updates the objects will jump back to their original position/orientation I guess you could leave it grouped but that's a little untidy IMO compared to just adjusting the animation.

Cheers,
Brian
 
Old 01-31-2013, 11:14 PM   #5
Nyro
Lurking
 
Nyro's Avatar
portfolio
A. D.
Vertex Slinger
Munich, Germany
 
Join Date: Dec 2006
Posts: 1,436
I recently wrote a little script to make this process more dynamic.

Code:
// update keys to reflect position change on current frame // Usage: // - Run this script. The current tool will be set to 'move' // - Move your object around (if there are multiple objects selected, only first on selectionList will be affected) // - Switch to any other tool when you are done // Note: the script will only update keys once you are done using the move tool, which is registered by // switching to any other tool. global proc psStoreCurrentPosition() { global float $psCurrentPosition[]; string $selection[] = `ls -sl -o`; $moveCurrentPosition = `xform -q -ws -t $selection[0]`; } global proc psUpdateKeyValues() { global float $moveCurrentPosition[]; string $selection[] = `ls -sl -o`; string $object = $selection[0]; float $moveNewPosition[] = `xform -q -ws -t $object`; float $deltaX = $moveNewPosition[0] - $moveCurrentPosition[0]; float $deltaY = $moveNewPosition[1] - $moveCurrentPosition[1]; float $deltaZ = $moveNewPosition[2] - $moveCurrentPosition[2]; int $updateStartTime = `currentTime -q` + 1; keyframe -time ($updateStartTime + ":") -at "translateX" -r -vc $deltaX $object; keyframe -time ($updateStartTime + ":") -at "translateY" -r -vc $deltaY $object; keyframe -time ($updateStartTime + ":") -at "translateZ" -r -vc $deltaZ $object; } string $ctx = `manipMoveContext -prc "psStoreCurrentPosition" -psc "psUpdateKeyValues"`; setToolTo $ctx;

The user it was written for actually needed this to adjust the position, not the rotation. To use the script above with rotation, you'll have to change the following lines the code:
Replace "-t" flags with "-r" and replace "-translateX" "-translateY" and "-translateZ" with "rotateX" (-Y, -Z)
 
Old 01-31-2013, 11:17 PM   #6
newguy4life
Generalist
portfolio
Quin Barclay
3d Generalist
Chicago, USA
 
Join Date: Mar 2011
Posts: 198
Good point, forgot that it goes back when you ungroup. Maybe less tidy, but you won't have to adjust every transform individually. It's not a big deal for a simple object, but if it's a character or something like that, it's definitely useful to have it in a group or parented to something that will allow you to move everything as a whole.
__________________
Demo Reel 2012-13!
 
Old 02-01-2013, 10:45 AM   #7
thematt
brain filler
 
thematt's Avatar
matt
EMCA
France
 
Join Date: Mar 2003
Posts: 1,508
I don't understand..so you only need to add 20 to one bone (controler) on one axis? that's what animation curves are for isn't it..grab your whole animation on the graph editor not the keys but the curve itself and move it up 20 unit..done. takes 10seconds.

but maybe I didn't understand what you're after.

cheers
 
Old 02-01-2013, 10:45 AM   #8
CGTalk Moderation
Lord of the posts
CGTalk Forum Leader
 
Join Date: Sep 2003
Posts: 1,066,481
Thread automatically closed

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.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 09:19 AM.


Powered by vBulletin
Copyright ©2000 - 2016, Jelsoft Enterprises Ltd.