hey
I'm making a script that will give you a nice startup for creating walkcycle animations.
It will NOT give you a finished walkcycle (that's kind of impossible :P )
It still has one bug, when opening the script you have to spin the timespinner or it will make the walkcycle on 1 frame... wich is just a pose (if someone knows the solution for that please let me know)
so here's the script -->
http://www.megaupload.com/?d=2931HTC4
"timespinner" is the length of the loop btw
![;) ;)](https://polycount.com/plugins/emojiextender/emoji/twitter/wink.png)
let me know what you think
ideas and improvements or corrections are welcome
![;) ;)](https://polycount.com/plugins/emojiextender/emoji/twitter/wink.png)
Replies
First off you script is not very practical. If you really think about it there is no one who could really use this script. The problem is that you create a biped and then you animate it. You haven't considered that the biped needs to be used as a skeletal system for the character. Trying to skin or bind a mesh to an animated rig seems kind of silly. Plan before you script.
On the script side i see a bunch of bad practice. You do not need to set up global variables for the spinner and slider values. Usually you don't want to use global values at all unless you really need to. Get a good grasp of scope of variable first. Also try to stay away from using the $ for objects. The problem with this method requires the object to be selected by its name. Once you create a new biped system by running your create button event you create a new biped with the name Bip002 which in turn is $Bip002. You have the right idea of setting the variable when creating the new Biped but don't stop it there. If you want to work with biped try to look up some more information on biped by searching 'biped MAXScript Extensions' in the MaxScript Reference.
Now this is not a requirement but it will help you code be easier to read. Try to make functions for what you want going on. In your script it seems like you just want one thing to happen (as in you just want one huge event to happen when you hit the create button). So i would would create a function with in my rollout called CreateWalk_fn and then just run it with the even handler. I personally also add a function called UpdateRO to help me control my UI when it gets complex.
Also turn off the viewport and set it to create mode when you are automating animation. This can save memory and speed up your script. Other than that keep at it. If you would like a script or two to see what i was pointing out let me know.
thanks FortyOne, and yes i'm new to maxscript
you helped a lot, I will probably work some more on it today, try to get rid of the global variables and put the big block of code in a function.
And if you want I would like the script or two for some clarity and to learn from it
download here
http://www.mklejnowski.com/Files/ShapeScripter Method.ms
Couldn't you just create some footsteps, save the animation out, load it into motion mixer and filter out the horizontal movement to get it to stay in place? You could also load in 1 of the hundreds of walk cycles floating around in bvh format?
Even that isn't really needed...I don't mean to sound like a grumpy dick, but procedural walk cycles seem to be a crutch for people who can't animate. It's 4 poses (contact, recoil, passing, high point) once you create those you have your walk cycle. It's especially easy with the copy paste pose, paste opposite included with biped.
I just don't see much reason for it... unless it gives you a wide range of prameters to tweak to make custom funky walk cycles? Am I missing something?