The Tutorial - The Import |
|
Now we get onto socket information. Sockets are like slots on your model that are hardcoded into the engine to represent certain aspects of the game. You can add to these of course in Unrealscript, but we will be sticking to the 16 needed in order to get your character working. An example is telling the engine where the gun is to go on your model. We know it goes where the Bone_Weapon is, the engine does not. So lets give it an education in 'Dude, Where's my gun 101'. Open up the Attach Rollout in the Mesh Tab in the Animation Browser. Open the Sockets rollout, it won't have any by default and that's good. A clean slate for you to mess up :) Click on the Sockets slot and press Add. A new socket will come up, make sure it is expanded so you can edit the following slots to the following in blue. AttachAlias righthand THe other options are as they imply. You can move the socket and rotate it's pivot in the engine so as to tweak the information within the engine. This way you can have one bone with many sockets, although each socket can have different placement and rotation refereing to the bone for movement. This comes in handy if a pivot is wrong in your model, or you want multiple attachments to a bone without having to make multiple boones in the first place etc. There are many uses. Also note you must set the ApplyNewSockets slot to TRUE each and every time you want to apply a change to the socket information. If you forget to do this something you did still may not count and you'll get frustrated and call me up in the middle of the night complaining I taught you everything wrong and your world is falling apart and you have 5 kids to feed and a mortgage to pay and a dog that needs vaccinating, and... By the way....don't do the latter... In this case we have just designated the bone Bone_Weapon in our mesh as the weapon socket. the righthand AttachAlias is hardcoded into the engine as the one to hold the gun. You could hawever make any bone in your mesh assigned to the righthand AttachAlias if you so wanted. We could now go and test our character in game to find that a) he is holding the gun and b) it is facing the wrong way! (dammit!) I can a) fix this by editing the pivot in MAX and reexporting the mesh or b) rotate and move the gun's socket information in the engine. I'm going to do that to show you just how cool it is. Cos it is you know...cool. Like ice even. Which is, in fact, quite cold. |
![]() |
To set the angle of my weapon right I am going to use myself as reference in order to line it up. While still in the socket information slot, click in the TestMesh slot and add SkeletalMesh'Weaver.Weaver' with your own info to link to your character. Once down your model should turn up...and depending on what your end result was in regards to how your Bone_Weapon was aligned, you model will now be visible. We need to straighten this guy out. So using the previously covered rotation amounts tweak the test mesh to suit. The end result may look a little odd, I admit, but it tells me what I need to know. I save. I test. I grimace. I tweak. I save. I test. Repeat as necessary. I save. I test . I smile in triumph. I move on. |
![]() |
Now we need to fill out the other 15 sockets. I will write up a text document instead in order to make it more accessible to print as it comes in handy. It includes the AttachAlias, Bonename and what each is used for. You can get it here. Once that has been done you can test it once more (although it probably won't act that much different until you start getting more animations imported) and you get something like this! See, now we are getting somewhere. Ain't it cool! I also used this screenshot for a temporary Bio pic. So I quickly saved a 256x512 crop of that and imported it, converted it and edited the .upl to suit. |
![]() |
|
|