1 / 87

Sega 500

Sega 500. Importing a Model, Giving shape to our Boomstick. Jeff “Ezeikeil” Giles jgiles@artschool.com http://gamestudies.cdis.org/~jgiles. To Date….

tim
Télécharger la présentation

Sega 500

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Sega 500 Importing a Model, Giving shape to our Boomstick Jeff “Ezeikeil” Giles jgiles@artschool.com http://gamestudies.cdis.org/~jgiles

  2. To Date… • We’ve really focused on medaling with the functionality of UT, but not so much about getting in custom items to make our toys look different.

  3. Today’s Goal • We’re going to fix that, we’re going to make some basic changes to one of the weapons and import a new mesh for it. • Thus giving the impression that we are not playing UT…hopefully.

  4. Today’s Goal • I’ve managed to get my mitts on a a model of a .45 Thompson which we’ll import to use as the 1st person model. • We’re also going to whip up some basic functionality for it, like a 32 round magazine which, once spent… the firing pauses for a reload.

  5. What today is • We’re going to look at the assets as we would expect to receive them and work with those. • Hence, we’ll look at the formats and assets as we would expect to get them and …

  6. What today isn’t • Since this is not a modeling class, we’re not going to look at how to build stuff in max or maya… That’s why god created designers. 

  7. What’s needed • Well, obviously, we need a model to import. • This is what one of my friends created for this demo.

  8. What’s needed • Once the model has been created in one of many modeling packages, it gets exported into a format that we can work with. • Which for UT2003 is a PSK and maybe a PSA file.

  9. What’s needed • So then, what the heck are these then? • The PSK file • The mesh is exported to a psk file. This file defines the mesh geometry and skeleton. • When you export the model, ActorX generates a log file titled X_ModelInfo_(modelname).

  10. What’s needed • The PSA file • This file stores the animation data. When you export the animation, ActorX generates a log file titled X_AnimInfo_(modelname). The log file lists all the sequences that will be imported into Unreal Warfare. • Note: if you let ActorX generate the unrealscript file and click the explicit sequence list checkbox, all the sequences will be listed

  11. Importing the Model • Right, now that that’s out of the way, time to go about importing the model…and we have 2 choices on how to do it. • Via UTED or Script…We’ll look at both.

  12. Importing the Model from UTEd • Starting with the editor… • Open up UTEd and spark up the animations browser.

  13. Importing the Model from UTEd • Which should present you with this window: Properties Animations list View window Play / view controls

  14. Importing the Model from UTEd • There’s quite a list of buttons across the top of the window too…but we’ll deal with them in a little bit. • For now select the file pull down in this window and select Mesh import.

  15. Importing the Model from UTEd • Navigate to where you have you PSK file for your model. And select it.

  16. Importing the Model from UTEd • Which presents us with the naming dialogue…just name your model appropriate • Of course being cautious of name collisions.

  17. Importing the Model from UTEd • And poof it’s in! • Sort of...it’s got that butt-ugly-rotten-cottage-cheese texture again.

  18. Importing the Model from UTEd • Don’t panic…This is not big deal if the designer modeled it properly. • It should have all it’s UV coord’s with it. We just need to set its texture which needs to be imported to a UTX separately.

  19. Importing the Model from UTEd • Simply import these into the editor as usual. The weirdness happens when we set them to our model.

  20. Importing the Model from UTEd • Under the mesh properties on the right hand side, we can set out material to our model. • In this case, the designer has provided 2 textures which is fine.

  21. Importing the Model from UTEd • All we do is select one of the desired textures for our texture browser. • Then select one of the material indexes and hit use.

  22. Importing the Model from UTEd • Et-Voila! One partially textured Tommy gun. • Simply repeat the process for the other texture to complete the job.

  23. Importing the Model from UTEd • And once again, don’t forget to save your UKX package or you’ll have to repeat the process.

  24. Making it Work • So now that the model is in, time to make it work. • So the plan is to start simple and build a simple 32 round magazine.

  25. Making it Work • Most of this is really similar to the functionality we created for our own custom weapons and we use several of the same class derivations.

  26. Making it Work • We need the following classes: • A weapon • Fire mode • And a pickup class • Just for the basics…Any additional functionality is up to you.

  27. Making it Work • The weapon we derive most of the existing functionality from the assault rifle class… but there’s a few things we don’t want…like the grenade launcher. • So some of the functionality has to go away.

  28. Making it Work • In short, these 3 functions need to be turned into stubs simulated function DetachFromPawn(Pawn P) simulated function DrawWeaponInfo(Canvas Canvas) simulated function float ChargeBar()

  29. Making it Work • And at this point, we don’t have any animations to attach to the Tommy. So to be save and prevent some “accessed none’s” from IdleAnim=none//Idle RestAnim=none//Rest AimAnim=none//Aim RunAnim=none//Run SelectAnim=none//Select PutDownAnim=none//Down happening, we setour animations to none so nothing plays.

  30. Making it Work • And lastly set up our pickup class and draw mesh. PickupClass=class'TommyGunPickup' Mesh=mesh'TGun.Tom'

  31. Making it Work • Nothing fancy for the pickup mesh, just set up some defaults • We’ve now got he bare minimum to get the model into the game... InventoryType=class'Tommygun' PickupMessage="You got the 45 Thompson" PickupForce="TommygunPickup"

  32. Making it Work • And if all has gone well and you’ve been cautious of name collisions, you should get:

  33. Making it Work • Now, you can almost guarantee that you’ll have to spend some time tweeking the placement numbers to make sure it looks right.

  34. Making it Work • The easiest way to line this up with your view port is to set the placement numbers in the editor, resave and give it another run. • …then repeat the process until you have it where you want it.

  35. Making it Work • Now, I’m absolutely sure that there has to be a better way to line this up, but I have yet to find any substantial documentations on bringing in weapons models for UT2003.

  36. Other Hints • Make sure it’s models at or near the origin ( 0, 0, 0) when you export from your modeling environment or you may have a hard time finding where it’s being rendered in game.

  37. Other Hints • Orient it in the same direction as the other weapons in UT. ( I know this sounds like common sense, but it easy to forget.)

  38. Other Hints • Ok, so we’re almost ready to change how it works…but first, better check that it some basic functionality…. • …yeah seems to shoot fine…

  39. Other Hints • But if we turn and fire, we get this weirdness. • The muzzle flash is not aligned to the gun.

  40. Other Hints • What’s happening is something that is really important to have done properly on the modeling side. • …and that’s to have your weapon properly “boned”.

  41. Other Hints • So, in our case, the Tommy gun is trying to set it’s attachment to the “tip” bone…but not finding it. • This is another thing that really important to getting your weapon to work properly.

  42. Other Hints • Open the animations browser in the editor and have a look at the assault rifle, then hit the “view bones” button.

  43. Other Hints • What we get is a view of this pile of spaghetti… which is all the bones in the assault rifle. • Doesn’t really tell us much…

  44. Other Hints • But if we hit the clear groups button, we get all the names of these bones. Hmmm…don’t see a bone named “tip”.

  45. Other Hints • Well actually there is one there…well…sorta. • Bones can have aliases…in this case ours is tip and the actual name is Bone_Flash

  46. Other Hints • In our case, I simply had the bone named tip in the 3DS max and appropriately placed at the end of the barrel. This worked fine. 3DS Max 5

  47. Other Hints • However, this method didn’t allow us to view the sockets in UTEd, but it works.

  48. Other Hints • Now if we open up with the Tommy gun now, the attachment should stay oriented away from us.

  49. Other Hints • I spent a considerable amount of time on the net looking for information on how our weapon bone system should be set up and bound to the mesh, but found nothing. • Hence, this may not be the 100% correct way, but does the job.

  50. Yet…There is hope. • Ok, as mentioned placing the gun via the editor is more than a bit of a pain… • Fortunately however, there is the online community…

More Related