Monday, January 27, 2014

How to create a custom flying vehicle in UDK Part 1

This one is again based on Teglegs plug n play elephant scripts, the guy is a legend and a huge contributor to the UDK forums over at Epic.

So first off you need to get hold of the files which are still available here.

The read me shows you how to get the Elephant into your game and is pretty straight forward. From here you have two choices:

  1. Stick with the naming conventions and simply import your own mesh, this will still need to be skinned but it's the fastest way to get a custom flyer into your game. Limiting you to only one flyer.
  2. Use the model, unrealscript and rig as a template and add your very own flyer.
I'm going for 2 as I want more than one flyer, 1 is easy enough and the skinning is also straight forward (and covered below.)

Firstly you need a nice low poly model, I opted for this little fella from Bitgem.

I stripped out any unwanted bones until I was down to just a series of meshes then combined them together.

In 3DS Max go to the create tab then click the 'Systems' button. Underneath you should now see 'Bones'.

Click the 'Bones' buttons, the click and drag in the viewport, click again and this will create two bones
Hit DEL to delete the last one.
Press 'w' and select the bone, making sure there's only one, now zero out all the x,y,z position then press 'e' and zero out all of the rotations.
Back to 'w' and position the main bone centrally to your model.
Name the bone 'Main'

Shift drag the bone to create a copy and name it 'Lt_Rotor'
Position this bone, back and left of your model
Shift drag the bone to create a copy and name it 'Rt_Rotor'
Position this bone, back and right of your model
Shift drag the bone to create a copy and name it 'Rt_Canard'
Position this bone, front and right of your model
Shift drag the bone to create a copy and name it 'Lt_Canard'
Position this bone, front and left of your model

Link all bones to the 'Main' bone by clicking on the link button then click and dragging from the child to the parent ie the 'Rt_Rotor' to the 'Main' bone. See the video I found and posted here.
Save your progress.

Select all the verts
Add a Skin modifier to your Editable Mesh
Underneath Bones: click Add and add the 'Main' bone
Click 'Edit Envelopes'
Click 'Vertices' underneath 'Select' and select all of the vertices on your model
Use the weight tool to make sure that all the verts are weighted 1.0 to the 'Main' bone
Click Edit Envelopes again to get out of this mode and select the 'Main' bone

Export the model, SK_VH_Plane
SK Skeletal Mesh
VH Vehicle

In geometry enable smoothing groups and turbo smooth and enable Embed Media under Embed Media.
Click OK

Go over to UDK and import this into UDK
Enable Explicit Normals
Import Materials and import Textures

From here you can drag and drop him from the content browser into the editor and see how he'll look.








1 comment:

  1. At first I was trying to export as OBJ..
    So for anyone who gets confused like me, the export format is .FBX which should be the default export format in 3DS.

    ReplyDelete