View Full Version : How to MEL script a spider walk-cycle...
12 December 2003, 01:02 AM
I know it can be done, are there any tutorials anywhere, or a script somewhere that I can check out. I get basic C++ / MEL so, if you shoot some code my way I can try and crunch through it and understand it, but I'm really going to need this for an upcoming animation. :D
12 December 2003, 07:18 AM
This might be what your after:
12 December 2003, 08:52 AM
hey, im kind of tired right now...
but it looks probably like its exactly what I want. thanks a lot pixero, your the master! :D
Can't wait to animate my spider mech :thumbsup:
12 December 2003, 10:58 AM
12 December 2003, 06:47 PM
hey, thats cool... that's good to know, but now I need MEL help programming that. :hmm:
hmm, i'll have to visualize and check to see if this table will work with a 6 or 4 legged spider. either way, thnx!
12 December 2003, 11:13 PM
hehe, what are the chances there was an expression rigging tutorial out there and on spiders too ... lucky
12 December 2003, 02:00 AM
that tutorial isn't what i want... after following all of the steps (didn't take long, just copied the MEL scripts) I found out, its for a flying 4 legged mars lander type thing...
not a realistic spider... maybe I can examin the code, and learn some tho....inching closer to making my spider rig :hmm:
12 December 2003, 03:37 AM
Best one I have seen so far.
And you can also try
check their forums for spider walk or something like that.
12 December 2003, 06:05 AM
Hey, that script has nothing relating to the spider walk cycle...it just controls the spider's walk path, but i still appreciate it, as I am emailing that person about the script used. :D
12 December 2003, 07:26 AM
Heres a funny Spider walk referens I stumbled across:
12 December 2003, 07:35 AM
heheh, now see I can script that... thats not quite accurate, cause the legs that go up in one "step" go up sequencially... which is what's giving my problems in maya.
i need to know how to in essence do this:
left_leg2.ty = (getAttr (right_leg1.ty @ (time-2)));
i want what the right legs y-axis translation was, 2 seconds ago.... that way, the second leg will raise 2 seconds afterwards in this example...
(im reality, 2 seconds would be quite a long time)
so, does anyone know how to do this? the problem with my code above, is the keyword time is a scalar, its not a dynamic quantity. if its been 3 seconds, (time-2) would give you 1... yet, what i want, is the translation when it was at frame 1... not a value of one, cause that would make the y translation 1, when at frame 1, the driving leg coulda been at 10 units translated in the y....
12 December 2003, 03:36 PM
Theres a MEL script at highend 3d called Copycat that lets you offset based on frames. If you just animate one step on one leg you can easily offset the other legs. Ive tried it for a spider.
12 December 2003, 05:03 PM
Offsetting keyframes is pretty simple, I did something similar in MaxScript a while ago. I used that to animate caterpillars.
Still, you need to animate at least one leg, but that's a lot better than 8!
D'oh, I should read more thoroughly - you covered that already. Sorry for the redundant post.
12 December 2003, 10:00 PM
Hey, i'll check out that script...
what i wanted to do, was have the movement of the body drive the animation of the first leg, and then have the copycat thing make the other legs move.
i'll test it, and let you know.
12 December 2003, 02:44 AM
uhh, copycat.mel isn't working... sourced it, and tried to run it, didn't find it. then I manually chose to open script, and it lots all the code, no errors, bu no window pops up like the readme says. :surprised
12 December 2003, 03:01 PM
Copycat works for me. Just source it and write Copycat; in script editor and press enter.
Anyway, I managed to make a automatic spider with set driven keys. Just move the body and all the legs move. Its not perfect but works in both x and z.
Here a small sample movie I rendered:
Spiderwalk (divX) (http://w1.702.comhem.se/~u70208061/bilder/pics/spider01.avi)
12 December 2003, 01:40 AM
wait dude, how did you do that?
and second, my copycat doesnt want to work... if source it, nothing happens, if i open the script in the script editor, it just gets entered, but the window doesn't pop up. :argh:
12 December 2003, 10:42 AM
Have you sourced it first and then written Copycat; in scripteditor and pressed enter? That works for me every time.
The way I did it with setdriven keys doesnt need the script though. A script thats using time only works when keyframes are set and animation playbacked while setdriven keys works in the viewport when you drag it around.
I made a little tutorial here:
Automatic spider with set driven keys (http://www.sandstrom.on.to/)
Hope this helps and let me know if anything is still unclear.
12 December 2003, 12:17 PM
bah.... doing it your way somehow worked, LOL... so my copycat works, and its kickin' ass. Just what I wanted... and your tutorial looks tight too. I'll check out both when i finish the spider model :D
01 January 2006, 10:00 PM
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.