sega 500 how to get stuff into ut2003 jeff “ezeikeil” giles [email protected] jgiles

74
Sega 500 How to get stuff into UT2003 Jeff “Ezeikeil” Giles [email protected]

Upload: judith-greene

Post on 29-Dec-2015

212 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Sega 500 How to get stuff into UT2003 Jeff “Ezeikeil” Giles jgiles@artschool.com jgiles

Sega 500

How to get stuff

into UT2003

Jeff “Ezeikeil” [email protected]://gamestudies.cdis.org/~jgiles

Page 2: Sega 500 How to get stuff into UT2003 Jeff “Ezeikeil” Giles jgiles@artschool.com jgiles

To date

We’ve covered lots of building functionality for UT, even imported some items.

However, we’ve not covered how to export objects from a modeling environment and then import them. We’ve only look at them in the expected format.

Page 3: Sega 500 How to get stuff into UT2003 Jeff “Ezeikeil” Giles jgiles@artschool.com jgiles

And so…

Today we are going to be playing around in 3DS max and create some simple static meshes and import those, along with appropriate karma collision volumes.

Page 4: Sega 500 How to get stuff into UT2003 Jeff “Ezeikeil” Giles jgiles@artschool.com jgiles

Plus…

We are also going to create a simple character model and import that along with some basic animations.

Now keep in mind, I’m a programmer Jim, not a 3D modeler.

Page 5: Sega 500 How to get stuff into UT2003 Jeff “Ezeikeil” Giles jgiles@artschool.com jgiles

Step one

We’re going to jump into 3DS Max and create one of the staples objects in 3D games…

The simple crate.

Page 6: Sega 500 How to get stuff into UT2003 Jeff “Ezeikeil” Giles jgiles@artschool.com jgiles

But first…

A simple modeling tip for UT.

Your average player character stands about 90 UU’s tall. Knowing this, if we set the units in 3ds max to generic, we can export at a one-to-one scale.

Page 7: Sega 500 How to get stuff into UT2003 Jeff “Ezeikeil” Giles jgiles@artschool.com jgiles

A Modeling tip for UT

E.g., if we want the crates to be about 2/3’s the height of the pawn, we build them in Max at about 60 generic units.

Thus when imported into UT, the will be 60 UU’s high…exactly 2/3’s the pawns height.

Page 8: Sega 500 How to get stuff into UT2003 Jeff “Ezeikeil” Giles jgiles@artschool.com jgiles

A Modeling tip for UT

You’ll find this setting under the Customize roll down under units setup.

Set to generic units

Page 9: Sega 500 How to get stuff into UT2003 Jeff “Ezeikeil” Giles jgiles@artschool.com jgiles

Now like I said…

This class is more about scripting and mod authoring as opposed to modeling, so I’m not really going to talk about the modeling process in any detail.

However, we will go through the process here in class as there are some interesting things we really should be aware of.

Page 10: Sega 500 How to get stuff into UT2003 Jeff “Ezeikeil” Giles jgiles@artschool.com jgiles

This being the case…

Lets start the process.

Here’s the basic shape we are after.

This is made up from actually “2” objects

Page 11: Sega 500 How to get stuff into UT2003 Jeff “Ezeikeil” Giles jgiles@artschool.com jgiles

The reason being…

Is that UT actually supports multi skinned objects.

If you take look at the pawns defaults in the editor you can see that this is the case.

Page 12: Sega 500 How to get stuff into UT2003 Jeff “Ezeikeil” Giles jgiles@artschool.com jgiles

Multi skins

One for the body, and one for the head. Now, I’m not sure how many each model is

allowed, but I’m thinking several.

Page 13: Sega 500 How to get stuff into UT2003 Jeff “Ezeikeil” Giles jgiles@artschool.com jgiles

Multi skins

This being said, I’ve created my crate out of 2 objects so that it’s really easy to set up the Multi skins.

Now there are several ways to do this via the editor, this is just one possible method.

Page 14: Sega 500 How to get stuff into UT2003 Jeff “Ezeikeil” Giles jgiles@artschool.com jgiles

Multi skins

In effect, each skin will have it’s own set of UV’s and then I did a boolean operation on them (union) to form a single object.

