Cogito, ergo sum

Legacy:Weapon Modeling With 3dsmax

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
Tutorial Goal 
This is an advanced tutorial that will walk you through taking a weapon model from 3D Studio Max to UT2004 and getting the weapon fully functional by using UnrealScript.

Disclaimer: This tutorial was written using UT2004. Some code may not work properly in UT2003. You have been warned. ;)


  • 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 know the basics of UnrealScript and can compile
  • Your weapon is similar to one of the weapons already in UT (for simplicity)
  • You have all of the tools required

First Decision:[edit]

Once you have your weapon model finished and textured, you must choose between two different animation types. Vertex animation is the simplest to create in 3dsmax, but UT2004 has complex import methods for this type of animation. Skeletal animation is done very similar to player models. You make bones relative to how you would like your weapon to animate. There is a catch here too: to animate a cocking motion, such as a pistol slide, you must use Inverse Kinematics (IK) to allow the slide bone to stretch and compress. Skeletal animation was used in the example. Here’s how to make the bones for the example:

  1. Select the bones tool from the prefabs page, systems tab
  2. Click to place your first bone (the root) then click where you want each joint
  3. Be sure to place bone ends where you want the muzzle flash to go
    • For the example there are only 4 bones: one root, one connector, one slide bone, and one flash bone.
    • (link to example pic, bones)
  4. Now you must rig your weapon to the bones in much the same way as a player model would be rigged
    • See Player_Modeling/3dsmax_Tutorial for specifics on rigging
    • I would recommend using vertex assignment exclusively as envelope is meant for more organic movements
    • The example was rigged in only 2 places: the bottom half was rigged to the root, while the slide was rigged to the flash bone ( this prevents the mesh from "squishing" when the slide bone is compressed)

Inverse What?[edit]

  1. To get the slide to... slide you must apply a specific type of IK called History Dependant (HD)
  2. Select Animations menu > IK > HD
  3. Select the first bone you wish to apply IK to
    • In the example the root bone was selected
  4. Select the last bone in the chain
    • The slide bone in the example
  5. This makes these bones an IK chain and you can now drag the IK crosshair to place the end bones
  6. On the movers(?) page there is an IK rollout, use this to edit the IK properties of each bone in the chain
    • The example locked all rotation axes and only allowed the slide bone to slide along the x axis


Because of the use of IK and Forward Kinematics (FK) on the root to simulate recoil, you weapon may appear to "fall apart" and leave the IK bones and rigged mesh behind. This is caused by 3dsmax trying to work in two different directions at once. Follow these steps to animate your weapon properly (all animations are at 30 frames per second):

  1. The firing animation is typically the most complex and will be tackled first
  2. In the example the slide was animated alone first
    1. Change the animation slider to go from 0 - 7(?)
    2. Select the whole scene [ctrl+a] and click Set Key Frame(?)
    3. Click auto-key(?) and drag the animation slider to frame 3(?)
    1. Drag the IK crosshair to where the slide would be for fully cocked back
    2. Drag animation slider to frame 7
    3. Drag IK crosshair back to starting point
    4. test play the animation
  1. You should see your slide kicking as if a shot were fired, but there is usually some recoil with weapons.
  2. To animate the recoil rotate the root so your weapon rocks back as if fired on the last frame of your slide animation
    • You can also have the weapon move back and a little up fore more kick
  3. Expand the animation slider range to fit how long you wish your fire animation to be
  4. Place more key frames for the recovery and place the weapon back in the starting position on the last frame
  5. The slide will likely position itself strangely during these animations as you have not adjusted the crosshair for the recoil
  6. Simply move the crosshair with auto-key on and adjust your key frames accordingly

Any alternate fires that require animations are created in much the same way. The other animations UT2004 uses for weapons are Select (when the weapon is selected), Idle, and PutDown (when another weapon is selected). These animations can be done on the same animation slider, just use later frames.

Exporting the mesh and animation:[edit]



Tarquin: It's best to only use subpages for groups of pages that are part of one document. I suggest renaming this to Weapon Modeling with 3dsmax, and doing the same for the player modelling tute.

Syntax_Error: Will do Tarquin. Thanks for the suggestion.