First thing we need to do is make a .PSK of our model. This file format holds the rig, vertex and mapping channel information. Note it doesn't hold the texture, just the mapping channels.
To import properly however make sure that you have your multi/sub-object material applied to your object. This ties in with the export in telling the model that it has the required texture count. If you only have one texture applied...even though you have 3 map channels...it will STILL come up as only having one texture channel. This is a bad thing...if you hadn't guessed :)
Just a reminder that you can only define two textures in the .upl (text file defining model information) the rest is applied in the file itself. Team skins also need to be on the first two skins. So hopefully you kept that in mind.
Firstly, after all that has been said, we need to make sure our character is back in the standard pose for export. Something similar to what I have here is a good example. Make sure you delete EVERYTHING that isn't meant to be imported with your model.
NB: This image doesn't have the gun bone visible, make sure NOT to delete the Bone_Weapon bone.
To import your character from MAX you need a neat little plugin called Actor X. This can be found Here at the Unreal Developers Network. You should visit there sometime, it's neato! :)
Once you have installed that (will require a restart of Max of course), you can find it in the Utilities tab under 'More...'. It will open up a panel and you have a whole wealth of new information to take in. THe bits you need to know..so it's not as scary as it may (or may not) first appear.
Now prepare yourself, this bit is pretty tricky. Taken a deep breath? Good. Here we go.
In the top tab put in the folder location of where you want to save your .psk. By now I have started a folder system I like, and I have one specifically for files that I use to import into UT2004 called, you guessed it, UT2004 in my Weaver folder. Next, give your mesh a filename. In my case I called it Weaver.
You got that, here's the really hard part...hit the Save mesh/refpose button. And there you have it. One .psk file. Pretty hard stuff huh? You can now import your model into UnrealEd. It won't be able to do anything when in there...except scale it and add some textures and stuff...but we'll get to that.
What I will do now is make an Idle Animation that we can use for our character as a basis for importing and in game stuff. We can of course change it later, but it looks much cooler to have your character doing something you want in game rather than just standing there looking like a dead man.
Unreal Tournament 2004 uses a long list of standard animations for it's characters. We are going to utilise these animations to get our character directly into the game. I will include a full list of these animations on the index page so look there if you need it.
One of the main Idle animations is the 'Idle_Rest' animation. This is the one that the selection interface uses as the main animation between playing various other Idle animations. We will make one animation and use the same animation across multiple animation names in order to get our character in to the engine, and then build on our animation list after that.
I will go into animation a bit more thoroughly later, but for now we will pose our character in a restful pose holding a gun and his chest moving as if breathing.
On frame 0, use rotate and move to adjust your character into a pose you are happy with. Generally it is as if he is holding a rifle in a relaxed pose like so.
A good method of moving your character, without you continually selecting your mesh by accident is to 'Freeze' your mesh by right clicking on the mesh and selecting Freeze Selection. THis will make your mesh go grey, if you have applied a material or want the colours to stay as they were, unfreeze all and right click on your mesh and select Properties. Deslect the box that has Show Frozen in Gray, and refreeze. This way you can easily select just the bones...while still seeing the model.
After you have done that, select all the bones in your scene...(not the model itself nor the Bone_Weapon bone) and right mouse click on the animation frame slider (it has 0 / 100 on it most probably). A window will come up to Create Key. Go OK. This is telling your bones to set a keyframe at frame 0.
For the uber Noob's...a keyframe is a frame that is key to the animation. Max fills in all the blanks by taking the information you give it in the keyframes and interprets the in-betweens. In this case we are going to make the 5th frame a breath in, and the 10th frame back to breath out. Max will blend the frames in-between these frames.
Move the slider to frame 5. Make sure that Auto Key is ON. This is found at the bottom of Max, next to the big button with a key on it.
On this frame, rotate the top two spine links so that the character arches his back slightly as if taking a breath. Adjust the arms if needed. At frame 10, rotate the spine links back to where they started. Note that it is a loop, therefore it is important to get as close to, if not exactly the same position at the end of your animation as it is your start. This can be done by copying info, but so far as I have used Angle snap I just kept in mind the angles used.
Feel free to add any other tweaks you like, such as blinking or rotating the head. Remember it's the small touches that count, so always keep in mind what you can do to imporove your animations...but as this is more a test run...it's not as important.
Just to prove a point though, I made 2 breathing loops...but on the second breath I have the eyelids blink. I made them blink over the course of three frames. up, down, and straight up. Unreal has the ability to do it's OWN blending within and between animations.
You can easily speed up or slow down animations, and the engine adjusts frames accordingly to make sure it's a smooth transition. In so doing, I will be nearly doubling the length of time my animation plays out, so the blink instead of being instantaneous should be just right.
So we have out first animation sorted, the .PSK is sitting innocently in your folder waiting to be put into action. Go back into ActorX, and now we get into the core of what ActorX can offer you.
Fame and Fortune and wonders abound. Well, Pretty pictures and animated versions of me anyway.
Settings that I found most conducive to working is to have at the bottom of ActorX set to the following :
Persistant Settings : ON
Persistant Paths : ON
All Skin-type : ON
All Textured : ON
Everything below that : OFF
Making sure those are set as so, you can then set up the export of your .PSA file. Put in an Animation File name. this is what it is when you hit save...you can Save As the name when you export however.
Animation Sequence Name corresponds to the Animation title that we are exporting to. In this instance it will be Idle_Rest, so put that in there.
Animation Range is the frames you want to export into the animation sequance name. In my case it is frame 0 through to 39. A couple of things to note. You CAN go backwards, I also believe you can break frames up individually to export into the one animation if needed. Examples include the following :
0-39 = frames 0 through to 39
40-1 = frames 40 through to 1
1-3,5,10 = Frames 1 through to 3 then 5 then 10
Also take into consideration how your character is going to loop, and blend between animations. As a general rule you create the last animation frame to look exactly like the first if it is to loop, and export up and including the frame just before that last frame. This will make it so the first and last frame don't double up...resulting in a small awkward pause in your animation. And nobody likes awkward pauses.
3DTotal
Advertisement - We need your support!
As
well as you tutorial hungry people eating through a terabit of bandwidth each
month we also have many additional staff and running costs involved in creating
these free pages. We want to continue bringing you many free tutorials and resources
everyday, so PLEASE check out our products and amazon affiliate schemes via the
above banners. Many thanks!
Once those inputs have been added, you can Digest the animation with the button above the inputs. After of which you can open the Animation Manager.
The animation is where you can compile your animations into an export file. Personally I keep them all in seperate .psa's. However it is just as easier (and a lot neater) to keep them all together in the one .psa. For the purposes of this tutorial, I might go against my nature and be neat for once :)
As you can see the manager has two sides. By using the arrows between the two you copy the animations you have digested into the right side which are the animations to be exported. Much of the manager is self explanatory however. Animations go in, one .psa comes out... :)
After you have moved the Idle_Rest animation across you could do the following animations to fill in all the other random animations that the slection interface plays to see you character in action. Once again, up to you at this stage as it's just to get it in. Animations such as Idle_Chat, Idle_Character01, Idle_Rifle, Idle_Biggun, And all the Gesture animations to be sure. All you have to do is rename the animation sequence and put it into the package.
After you have done what animations you would like, Save (or Save As...) and save it to a place you can get to it...in my case it's alongside my Weaver.psk file in the UT2004 folder.
Next page we finally get into the Unreal Editor. We will import our textures, our model and our animation/s. My boys growing up so fast... *wipes tear from eye*