Previous Blog Next Blog
Prev/Next Blog
by date

A script to setup character nodes in MAXscript

A script to setup character nodes in MAXscript
Name:Thomas Shaw 
Date Posted:Jul 09, 2007
Rating:Not Rated
Public:YES
Comments:YES
RSS Feed:GarageGames Blog feedor Subscribe with .
Profile Page:View profile page for Thomas Shaw

Blog post
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.

Recent Blog Posts
List:07/09/07 - A script to setup character nodes in MAXscript
03/01/07 - Moved to TGEA
11/10/06 - Wishfull thinking #2: Shapes on Terrains
10/03/06 - A scripting interface?

Submit ResourceSubmit your own resources!

Clint Herron   (Jul 09, 2007 at 13:07 GMT)
This sounds really neat -- so basically it's a setup to easily use a Character Studio biped rig in Torque? That sounds pretty cool. I'm not a Max user myself, but it sounds great.

Florian   (Jul 09, 2007 at 23:12 GMT)
wow, i think i wanna marry you....0.0

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 ^^

Michael Luce   (Jul 25, 2007 at 02:54 GMT)
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.
Edited on Jul 25, 2007 02:55 GMT

Alienforce   (Aug 18, 2007 at 19:18 GMT)
Great work!

Roman Soloviov   (Nov 20, 2007 at 03:42 GMT)
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.

You must be a member and be logged in to either append comments or rate this resource.