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

Robot Volume 02 - Hybrid Rigging
You are here > Home > SimplyMaya Community Forums
Loading

Welcome to Simply Maya

Please Sign in or Sign up for an account

Member Login

Lost your password?

Not a member yet? Sign Up!

Old 04-07-2003, 08:34 PM   #1
Darkware
Subscriber
 
Darkware's Avatar
 
Join Date: Oct 2002
Location: USA
Posts: 1,172
Thanks: 0
Thanked 4 Times in 4 Posts
Default 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
Darkware is offline   Reply With Quote
Old 04-07-2003, 09:00 PM   #2
mark_wilkins
Registered User
 
mark_wilkins's Avatar
 
Join Date: Jan 2003
Posts: 161
Thanks: 0
Thanked 1 Time in 1 Post
Default

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
mark_wilkins is offline   Reply With Quote
Old 04-07-2003, 09:01 PM   #3
kbrown
Moderator
 
kbrown's Avatar
 
Join Date: Sep 2002
Location: London, UK
Posts: 3,198
Thanks: 0
Thanked 8 Times in 8 Posts
Default

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!
kbrown is offline   Reply With Quote
Old 04-07-2003, 09:02 PM   #4
kbrown
Moderator
 
kbrown's Avatar
 
Join Date: Sep 2002
Location: London, UK
Posts: 3,198
Thanks: 0
Thanked 8 Times in 8 Posts
Default

lol, you beat me by one min Mark
__________________
Kari
- My Website
- My IMDB

Do a lot, Fail a lot and Learn a lot!
kbrown is offline   Reply With Quote
Old 04-07-2003, 10:40 PM   #5
Darkware
Subscriber
 
Darkware's Avatar
 
Join Date: Oct 2002
Location: USA
Posts: 1,172
Thanks: 0
Thanked 4 Times in 4 Posts
Default

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
File Type: mb spiderwalk.mb (74.6 KB, 14 views)
__________________
www.Darkware3D.com

Last edited by Darkware : 04-07-2003 at 11:01 PM.
Darkware is offline   Reply With Quote
Old 04-07-2003, 10:57 PM   #6
kbrown
Moderator
 
kbrown's Avatar
 
Join Date: Sep 2002
Location: London, UK
Posts: 3,198
Thanks: 0
Thanked 8 Times in 8 Posts
Default

Cool scene mr Dark!
__________________
Kari
- My Website
- My IMDB

Do a lot, Fail a lot and Learn a lot!
kbrown is offline   Reply With Quote
Old 04-07-2003, 11:23 PM   #7
kbrown
Moderator
 
kbrown's Avatar
 
Join Date: Sep 2002
Location: London, UK
Posts: 3,198
Thanks: 0
Thanked 8 Times in 8 Posts
Default

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!
kbrown is offline   Reply With Quote
Reply


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 07:26 PM
apache environment problem andrew_sorensen Simply Maya Tutorials 4 08-12-2010 03:48 PM
Strange Problem - Unable to change attributes for multiple objects anthonysw3 Technical Issues 4 04-12-2010 11:56 PM

Thread Tools





A little bit about who we are
Links you might find useful
Catch up with SimplyMaya
SimplyMaya specialises in Maya tutorials. We offer over 1,000 individual Maya training videos, ranging from basic Maya tutorials through to intermediate Maya tutorials. Our tutorials are created by instructors with industry experience and are designed to get you up and running in Maya quickly without making it seem like hard work.

Copyright © 1999-2015 SimplyMaya - vBulletin® Copyright © 2000-2015, Jelsoft Enterprises Ltd.