Once textured and the UV’s properly set up, we are ready to export from the modeling package.

Page 15: Sega 500 How to get stuff into UT2003 Jeff “Ezeikeil” Giles jgiles@artschool.com jgiles

Which leads me to why…

I chose to demonstrate this in 3DS Max for a couple ofreasons. First off, I’m far more comfortable with it than

Maya…but this is a personal preference. Second, UEd has tools build in which allow for

direct import from 3DS Max, making the process super straight forward.

Page 16: Sega 500 How to get stuff into UT2003 Jeff “Ezeikeil” Giles jgiles@artschool.com jgiles

Exporting from Max

From the file roll down, pick export or export selected.

The for the file format, we want ASE.

Page 17: Sega 500 How to get stuff into UT2003 Jeff “Ezeikeil” Giles jgiles@artschool.com jgiles

Exporting from Max

Which will present use with this popup:

I’ve found using the default settings to work just fine.

Page 18: Sega 500 How to get stuff into UT2003 Jeff “Ezeikeil” Giles jgiles@artschool.com jgiles

Importing into UT

To get this static mesh into UT is just about as easy as the export.

From the static mesh browser, under file, select import. Then the file you just exported from UT.

Page 19: Sega 500 How to get stuff into UT2003 Jeff “Ezeikeil” Giles jgiles@artschool.com jgiles

Importing into UT

Next is the naming for the imported object.

Done in exactly the same manner as textures…

Page 20: Sega 500 How to get stuff into UT2003 Jeff “Ezeikeil” Giles jgiles@artschool.com jgiles

Importing into UT

And Bob should be your uncle.

Complete with the rotten cottage cheese texture.

Page 21: Sega 500 How to get stuff into UT2003 Jeff “Ezeikeil” Giles jgiles@artschool.com jgiles

Importing into UT

But check this out:

If you roll out the materials section, we have 2 materials which can now be applied to this object.

Page 22: Sega 500 How to get stuff into UT2003 Jeff “Ezeikeil” Giles jgiles@artschool.com jgiles

Importing into UT

Now just import the textures into UT as well.

Be sure to save both the utx and usx packages.

Page 23: Sega 500 How to get stuff into UT2003 Jeff “Ezeikeil” Giles jgiles@artschool.com jgiles

Importing into UT

Assign the new textures to the desired materials for the static mesh and save out.

Now, be for warned, the image will not refresh until the package is saved!

Page 24: Sega 500 How to get stuff into UT2003 Jeff “Ezeikeil” Giles jgiles@artschool.com jgiles

Crates into the game

Once this is all done, we can simply start placing crates into the level.

Page 25: Sega 500 How to get stuff into UT2003 Jeff “Ezeikeil” Giles jgiles@artschool.com jgiles

However…

There are a few things to point out. To begin with, these particular crates are

way too heave on the poly count…400 of them.

I put zero effort into optimising this as that a topic best left for a modeling class.

Page 26: Sega 500 How to get stuff into UT2003 Jeff “Ezeikeil” Giles jgiles@artschool.com jgiles

However…

And, yeah, they ARE static meshes which means we get all sorts of performance increases like a small memory foot print.

But UT still has to render all these poly’s. So we really should be concerned with optimising where we can.

With a little effort, I’m sure we could cut this number in half and have it still look just as good.

Page 27: Sega 500 How to get stuff into UT2003 Jeff “Ezeikeil” Giles jgiles@artschool.com jgiles

And…

There’s a small problem.

They have no collision parameters…

Page 28: Sega 500 How to get stuff into UT2003 Jeff “Ezeikeil” Giles jgiles@artschool.com jgiles

Adding simple collision

Is actually quite easy.

Since this is a simple shape (a box) we can do this right inside UEd.

Now there are a couple of was to do this, and you can find about about all of them here:

http://udn.epicgames.com/pub/Content/CollisionTutorial/

Page 29: Sega 500 How to get stuff into UT2003 Jeff “Ezeikeil” Giles jgiles@artschool.com jgiles

Collision for our crate

Default properties of how the collision model is used:

Page 30: Sega 500 How to get stuff into UT2003 Jeff “Ezeikeil” Giles jgiles@artschool.com jgiles

