What you need:
1. 3DStudioMax version 1.0 or later.
2. qME or another suitable mdl-editor.
3. A charater model in 3ds, dxf, max or any other format that your
copy of 3smax will import or otherwise load.
4. This text :)
About this technique
This technuiqe is really a emergency solution for all you people who
do not have the money or will to buy, borrow or steal a deformation plugin
like Bones Pro or the famous (and very expencive) Character Studio. Still
its a good tech when you consider the alternative of manipulating every
vertex by hand for every single frame (could be 2-300 frames or more when
quake2 comes out).
Quake2 as well as other upcoming games will infact use a similar tech, not to create the animation, but to make them look smoother in the game. You might have read in .plan files that Q2 will use ‘interpolation’ between the frames to calculate and show more frames then there really are in the mdl file. Well this is exactly what you are going to do with the morphing tech, you will create several key possitions of a mesh and then let Max calculate the frames inbetween. Very simple.
Before you start
When you have a working model you should always sketch up a story board
of your animation on paper at first. This will allow you to foresee any
potential errors or problems with what you want your character to do. Perhaps
you will notice that the model wont work in its current form and you will
have to go back to modeling. Make sure that the model you have made can
preform your animation before you acctually animate it.
Overview
Morphing is simply put to let max calculate all the frames between
a number extreme possitions. By using this technique you can generate virtually
an infinite number of frames to make very smooth animation in short time.
The extreme possitions will in this tutorial be called morphtargets and the animated mesh will be called the morph object.
Creating the morphtargets
For every target you should clone your mesh and then, using a ‘edit mesh’ modifyer, transform it to its new possition. You must always use the edit mesh even if its only to scale the character because the morph object does not use any normal transformations like scale, move or rotate.
Which mesh you should clone is different for each target, but in moste cases i have found that the last target should be used, still, for a walk animation i tend to use the first mesh for every target. You can clone a mesh by holding shift and moving the mesh or by choosing 'Clone' in the Edit menu. Your target must be made out of a mesh with the same amount of verticles and polys as the original mesh so it doesnt matter how cool it would look to have your character morph into a sphere…you must use a clone of your original mesh. I have heard about a plugin that can modify a object in such a way that it would be possible but have not seen it anywere.
The morph targets should illustrate all the significant changes the character will go through and you should especially take care in making 'in' and 'out' targets so that the morphing (animation) is smooth around the extremes of the movment.
Creating the morph object
The morph object will be your animated mesh so you should first make
a clone of the first target. If you dont you will ‘loose’ the first target
seens it will be animated. Select this mesh and create a 'Morph'. This
can be found next to 'Boolean' on the create tab under 'Compound objects'
in the ‘object type’ roll-out. This object does not need to be placed in
any particular relation to the targets so you can put it pritty much anywere
you like though it helps if you can still see the targets in at least one
of your viewports.
Applying the targets to the morph object (creating the animation)
Select your morph object and select 'Pick target' (found in the standard
roll-out when in the modify tab), move the animation slider forward as
many frames you think the mesh needs to complete this part of the animation.
Make sure that you have the 'Instance' option selected (this will help
when adjusting the animtion later on) and then click the second target
(the first target is the first frame so you dont need to select this one,
there is a exeption to this rule that i will explain in the next paragrah),
if everything works then you will see that your mesh takes the shape of
the target. Again move the animation slider forward and click the next
target, do this with all your targets and then deselect the morph object.
If you have many targets it might be a good idea to write down the frame
numbers you selected for all the targets, though its not a necessity.
In some cases (acctually in moste cases when you have a large mesh with lots of movment) the first target will be moved up and to the left automaticly by adding the targets. This is a very anoying error and i dont have a real solution for it. To fix that i usually add target no.1 to frame 10 first insted of the second and then use the time-tool to set the start time to 10 making the stupid movment invisable.
Because the morphing only uses the new vertex possitions of you mesh then you will most likly need to move the mesh up and down the y-axis, in some cases like the ‘tarbaby’ model (found in the second quake .pak file) the mesh also need to be moved along the z-axis (x-axis in quake related models, always a confusion for me when moving models from .max to .mdl). Well this is why you should write down the frame numbers were you added the targets.
Adjusting the animation
Move the animation slider to the frame number for the target you wish
adjust, select your animated mesh and shift click on the animation slider.
This will create a key frame at that point in time for the mesh. Press
the 'Animate' button and move the mesh to the possition you think it should
have, always be sure that you press the button because if you dont you
will change the possition for all the frames during the hole animation.
Do this untill you think the animation looks good and then take a coffee
break...you deserve it!
If you used the 'Instance' option when picking the targets you can now also alter the morphing by editing the targets. Simply use your the ‘edit mesh’ modifier you have already applyed to the target or add another one. Your changes to the target will instantly be applyed to the morph-object.
You will also in moste cases find that you added some of the targets at the wrong time, perhaps one of the targets should be displayed at frame 12 insted of frame 16. To change things like this or to remove a target completly you have to select your morphobject and go into trackview (edit/trackview), your morphobject will be marked with a thick black square. Explode that objects tree so that you find the morphobject keys and simply just move them to the correct possitions. The changes you make here will also be applyed instantly. If you have added some transform targets (moving/rotating the object) you should move thies targets at the same time.
Move the animation to a .mdl enviroment (based on qME)
Until someone comes up with a max plugin that will allow you to export
specific frames to mdl format you will have to use 3ds or dxf as a temporary
format to get your animation into a .mdl model file. I use 3ds myself since
I also use qME wich can handle 3ds format very good.
First you should make sure that you have saved you animation with all the targets just in case you find that it has to be redone. Now simply delete everything besides your animated mesh and start exporting frames, and remember that it is always easier to remove frames then it is to add them when in a mdl enviroment so use a lot of frames from you animation rather then to few.
You can also use the ‘re-scale time’ function in the ‘Time configuration’. If you think you need 50 frames (in the mdl) for the animtion then you just click re-scale time and set the animtion lenght to 49. You set it to 49 because you will also export frame 0. If you have used a ‘standard’ possition (a good idea btw) as a base for all you animation sequences then you will only need to export frame 0 once.
For some reason the authors of qME have not added the extemly simply functionallity to compose Multiple Frames-files if you dont export so i normally compose them myself with a text editor insted fo importing every frame on its own. If you export a .frs file and look at it in a text editor you will see that its very easy to make yourself and it will save a lot of time if you have a lot of frames. Just remember to put all the mesh files in the same directory as the .frs file. Also you can use 3ds files in the multiple frames-files…in qME the option never comes up because qME can’t export to 3ds.
Well thats it. You should now have a animated character or object in your mdl file. Take a look at the result of my morph-animation in the files below.
Smacker for win95/NT
Smacker for MS Dos
The files are preview renderings from max, you will ofcours, as always, need to compse a good baseframe before you can view the textured animation in qME.
Benny ‘Elmek’ Edlund -BioProbe Design
mr_e@algonet.se