A script to setup character nodes in MAXscript
by Thomas Shaw · 07/08/2007 (7:00 pm) · 5 comments
So, the other day, I was helping an innocent beginner setup their character hierarchy in MAX. I have done this before and always see that same issues and questions. Being an inquisitive fellow, I thought, "I bet I could automate this process somehow". I realized that no matter how a person arranges their Character Studio Biped, the torque/biped setup and naming conventions are always the same, making it a perfect candidate for scripting!
Besides, I have always wanted to have a good reason to learn MAXscript.
It took me a couple days to figure it out, but it was fun to learn how to work it. I have to admit I kinda squealed like a little girl when I got this script to finally worked right.
THINGS IT DOES:
1. Creates the most basic, necessary nodes/dummys that the max2dts exporter and TGE needs for a character, EXCEPT for the "bounds" bounding box. I haven't figured out how to script the creation of a bounding box that will read the bipeds size and create an appropriate bounding box.
2. Moves the dummies to the generic body part they are supposed to be attached to for a standard bipedal humanoid figure. For example, the "mount0" node gets moved to the center of the right hand.
3. Parents the nodes, in a proper hierarchy, to the biped.
HOW TO USE THE SCRIPT:
1.Download the script here:
www.3drogue.com/downloads/TorkCharacterNodes.ms
You can save the script anywhere you want, but I put it in the scripts folder in the 3dsMAX9/scripts folder.
2. Have your character mesh and Biped arranged and skinned how you want them.
3. Run my script - You can do this by going to "Maxscript" on the main menu bar, then selecting "open script". Once it is open, hit ctrl-e to execute the command "evaluate all". That will run the script on your scene. You can also do "evaluate all" by going to "File"---> "evalaute all" in the script menu.
BUGS:
1. The "cam" and "eye" nodes will need to be moved to a proper location that fits your biped. For example, the "eye" node gets centered to the "bip01 head" bone. It should actually be slightly in front of the head, or where the eyes of your character are. The "cam" node as scripted, will probably be off in space somewhere behind your character.
2. No "bounds" bounding box is created. This is because I don't know how to script the creation and sizing of a bounding box based off the size of the biped.
That's all.
I might make one for vehicles next...
Anyway, maybe this will help some people.
Besides, I have always wanted to have a good reason to learn MAXscript.
It took me a couple days to figure it out, but it was fun to learn how to work it. I have to admit I kinda squealed like a little girl when I got this script to finally worked right.
THINGS IT DOES:
1. Creates the most basic, necessary nodes/dummys that the max2dts exporter and TGE needs for a character, EXCEPT for the "bounds" bounding box. I haven't figured out how to script the creation of a bounding box that will read the bipeds size and create an appropriate bounding box.
2. Moves the dummies to the generic body part they are supposed to be attached to for a standard bipedal humanoid figure. For example, the "mount0" node gets moved to the center of the right hand.
3. Parents the nodes, in a proper hierarchy, to the biped.
HOW TO USE THE SCRIPT:
1.Download the script here:
www.3drogue.com/downloads/TorkCharacterNodes.ms
You can save the script anywhere you want, but I put it in the scripts folder in the 3dsMAX9/scripts folder.
2. Have your character mesh and Biped arranged and skinned how you want them.
3. Run my script - You can do this by going to "Maxscript" on the main menu bar, then selecting "open script". Once it is open, hit ctrl-e to execute the command "evaluate all". That will run the script on your scene. You can also do "evaluate all" by going to "File"---> "evalaute all" in the script menu.
BUGS:
1. The "cam" and "eye" nodes will need to be moved to a proper location that fits your biped. For example, the "eye" node gets centered to the "bip01 head" bone. It should actually be slightly in front of the head, or where the eyes of your character are. The "cam" node as scripted, will probably be off in space somewhere behind your character.
2. No "bounds" bounding box is created. This is because I don't know how to script the creation and sizing of a bounding box based off the size of the biped.
That's all.
I might make one for vehicles next...
Anyway, maybe this will help some people.
About the author
#2
no serieusly, this is a live saver, it always takes forever to get those damn nodes right....
but the only thing u have to do is have your mesh skinned with biped and run the script ?
nice ^^
07/09/2007 (4:12 pm)
wow, i think i wanna marry you....0.0no serieusly, this is a live saver, it always takes forever to get those damn nodes right....
but the only thing u have to do is have your mesh skinned with biped and run the script ?
nice ^^
#3
07/24/2007 (7:54 pm)
This is nice, I am new to Torque but not that new to 3DSmax. I am currently in school at ITT tech for game design and was having trouble getting my characters to work in torque until I found this script you made. Works great even in 3DSmax8. TY very much for posting this script its been a time saver for sure.
#4
08/18/2007 (12:18 pm)
Great work!
#5
11/19/2007 (7:42 pm)
what folder do u use when u want to ad characters movement i tried the game.cs folder but im not sure if u make a new folder or use games.cs folder to type in the info it would be nice if got step by step picture tutorial for the folder setup for all character actions. 
Torque Owner Clint Herron