Collision for our crate

If you look at the top of the static mesh browser, there a tab for collision tools.

if you pull it down you see a bunch of references to K-Dop.

Page 31: Sega 500 How to get stuff into UT2003 Jeff “Ezeikeil” Giles jgiles@artschool.com jgiles

About K-Dop

Best suited for simple collision models, you can use this fitting tool.

K-DOP stands 'K discrete oriented polytope‘.

Basically it takes 'k' axis-aligned planes and pushes them as close to the mesh as it can. The resulting shape is used as a collision model.

Page 32: Sega 500 How to get stuff into UT2003 Jeff “Ezeikeil” Giles jgiles@artschool.com jgiles

In other words

We can use it to build simple collision models for your static meshes.

Page 33: Sega 500 How to get stuff into UT2003 Jeff “Ezeikeil” Giles jgiles@artschool.com jgiles

In this case

K-Dop 6 will work just fine for us.

Doing so will build a very simple collision cube right around our crate.

You can view this volume by selecting show collision under the view tab.

Oh…be sure to save…

Page 34: Sega 500 How to get stuff into UT2003 Jeff “Ezeikeil” Giles jgiles@artschool.com jgiles

And that should do ya

Yup!Seems to work!

Page 35: Sega 500 How to get stuff into UT2003 Jeff “Ezeikeil” Giles jgiles@artschool.com jgiles

Now what fun are crates…

If you can’t smash them to find stuff inside.

Page 36: Sega 500 How to get stuff into UT2003 Jeff “Ezeikeil” Giles jgiles@artschool.com jgiles

More collision

I’m showing you this part because sometimes the K-Dop collision, as good as it is just simply will not do.

If I were to use it here, I would end up with an invisible plane which I would collide with across the top of the smashed crate.

Page 37: Sega 500 How to get stuff into UT2003 Jeff “Ezeikeil” Giles jgiles@artschool.com jgiles

Fancy collision

I wouldn’t get something like this:

Page 38: Sega 500 How to get stuff into UT2003 Jeff “Ezeikeil” Giles jgiles@artschool.com jgiles

In effect,

We model separate collision parameters for our smashed crate.

Now we can’t just copy the object and use that as collision, once it gets over a certain size, it stops working.

You ideally want to keep the poly count below 10, certainly under 100 for karma collision.

Page 39: Sega 500 How to get stuff into UT2003 Jeff “Ezeikeil” Giles jgiles@artschool.com jgiles

Mine crates collision

Weighs in at a heavy 28 poly’s…but it works fine.

Once again, I spent no time on optimising this.

Page 40: Sega 500 How to get stuff into UT2003 Jeff “Ezeikeil” Giles jgiles@artschool.com jgiles

So how did I…

Get these collision parameters from Max into UT?

Well, the boys at Epic actually build a parsing mechanism which looks for objects with a specific prefix in their name.

Page 41: Sega 500 How to get stuff into UT2003 Jeff “Ezeikeil” Giles jgiles@artschool.com jgiles

Here…

All I had to do was model a lower poly version of the smashed crate which approximated the dimensions of the original.

Placed it at exactly the same location and lined them up as close as possible.

Page 42: Sega 500 How to get stuff into UT2003 Jeff “Ezeikeil” Giles jgiles@artschool.com jgiles

Then…

I renamed named the model which was to be the karma object to MCDCX_Box.(case sensitive ) And then exported it just like I did before into an ASE file.

When you import the .ASE into UnrealEd it should find the collision mesh, remove it from the graphic, and turn it into the collision model.

Page 43: Sega 500 How to get stuff into UT2003 Jeff “Ezeikeil” Giles jgiles@artschool.com jgiles

And scripting this up

Is nothing more than if the crate takes damage, swap the meshes and spawn the pickup…real easy stuff.

And since the code aspect is so easy, I’ll leave it for you to figure out.

Page 44: Sega 500 How to get stuff into UT2003 Jeff “Ezeikeil” Giles jgiles@artschool.com jgiles

But we’re not done yet!

We’re going to wrap up the rest of the class by looking at what it takes to import character models, complete with animations, into UT.

Starting with:

Page 45: Sega 500 How to get stuff into UT2003 Jeff “Ezeikeil” Giles jgiles@artschool.com jgiles

