Tail secondary movement

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
Old 03 March 2004   #1
Question Tail secondary movement

Hi all,
I’m a long time observer, first time poster here on cgtalk.
My character has a spline ik tail. I know there is already a bunch of tutorials on this, but I want to create a satisfying automatic secondary movement for this tail. The results I have so far with particle or softbody dynamics are no good because they create a “springboard” effect, while im looking for a whip effect.
There is a solution I found in this book “Maya Character Creations”, it involves an expression:

int $time = 'currentTime -query';
int $delay10 = 'getAttr -time ($time - 10) Hips.ry';
int $delay20 = 'getAttr -time ($time - 20) Hips.ry';
int $delay30 = 'getAttr -time ($time - 30) Hips.ry';
int $delay40 = 'getAttr -time ($time - 40) Hips.ry';
TailRoot.rotateZ = 0 + Hips.rotateY;
Tail2.rotateZ = 0 + $delay10;
Tail3.rotateZ = 0 + $delay20;
Tail4.rotateZ = 0 + $delay30;
TailEnd.rotateZ = 0 + $delay40;

You can find the chapter that explains this expression online, halfway down this page:
http://www.informit.com/articles/ar...102022&seqNum=3

I followed every step in the book from scratch, but I cannot get this expression to work. It gives me an error at every line of code. Is it because its not compatible with Maya 5? I am not too familiar with Mel and expressions but I have implemented some without any problems in the past. So please could someone show me how to make this work or suggest me something else.

Thanks
 
Old 03 March 2004   #2
it looks to me like you are mistaking the single quote marks for being apostrophes. you want to use the key above the tab, not the apostrophe key when evaluating an expression. It's a common mistake and one thats hard to spot.
Your code should be:

int $time = `currentTime -query`;
int $delay10 = `getAttr -time ($time - 10) Hips.ry`;
int $delay20 = `getAttr -time ($time - 20) Hips.ry`;
int $delay30 = `getAttr -time ($time - 30) Hips.ry`;
int $delay40 = `getAttr -time ($time - 40) Hips.ry`;
TailRoot.rotateZ = 0 + Hips.rotateY;
Tail2.rotateZ = 0 + $delay10;
Tail3.rotateZ = 0 + $delay20;
Tail4.rotateZ = 0 + $delay30;
TailEnd.rotateZ = 0 + $delay40;

Last edited by jadamburke : 03 March 2004 at 05:46 PM.
 
Old 03 March 2004   #3
it worked.
many thanks.
 
Old 03 March 2004   #4
A time delayed expression like the one you have here should yield a fairly convincing 'whipping' motion. I've used a similar expression to animate a sting ray.

Damb backticks/apostrophes will get you every time!
__________________
Kiaran Ritchie
Game Developer / Programmer / Rigger
www.bigfatalien.com
 
Old 03 March 2004   #5
instead of using mel in an expression, try using the frame cache node.

to create one: createNode frameCache;

then plug what you want into the node, and it will output the result of that node, but offset in time. much better than using mel in an expression...
__________________
-:macaroniKazoo:-
 
Old 03 March 2004   #6
Quote: instead of using mel in an expression, try using the frame cache node.


You actually got that thing to work, Mac? Last time I tried it, it was just freakin´ out all ova´ da´ place. ...But I think that was in 4.5. Did they improve this in 5.0?
__________________
David Walden
Rigging | MEL Scripting | Animation
www.davidwalden.com
 
Old 03 March 2004   #7
pretty much the same for me.

in the help is written:

...eg. output 1 is the stream's value at "frame + 1"....

but in the connection editor only past[0] or future[0] could be connected.
 
Old 03 March 2004   #8
No, I mean, I could connect everything no problem, it just behaved *extremely* erratically- it didn´t produce predictable or correct results. I think I tried it on some tail joints once, and the tail just kept twitching about hectically.

You might need to use MEL to connect it properly.


-d
__________________
David Walden
Rigging | MEL Scripting | Animation
www.davidwalden.com
 
Old 03 March 2004   #9
yeah you're right, it does seem pretty finicky and unstable. it doesn't seem to refresh its own cache or something... i keep getting elements of old animation stored in the nodes.

maybe you're right dave, mel in expressions could be the way to go.
__________________
-:macaroniKazoo:-
 
Old 07 July 2004   #10
No luck here either. Glad to know it's not just me. Where's Scheifer? He's the one who introduced me to this... how the heck did he make it work? If anyone else knows how to successfully use this node, please let me know.

Guess I'll have to use an expression for now, only days till Siggraph and the reel is still not ready for compositing.

- Jeremy
__________________
da old reel
 
Old 07 July 2004   #11
Hi Jeremy,

you could e.g. try the lagNode... -->
lagNode and expressoUtils plugins...

regards

Alex
__________________
Alex V. U. Strarup
Mel script monkey
Facebook LinkedIn


one mistake can ruin it all... :)
 
Old 01 January 2006   #12
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



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 08:59 AM.


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