SimplyMaya Forums

Welcome to the forum, feel free to ask questions here.

Home / forum / Animation / Animation / expression problem
Register FAQ Members List Calendar Mark Forums Read

New Thread
 
Thread Tools
Old 04-07-2003, 07: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, 08: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, 08: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, 08: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, 09: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, 15 views)
__________________
www.Darkware3D.com

Last edited by Darkware : 04-07-2003 at 10:01 PM.
Darkware is offline   Reply With Quote
Old 04-07-2003, 09: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, 10: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
New Thread

« Previous Thread | Next Thread »

Thread Tools

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

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

1 Month

$34

Month-to-month billing
$34/month
Unlimited access to all videos
Project files to download
Easy to cancel at anytime
 
 

3 months

$87

Billing every 3 months
$29/month
Unlimited access to all videos
Project files to download
Easy to cancel at anytime
Save $5 per month or $15 in total compared to monthly billing with this package.

12 months

$288

Billing every 12 months
$24/month
Unlimited access to all videos
Project files to download
Easy to cancel at anytime
Save $10 per month or $120 in total compared to monthly billing with this package.

Your plan will automatically renew. You can cancel at any time via your PayPal account to avoid being charged again.

You can view the FAQ on our video plans here. You can contact us directly here. By clicking one of the buttons above, you agree to our Terms and Privacy Policy.