## Maya Training

Introduction to Hard Surface Modeling

## Maya Training

Interiors and Furniture Vol 1 & 2 - Modeling & Cloth

## Maya Training

Shading, Lighting and Rendering the Bedroom in MR

## Maya Training

Robot volume one - Modeling with animation in mind

## Maya Training

Spach-Alspaugh House the complete courseware

## Maya Training

Burt The Cartoon Dinosaur Vol 01 - Modeling

## New Maya Training

Batman by Jason Edwards
You are here > Home > SimplyMaya Community Forums

# Welcome to Simply Maya

 Simply Maya User Community - Maya Tutorials expression problem
 Register FAQ Members List Calendar Mark Forums Read

 04-07-2003, 07:34 PM #1 Darkware Subscriber     Join Date: Oct 2002 Location: USA Posts: 1,172 Thanks: 0 Thanked 4 Times in 4 Posts expression problem As some of you may very well know, I stink at expressions and the like. Here's what I want done: Locator will move only on the x and y axis. For 20 frames tx and ty are 0. Ten frames later, ty increases to 2. Ten frames later, tx increases to 8 and ty decreases to 0. Here's the tricky part. I need all this to repeat -> repeat from the frame at which it ended if you can understand that. If you do what I said above, you will end up at frame 40. So, from frame 41 to 61 (20 frames) tx is 8 and ty is 0. Ten frames later, ty increases to 2. Ten frames later, tx increases to 16 and ty decreases to 0 once again. If it's possible, I could simply key the y axis since it has the same animation every 40 frames and make it repeat itself. ANy suggestions? __________________ www.Darkware3D.com
 04-07-2003, 08:00 PM #2 mark_wilkins Registered User     Join Date: Jan 2003 Posts: 161 Thanks: 0 Thanked 1 Time in 1 Post umm ok I didn't need an expression to do this. Instead, I just * keyframed the tx and ty curves for the first 40 frames. * Opened the graph editor * Picked the ty curve and selected all of its keys by dragging * chose Curves > Post Infinity > Cycle * Picked the tx curve and selected its keys * chose Curves > Post Infinity > Cycle with Offset No expressions at all, and as far as I can tell it does exactly what you want. -- Mark __________________ Mark R. Wilkins author of MEL Scripting for Maya Animators www.melscripting.com
 04-07-2003, 08:01 PM #3 kbrown Moderator     Join Date: Sep 2002 Location: London, UK Posts: 3,198 Thanks: 0 Thanked 8 Times in 8 Posts You could key it all and set the post infinity to cycle. Less hassle __________________ Kari - My Website - My IMDB Do a lot, Fail a lot and Learn a lot!
 04-07-2003, 08:02 PM #4 kbrown Moderator     Join Date: Sep 2002 Location: London, UK Posts: 3,198 Thanks: 0 Thanked 8 Times in 8 Posts lol, you beat me by one min Mark __________________ Kari - My Website - My IMDB Do a lot, Fail a lot and Learn a lot!
04-07-2003, 09:40 PM   #5
Darkware
Subscriber

Join Date: Oct 2002
Location: USA
Posts: 1,172
Thanks: 0
Thanked 4 Times in 4 Posts

Ahh! Offset! *slaps forehead* I was thinking about keying, then setting the post infinity to one of the selections, but I figured it would just keep making tx go from 0 to 8 repeatedly. With offset however, it does just what I want it to. I forgot all about it. lol!

Ok, so here's what it looks like in action. I have a four-legged spider with IK handles. Each IK handle is parented to a locator. The root joint is run by a simple expression (tx = frame * .2; I think) and the locators have four keys each with post infinity set to cycle offset. Very basic walk cycle.

The mb file is attached. (74.6 kb)

Thankyou kbrown and Mark! I don't know what I'd do without you two.

EDIT* Ok, I just noticed a problem. 900 frames into the walk the legs seem to get ahead of the body. This had to do with the tx value of certain keys being miscalculated by me. The problem is now fixed and I have uploaded a new file.

There is one other problem I'm not entirely sure how to fix though. The left hind leg extends too far during the walk. It's perfectly straight when this happens. You can rekey the locator and bring it forward a bit, but doing this messes up the leg in the long run. Any suggestions on that?

Also, since this has turned into more of an animation thread, a moderator can feel free to move this to the animation board if they like.
Attached Files
 spiderwalk.mb (74.6 KB, 14 views)
__________________
www.Darkware3D.com

Last edited by Darkware : 04-07-2003 at 10:01 PM.

 04-07-2003, 09:57 PM #6 kbrown Moderator     Join Date: Sep 2002 Location: London, UK Posts: 3,198 Thanks: 0 Thanked 8 Times in 8 Posts Cool scene mr Dark! __________________ Kari - My Website - My IMDB Do a lot, Fail a lot and Learn a lot!
 04-07-2003, 10:23 PM #7 kbrown Moderator     Join Date: Sep 2002 Location: London, UK Posts: 3,198 Thanks: 0 Thanked 8 Times in 8 Posts Moved... I didn't check the scene this time but have you tried limiting the joint rotations? __________________ Kari - My Website - My IMDB Do a lot, Fail a lot and Learn a lot!

 Similar Threads Thread Thread Starter Forum Replies Last Post Problem solving many dynamic objects in a pile? rohiniduggal Dynamics & Special Effects 3 14-01-2011 06:26 PM apache environment problem andrew_sorensen Simply Maya Tutorials 4 08-12-2010 02:48 PM Strange Problem - Unable to change attributes for multiple objects anthonysw3 Technical Issues 4 04-12-2010 10:56 PM

A little bit about who we are