Pacman

Like I said, I’m no artist ;-)

Page 46: Sega 500 How to get stuff into UT2003 Jeff “Ezeikeil” Giles jgiles@artschool.com jgiles

Keep in mind…

I’m not going to go into detail on how to animate this guy. Just how to get it into UT along with a basic walk, run…and with any luck (time permitting) an idle.

Page 47: Sega 500 How to get stuff into UT2003 Jeff “Ezeikeil” Giles jgiles@artschool.com jgiles

On a side note…

If your interested in using or looking at how epic set up their models, you can get the make files from my P drive or download them from fileplanet:

http://www.fileplanet.com/dl.aspx?/planetquake/polycount/Tools/ut2k3/ut2k3_characters.zip

Page 48: Sega 500 How to get stuff into UT2003 Jeff “Ezeikeil” Giles jgiles@artschool.com jgiles

Getting started…

Well, we really only need three things to get Pacman into UT. A model A texture One bone (minimum for the weapon. However

we can also include the one for te derez effect too.)

Page 49: Sega 500 How to get stuff into UT2003 Jeff “Ezeikeil” Giles jgiles@artschool.com jgiles

Once you’ve got your model

We need to put a bone in it so the UT knows where to attach the weapon to the character.

This bone also denotes the weapons orientation.

Page 50: Sega 500 How to get stuff into UT2003 Jeff “Ezeikeil” Giles jgiles@artschool.com jgiles

Adding the weapon bone

Place the bone anywhere you want in the model, keeping in mind that the fat end of the bone is the “Business” end.

Page 51: Sega 500 How to get stuff into UT2003 Jeff “Ezeikeil” Giles jgiles@artschool.com jgiles

Now before we animate

We need to group the bone with pacman so that UT knows they are the same object.

Just hit the group roll down and click “group”.

Page 52: Sega 500 How to get stuff into UT2003 Jeff “Ezeikeil” Giles jgiles@artschool.com jgiles

Now we can animate away

For the walk, we’re just going to do a simple bouncing up and down motion.

To get started, hit the autokey button to go to animation mode. When selected, it should turn red.

Page 53: Sega 500 How to get stuff into UT2003 Jeff “Ezeikeil” Giles jgiles@artschool.com jgiles

Now move Pacman around

With each move folowed by the release of the left mouse, Max will drop a keyframe onto the timeline, indicating Pacman’s position in that frame.

To stop animating…just click auto key again.

Page 54: Sega 500 How to get stuff into UT2003 Jeff “Ezeikeil” Giles jgiles@artschool.com jgiles

Now your timeline

Should look some thing like:

And if you’ve done it right, as you move the time bar, Pacman sould bounce up and down.

StartTop of bounce

Back at start pose

Time bar

Page 55: Sega 500 How to get stuff into UT2003 Jeff “Ezeikeil” Giles jgiles@artschool.com jgiles

Which means…

We are now ready to export Pacman and his walk animation.

To do se, we need to use actor X which should be included in Max already.

Click on the tab with the hammer on it...then the more button.

Page 56: Sega 500 How to get stuff into UT2003 Jeff “Ezeikeil” Giles jgiles@artschool.com jgiles

Then

Pick ActorX out of the list.

With this tool we will export both the mesh file (.psk) and the animation file (.psa).

Page 57: Sega 500 How to get stuff into UT2003 Jeff “Ezeikeil” Giles jgiles@artschool.com jgiles

ActorX

The actorX menu is really broken into two areas of functionality to reflect this.

The top half is for the mesh,

and the lower, Animations.

Page 58: Sega 500 How to get stuff into UT2003 Jeff “Ezeikeil” Giles jgiles@artschool.com jgiles

ActorX

The Mesh exporter is pretty self explanatory

However you will have to go into the setup tab and make sure “all textured Geometry” is ticked for it to work.

When your ready, save the mesh.

Page 59: Sega 500 How to get stuff into UT2003 Jeff “Ezeikeil” Giles jgiles@artschool.com jgiles

ActorX

Now, when we start talking about exporting the animations, things can be a bit confusing the first time through.

In essence, we need a file name (no surprise there), the name of the sequence and what key frames is happens over.

