Blender Animated Md3 Export

From Cube Wiki
Jump to: navigation, search

Hello, and welcome to the Blender Animated MD3 Export tutorial. It is assumed you have viewed and understand the Static MD3 tutorial , understand basic Blender commands, and have an animated character ready for export to Sauerbraten. Also, this exporter is current and should be used for proper tag alignment for CVS Sauerbraten as of May 14, 2007.

Let's open up Blender and load the character with Control-O.

File:Http://johnny3d.promail.ca/wikitut/tut.png

The mesh objects are represented by arrows to show the orientation of each throughout the tutorial.


Select the armature and press tab to get to edit mode. select the tip of the bone where you want the tag_torso to be and press Control-S snap the cursor to selection.

NOTE: the following image has the legs and torso text switched. Use your imagination.

File:Http://johnny3d.promail.ca/wikitut/tut3.jpg

Parent the tag to a bone Control-P that is the meeting point between the legs and torso. For graphical purposes the tag is represented in the picture by the text 'Tag_T'. Do not mistaken its position for the actual tag, which should remain at the tip of the selected bone.

Do the same for tag_head. Again, tag_head is represented graphicaly by the text 'Tag_H' in the picture. Keep the actual tags parented to the tips of the respective bones.

File:Http://johnny3d.promail.ca/wikitut/tut3.png

We will add tag_weapon in a moment. But first, snap the cursor to the center of the 3D space Shift-C. Set the rotation/pivot point to 'cursor' by pressing period (to the left of the slash key). This will align all rotations to the exact center of the 3d space. Now, select everything (with A) and rotate everything on the Z-axis counter clockwise by pressing R, Z, 90, and hyphen (left of the equals sign). To the exporter this is facing forward and will export properly.

File:Http://johnny3d.promail.ca/wikitut/tut8.png

In the image you can see the tag_weapon representation [Tag_W]. Alignment of this tag can be touchy. Here is a good trick to use for tag alignment. Go to the frame in your animations where the character is shooting and the arm with which you will assign the weapon is level to the X-axis. Ensure you are in pose mode. Align the cursor as best you can to the tip of the bone where you want the tag to be. Go to side view -- keypad 3 -- and add the empty tag_weapon. Parent the empty Control-P to the appropriate bone.

Now go to the last frame of the animations. Select only the legs and tag_torso. Open the text editor, select the exporter 'md3_export_test2.py' and execute the script [right click over the text editor window and select 'execute script']. Name the file something appropriate like 'legs.md3' and export.

Now for the torso. Ensure you are in object mode. Center the cursor Shift-C.

Note-- At this point it is a good idea to save the file as nametorso.blend--

Select all and align tag_torso with the centered cursor. Make sure the pivot point is set at 3D cursor -- period again -- so that any rotations of objects and armature will occur at the cursor. Select everything except tag_torso. Rotate on the z axis 90 degrees. Now rotate selected on the x axis 90 degrees. Commands are R, X, 90, then R, X, 90. Once complete the orientation should appear so:

File:Http://johnny3d.promail.ca/wikitut/tut10.png

Select the torso mesh and all tags. Export to torso.md3 or something similiar.

Orientation for the head mesh and tag_head are the same for the head mesh.

File:Http://johnny3d.promail.ca/wikitut/tut11.png

One difference between exporting the head mesh with all others is that you only need one frame to export with no animations. The torso md3 will take care of the head animations.

In the buttons window go to Scene Mode with F10 and in the Anim tab ensure Sta: is at 1 and End: is at 1.

File:Http://johnny3d.promail.ca/wikitut/tut13.png

Select the head mesh, tag_head, and export to head.md3 or something appropriate.

Take a moment and congratulate yourself. If all went accordingly the hard part is over. Good job!

Write the md3.cfg. For a comprehensive guide view /sauerbraten/docs/models.html to perform this step.

Test, tweak, and enjoy.

-geartrooper