My program doesn't have bugs. It just develops random features.
Legacy:Player Modeling With 3dsmax
So, you've got this great idea for a player model, and you know you want to get it into UT2003 or 2004, but you have no idea how to get it from 3dsmax to the game. You have come to the right place. Let's go over some basics first:
- Tutorial Goal
- To show you all the steps required to get a player model from concept to inside UT2003/4. This tutorial was created using 3dsmax 6 and Character Studio 4 for the examples.
- You know how to model in 3dsmax and can create your mesh and texture on your own or have one already made
- You know the basics of 3dsmax
- You don't have any custom bones or animations (advanced)
- You have all the tools required
- A copy of 3D Studio Max and UT2003/4
- The ActorX plugin for your version of 3dsmax
- The [http://old.fileplanet.com/dl/dl.asp?/planetquake/polycount/Tools/ut2k3/ut2k3_characters.zip 3DSMax Character model source for UT2003
The First Step
Got your model finished and textured? Good, then the first step in getting it ready to go is deciding which UT base skeleton you want to use. There are a variety to choose from and all of them are in the Character Model Source. For this example I am using the HumanMaleA skeleton.
(insert Example pic here, HumanMaleA bones)
Now that you know what skeleton you want to use, how do you get it? This is a fairly simple trick built into 3dsmax:
- Open the Source model for your chosen skeleton.
- Select all the mesh objects in the scene and delete them, DON'T delete the bones or anything else
- Do a Save As... on the scene and save it for use now and later
- Open your model back up and merge the file you just saved into you scene
- DON'T move or scale the bones at this point to match your model
- If your model does not line up with the bones, it is best to scale and move your model to match it
Rigging it All Together
Now that you have your model lined up and scaled to the bones, the next step is rigging. Rigging, depending on what plugin you use, can be a very long process. The basic idea is so when you move the bones of the skeleton, your mesh bends and moves with it. The example will use Character Studio that comes with 3dsmax for rigging. The steps are as follows:
- Select your mesh, and go to the Modifiers tab
- From the modifiers drop down select the Physique modifier
- In the rollout below select the button with a stick figure under a plus sign http://syntaxerror22.virtualave.net/screens/AddRoot.jpg
- Select the root bone of the skeleton; this is in the center of the hipbone
- A dialog box will come up; there are only 2 major things you need to worry about here
- Ensure blending between links is set to 3 links
- Vertex link assignment needs to be rigid
- This set the basic assignment for rigging; you can now rotate the bones and see that it moves your mesh
- Ensure that when you move any bones for testing that you "Undo" to put them back in the reference pose
More then likely you noticed that not all of your vertexes are moving, or some are moving that you don't want to move. This is where the process can get lengthy depending on the detail you want in your joints. There are 2 main areas you should focus on when correcting your rigging. Envelope allows you to edit the area each bone affects. This is a gross edit and is not intended to be perfect. The other method is vertex mode, where you assign individual vertexes to up to 3 bones, and weight them accordingly. For the example only envelope was used. You can come back after testing your model ingame and tweak this as much as desired.
(example pic, MaleA rigged)
Got your mesh rigged and moving nicely? No weird vertices? Then you are ready to get this into UnrealEd. Ensure you have the ActorX plugin loaded and ready, and then follow these steps:
- Select everything in the scene or everything you want to export (bones and mesh)
- Go to the Utilities tab (hammer icon on the right) and click more
- Select ActorX from the list
- For convenience you may wish to add the plug in as a button
- Click the "Configure button sets" button
- Scroll down the utilities list until you see ActorX and select it
- Increase total buttons and scroll down to the new button
- Drag ActorX to the new button and click ok
- Define the output folder and mesh file name to export
- Ensure these options are checked
- Persistent paths and settings
- All Skin Type, All Textured and All Selected
- Bake smoothing groups
- Click the Save Mesh/Refpose button. A message box will tell you if the export was successful
Model Import and Animation
Now that you have your rigged model exported to a format that UnrealEd can recognize it is time to import your model and texture into it.
- First we will import the textures, open the texture browser and click File > Import...
- Browse to where you saved your textures and open them. Note:
- Recommended textures are square (1:1), uncompressed TGA or BMP files
- Unreal works best with few large textures rather then many smaller textures
- Be sure to include a 512 tall by 256 wide portrait of your model
- Create a new package name and name the textures, the example package is called MyTexPak and the texture names are GuyTexture and GuyFace
- Your textures should show up in the browser now, but they are still uncompressed
- Right click and convert your texture to the optimal directx compression, DTX1 is recommended for basic textures
- Note the package name and texture name as you will need it later, click the save button and save it all down to the .utx
- Click on the Animations tab
- Click File > Mesh Import
- Browse to the place where you saved the export from the ActorX plugin and open it
- Name your new package and mesh; again, remember these names
- The example is called MyAnimPak and the mesh is MyMesh
- You should now see your model, but it may look too large and may not be facing the proper direction
- Open a UT character with the same skeleton as your model
- Click Mesh > Copy mesh properties
- Go back to your package and mesh and click Mesh > Paste mesh properties
- To display your texture on your model:
- Ensure the body texture is selected in the texture browser
- On the side panel under the mesh tab, open up skin > material > select 0 and click the ... button to apply the selected texture
- Do the same for the head texture, except select 1 instead
- Click the save button to save it all up
This will now have your model shown with your texture, scaled properly and facing the correct direction, but how do we get it to move? This is where the use of the Source bones comes into play. Because your model is using those bones, you can easily copy the animations from one of the UT characters that use the same skeleton. Here's how:
- Open up the UT model you got the Mesh Properties from
- Click Animation > Rename animation set
- Change the package name to your package name
- Again, the example was MyAnimPak
- Go back to your Package and you will see the animation set in the animations drop down
- Select the set and click Edit > Linkup anim and mesh
- Your mesh should now have the animations and move properly
- Save your mesh and animations
- Tips and Hints
- Do NOT save the package you got the animations from. This will overwrite an original game file, which will screw up UT.
- Step 5 above is very important as the code for the player models only loads the mesh. The animation set must be linked or the mesh will not move.
Code?! I don't know code!
There is only one thing left to do to get your model to show up in the player model select list. You must add a line of code to the xPlayers.upl file. Don't fret, this is only one line and is fairly simple. This doesn't require much programming know how, but you need to know the names of your packages and items (textures and animations) in them. Here is the line from the example:
[Public] Player=(DefaultName="Guy", Mesh=MyAnimPak.ExampleGuy, species=xGame.SPECIES_Egypt, BodySkin=MyTexPak.GuyTexture, FaceSkin=MyTexPak.GuyFace, Portrait=MyTexPak.GuyPic, Text="It's the example Guy!", Sex=Male, Menu="SP")
- DefaultName - what the bot will name itself
- Mesh - references the mesh and animation package you made
- Species - in conjunction with Sex defines the voice your character will use
- BodySkin - the texture on the body
- FaceSkin - texture on the face
- Portrait - a pic of your model
- Text - string that is used as the description of your model
- Sex - defines voice and she/he in console messages
- Menu - SP makes your model available in single player as a bot
Save XPlayers and that is it; your new model will now show up in the Character Select screen.
Syntax_Error: Content is nearing completion, just need to get those screens.
Syntax_Error: Found that line of code and explained all the vars. Now I just need to get 3dsmax back and get some screens. Beginning work on the weapon tut as well.
Syntax_Error: Content is at about 90%. Need to get into UnrealEd to confirm instructions and menus, and I need to proofread this fully. Still waiting for my computer so I can get some screens and UT2004.
TheBypasser: Guuys! Why copying the animation set? It's way more logical to just set the DefaultAnimation to a reference skeletal anim - like MeshAnimation 'HumanFemaleA.BipedFemaleA for example! Less duplicates = more optimization ;) (btw alike was used on some UT2k4 out-of-the-box models)
Wormbo: Category:Legacy Text Mangling Alert! Please don't use Word or any other formatting text editor to create or modify wiki pages.