View Full Version : Maxscript "walkcycle_Creator" WIP
08-14-2011, 12:19 PM
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 ;)
let me know what you think
ideas and improvements or corrections are welcome ;)
08-14-2011, 08:03 PM
screens or video?
08-14-2011, 09:59 PM
Yeah....................i see what you mean which is really weird. For some reason even when your TijdSpinner has a value of 12 by default it still reads as zero through the listener. Just have this line of code run first before you set your global variables to fix this bug. TijdSpinner.value = 12Now if you looking for some feed back and advice here it comes. I can tell your new to maxScript but i hope some of this stuff helps.
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.
--This function turns off the viewport
--this sets it into create mode
max create mode
--Now run all your script automation stuff and end with this code
Other than that keep at it. If you would like a script or two to see what i was pointing out let me know.
08-15-2011, 04:47 AM
download not working :(
08-15-2011, 05:55 AM
new link --> http://www.mediafire.com/?ijk47b0mqq6fjnz
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
We need screens or video.
08-15-2011, 10:47 AM
Had to wrestle with the script for a while in 2012, will post what the issues are in a jiffy, but I was wondering what is the road map for the script? Is there a specific place you're taking it, or just waiting for feedback randomly?
08-15-2011, 01:52 PM
Here is a script i went ahead and added a bunch of comments to explain what is being done. I got a little lazy toward the end but i'm sure you can figure out what its for. It is a script which automatically formats a function for you with in the listener that creates a custom spline shape. I used this to create controllers for my auto rigger that i am working on right now. You pick a spline shape with in the scene and write in the function name and hit create and presto. It formats the function into your listener and copy it into your clipboard.
http://www.mklejnowski.com/Files/ShapeScripter Method.ms (http://www.mklejnowski.com/Files/ShapeScripter%20Method.ms)
08-15-2011, 02:18 PM
So the script creates a walk cycle for biped which already has that ability?
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?
vBulletin® v3.8.4, Copyright ©2000-2013, Jelsoft Enterprises Ltd.