Page 60: Sega 500 How to get stuff into UT2003 Jeff “Ezeikeil” Giles jgiles@artschool.com jgiles

ActorX

Here’s how we set up our walk animation for export.

The name should correspond to an existing animation name in UT. Ideally, you’d want to follow this naming convention.

Page 61: Sega 500 How to get stuff into UT2003 Jeff “Ezeikeil” Giles jgiles@artschool.com jgiles

ActorX

If you don’t, when you use the default controllers, your mesh will spit out accessed none errors for all the animations it can’t find.

Trust me…it’s a lot.

Page 62: Sega 500 How to get stuff into UT2003 Jeff “Ezeikeil” Giles jgiles@artschool.com jgiles

ActorX

An now we need to tell it what frames correspond to this animation…

This will be in exact correlation to the time bar.

walkF

Page 63: Sega 500 How to get stuff into UT2003 Jeff “Ezeikeil” Giles jgiles@artschool.com jgiles

ActorX

Once we’ve figured that out, we need to digest the animation.

Essentially ready it for export.

Then hit the Animation manager.

Page 64: Sega 500 How to get stuff into UT2003 Jeff “Ezeikeil” Giles jgiles@artschool.com jgiles

Digested Anims

Available anims Being exported

Page 65: Sega 500 How to get stuff into UT2003 Jeff “Ezeikeil” Giles jgiles@artschool.com jgiles

Digested Anims

Just move the animations you want to export over to the right hand side and hit save when your ready.

Note: On my home machine I had problems exporting more that 2 at a time. Anim’s after the 2nd would cause the mesh to rotate for some strange reason.

Page 66: Sega 500 How to get stuff into UT2003 Jeff “Ezeikeil” Giles jgiles@artschool.com jgiles

Now with PSA and PSK in hand...

We jump on over into UEd to import the them.

Stating with the mesh… Pull up the animations browser an hit

“mesh import”.

Page 67: Sega 500 How to get stuff into UT2003 Jeff “Ezeikeil” Giles jgiles@artschool.com jgiles

And you should see

Pacman

Don’t forget your textures ;-)

Page 68: Sega 500 How to get stuff into UT2003 Jeff “Ezeikeil” Giles jgiles@artschool.com jgiles

But no Ani’s

Yet…We need to import those as well. From the file roll down, “animation import“.

This should cause the Sequences list on the left hand side to populate.

Page 69: Sega 500 How to get stuff into UT2003 Jeff “Ezeikeil” Giles jgiles@artschool.com jgiles

But they still don’t play…

Don’t worry the animations are in…but they need to be linked to the model.

Just hit this button then save.

Page 70: Sega 500 How to get stuff into UT2003 Jeff “Ezeikeil” Giles jgiles@artschool.com jgiles

And now Pacman…

Should animate in the view window no problem.

For addition animations to add to the model, just use “animation append” under the file tab.

Page 71: Sega 500 How to get stuff into UT2003 Jeff “Ezeikeil” Giles jgiles@artschool.com jgiles

Getting Pacman into UT

The cool part is that we don’t need to code anything to get UT to use the new player model.

Just create a new upl file and set the mesh.

Page 72: Sega 500 How to get stuff into UT2003 Jeff “Ezeikeil” Giles jgiles@artschool.com jgiles

My upl file

And this should be all you need:[Public]Player=(DefaultName="MR. Pac", Mesh=Pcman.PC,

species=xGame.SPECIES_Merc,BodySkin=pcSkins.Skin,FaceSkin=pcSkins.Skin,Portrait=pcSkins.Skin,Text=XPlayers.MercFemaleAA,Sex=Female,Menu="SP",FavoriteWeapon=xWeapons.LinkGun,Accuracy=-0.1,Tactics=+0.5)

Page 73: Sega 500 How to get stuff into UT2003 Jeff “Ezeikeil” Giles jgiles@artschool.com jgiles

An now in UT

We should be able to select Mr. Pac from the players list…and in game have

Page 74: Sega 500 How to get stuff into UT2003 Jeff “Ezeikeil” Giles jgiles@artschool.com jgiles

Et Voila!

All the basics you’ll need to know about importing models, collision and character models into UT.