Unreal Development Kit 17a - Custom Weapons Part 1: 3Ds Max Setup
Unreal Development Kit 17a - Custom Weapons Part 1: 3Ds Max Setup
Unreal Development Kit 17a - Custom Weapons Part 1: 3Ds Max Setup
3dS MaX SETUP 1. Open up either of the two gun models provided to you in the Server. We are going to use one of my models first, then you can go back and do this later with your model. This is one of those things where you cant do it too many times...the more times you do this the better you will get and the more you will see how easy it really is once you get the hang of it. Im going to go with the ak47u model.
2. Go into the front view (or whichever view is the side) and change to wireframe. Were going to add a couple of things now, first some bones and then some dummies. WATCH YOUR NAME CHOICES CAREFULLY -- THEY ARE IMPORTANT!! Using the Create Panel > Systems tab (right), select bones and create 3 continuous bones starting just below the handle, up to the middle of the gun, and out through the end of the barrel (below).
Leave these three bones named as they are: Bone01, Bone02 and Bone03 even though their names are not important. Make sure the bones are DIRECTLY down the middle of your model and not outside of it. Select the handle bone (Bone01) and make sure that this bone is at 0,0,0 in your world. Here is what you have done: Bone01 is the dominant or root bone, telling UDK where your weapon is to be gripped. Bone02 is simply a connection to Bone03, which is where we will place the muzzle flash in UDK. Without these identified bones we would not be able to use them at all. 3. Select the gun model and add a Skin Modifier. All we have to do is add the three bones to the modifier, you dont have to do anything else. 4. To export your model go to the Utilities panel and select the ActorX from the bottom of the list. If it is not already there, just click the blue button at the top of the panel and locate it at the bottom of the list. Here on the right are the only things we have to worry about for now. Your output folder is simply somewhere you want to put it. For mesh file name, use the following to export your model TWICE:
WP_FP_ak47u WP_3P_ak47u WP stands for Weapon, and FP and 3P stand for first person and third person. First person is the weapon in the lower right corner you shoot with. Third person is a weapon image on either a Weapon Factory pickup or Weapon Locker.
Note the second image (right). That shows the only checkmarks you need for now. Uncheck any other. This will export a .PLK file which is UDKs skeletal mesh file format. Your gun is now ready to import into UDK. IMPORTING YOUR MODELS INTO UDK 5. In UDK, import the PLK files and the texture TGAs. Create Materials from the textures - HOWEVER - make sure that the LODGroup setting in each of the textures is changed from TEXTUREGROUP_World to TEXTUREGROUP_Weapon before you make the materials.
Save your new package with whatever name you wish, but keep your weapons together and out of the UDK weapons group.
6. Double-click your WP_FP_Weapon model and above is the window that will open. This is a Skeletal Mesh window and contains settings for textures, animation sequences and Sockets. In the bottom left side of this window is a Mesh tab. Select that and you will see that there are places to add Materials, adjust orientation and rotation. Add your materials into as many slots as show up. In this case there are 7 (0-6). Settings for origin and rotation will be adjusted once we have scripted the guns into the engine, so for now well leave those.
7. We now need to show UDK where the muzzle flash needs to be. At the top of the window is a small buttom with a black arrow pointing at a red half circle (right). This is the Socket Manager. Sockets are what tell UDK to emit things like lens flares, eject projectiles, or whatever. When you click the button this window will appear (right). Click New Socket and select Bone03 remember that Bone03 is the one sticking out of the end of the barrel of your weapon.
8. In the window that pops up next, name the socket b_Muzzle. The name is very important - you cannot just make up names for these sockets. Click OK and close out all windows. At this point we are done and ready to proceed to scripting.