|
Maya to Director Character Export Tutorial (Oct 2003) This tutorial/lecture is about how to export an animated character from Maya into Director. The process for 3DS Max is already well-documented and a tad easier too. Click here for a good tutorial. But there's hardly any information for exporting Maya characters; so I decided to come up with this. Have fun. Step 1: Get your Character Ready!Model, texture, rig, animate, etc. Get your character ready to go. But here are some things to take into account. The character needs to be made of polygons. Make sure it's all clean and as optimized as possible. Note that procedural textures get crunched into one flat texture. Take a look at the Maya Documentation for what kind of shaders to use. At best, keep the networks simple and use lamberts or blinns. Also, make sure you do a smooth bind during the rigging process. If you did a rigid bind, go back to bind pose, detach skin and re-skin. Don't use any deformers. Oh yeah, one last thing amongst others, name all your bones.
For this tutorial, I whipped out Mr. Fire Eater, did a cheap rig on it and laid a few keyframes here and there. I came up with two animations: Dawdle cycle from frames 0 - 20 and "Yo! Sup!" from frames 22 - 33. Whatever :P Step 2: S3D Export! Now!
Now would be a good time to light the scene up. Place a few point lights here and there. Then go to Shockwave 3D Exporter > Export Express - All. The options are pretty straightforward; check docs for more info. Should all go well, you should reach the 3D Preview window. This more or less shows what your character will look like in Director. Look thru it and ogle at the stats!
Step 3: It's time to Director!
Once you play it, you should see the character cycle through all his/her/its animation. Now for some scenarios, this might not be satisfactory. You might want to play certain animations at certain times or give the user control over it. Introduce the Bonesplayer!! Step 4: Script the bones
Time to put some theory to practice. We are going to delve into
some Lingo that will let our user play the animation cycles. Press
Control - Zero to open up the Script window. We are going to
write a Behavior script so click the script in the cast, go
to the Property Inspector, click the Script tab and set the
Type to Behavior. Drag and drop this empty behavior on to the
3D sprite on the stage.
This essentially says when the 3D sprite begins, pause the Bonesplayer on the pelvis-skeleton. Running the movie now should yield a still character. Next we are going to wait for some key input and play animations off of those BUT first -- time to explain the Bonesplayer play command. .bonesPlayer.play("animation name", Looped, StartTime, EndTime, PlayRate) The animation name can be found out by going through the Object
Inspector. Here it's "pelvis-skeleton-motion0" Now we are going to use the play command in a case condition.
Add this piece of code after the beginsprite event in the behavior script. It means to say, wait for the user to press down a key. Once a key is pressed, check its keycode. Keycode 123 stands for the left key. So if you press the left key, it will play a looping cycle of the Dawdle animation at a normal speed of 1. OK. Hang on. It's almost over. Now just repeat the same line and make necessary changes to play the next cycle. Start time is 733, end time is 1100 and the keycode is 124 which is the right key. >> Take things to next level This is just a start of the things you can do to the Bonesplayer and thus your character. You can queue actions, blend animations and even use playlists from other motion data. Click here to download the Fire Eater W3D file. Experiment with it. P.S. Be careful of copying and pasting code directly from the page into Director. Some HTML characters are interpreted as actual Lingo. Please send some feedback Back to Tutorials |