'3D Studio MAX'

.
"Low Poly Character"by Matt Marshall


If you are skipping ahead from the texture tutorial this is the bit where you continue on. If you have been following this page by page this is where we get back to importing our textures into the Unreal Editor.

So open up the editor, welcome to your new...er...best friend. Say Hi, maybe go for a walk with it. Introduce it to your parents. All done? Good, moving on.

When you open up the editor you get two windows. One has lots of information, the other has lots of information...with tabs. We are working in the window with the tabs :) It should have Textures | Actor Classes | Meshes | Animations | Static Meshes | Prefabs | Groups | Sounds | Music

The ones you will be working with are Textures and Animations mostly. If this window ISN'T up, simply click on View | Texture Browser in the Main window with the tool bar and viewports to pull it back up.

Click on the Textures Tab if it isn't already selected. Go to Import. Select all the images you are importing and go Open. The following window comes up.

The package input is the package name which results in a .utx file. The Group input is an extra level of organisation if you require it, but for the instant of our one character we won't use it. And the Name input is the name of the texture. This is important, as you will use this in the .upl file.

The check boxes down the bottom I generally leave alone. Once you have renamed your package, either hit OK all to carry it through all your imported textures, or go it one by one with just OK.



Before moving on we will save the package...so go Save from the File menu and save it into the textures folder in your UT2004 game folder. This should be the default save point anyway. Once we have our character in game and working we will save it out as a full package for distribution, but it all has to be saved into the right locations for it to work. So note that .utx's go in the Textures folder.

Next we will convert our images to the right format. In this instance we will use the DXT1 format. THis format uses NO transparency. Seeing as we don't need it, we won't use it. Saving disk space.

DXT3 by the way, is having one level of transparency. Either on or off. Much like a transparent Gif. This is a good format if you want medium file size and transparency...at the cost of transparency quality eg. jagged edges along the transparent areas.

DXT5 is the real deal. It has full transparency so you can have all the levels that make smooth transparencies from solid to see through...although these files can get pretty big.

Right mouse click on each of your images and roll out the Compress > rollout. Select DXT1. THe information underneath your image should reflecty the change from RGBA8 to DXT1.

By doing this I just saved about 11MB of information :) I know this, cos I just resaved and warned me of the difference. Isn't that nice of it? :)


Open up the Animations Tab. Then, I want you to stand up and hop on one foot three times...

*ahem* Moving along...

In my last tutorial with default rigs (with the space Marine) we copied the properties from other characters. This time I will be doing it completely from scratch. To show you the process involved, and the areas needed in doing so.

Firstly we need to import our .psk. Go to File | Mesh Import and select your .psk that you created from MAX earlier. Enter your wanted package name for the animations file (it is recommended to have a different package name for your animation file than your texture file) , Name your creation if you want something seperate to what you imported it as and select OK.

It should come up that you have a new object and a big green hunk of junk should come up. Mine is oversized...significantly...due to my unit settings in MAX. You can however edit the size of your character in the editor simply by tweaking some variables. By loading up the Jugg.utx file I could compare the two in size until I got it right.

I also had to move the root bone of my character into the centre line of the grid...similar to the default characters (like jugg.ukx) so I simply edited the translation information to suit. You may need to test the result in game to be sure his feet are on the ground and his size is what you want him to be. But as you can see it is easily editable. I also needed to rotate him, so I did that using the correct numberology of 90 degrees being the equivalent of 16384.

When it comes to rotation in Unreal, it doesn't believe in 90 degrees like most people on the planet. I think it has something to do with being one step closer to talking with the machines. They have to use a number such as 16384...so the following info may be useful to you.

90 degrees = 16384
180 degrees = 32768
270 degrees = 49152
360 degrees = 65536

The Terminator would be proud.



Next we will apply our textures.

Select the Textures Tab in the Editor Browser and click on the 1st texture. Go back to the Animations tab and open up the Skin rollout at the bottom of the Mesh Tab to the right of the window, then open the material rollout.

If you have exported your character correctly you will have all your material channel slots there. If you only have one, and you should have more you may not have applied a sub-object material to your character. Remember that you need to apply this in order for the multiple channels to get exported properly. Also note that the texture names ARE important when you export it. Only the first 2 channels in UT2004 are defineable in the .upl (more on that later) and only the first 2 channels are used in team colours.

So make sure you use the following in order of the skins you want to be used inside MAX. SKIN00, SKIN01 and SKIN02.

Click on the top texture slot and hit the Use button. The material you had selected in the textures tab should then apply to the right channel. If not move down the slots until it does.

Repeat as necessary.



After that we get to import our initial animation set.

Got to File | Animation Import and select the .psa file we created earlier consisting of all the idle animations. Make sure all the info is correct and go OK.

Animation Append by the way...is when you want to add animations to the set that is already imported.

Unreal can be a tad flakey with linking animations...but generally if you hit the play button and reselect the animations a couple of times it'll work :) Down near the play button ( middle left ) you have repeat or non repeat as well in order to see if your animation loop well. Handy to use. If you put our animation on loop and play you will notice it looks stupid...well, fast stupid. Not stupid stupid. So we will have to slow it down.

You also need to make sure that your file relates to the Animation set properly. The animation set is created when you name your first animation import.You can either type MeshAnimation'Yourfilename.YourAnimationSet' in the Mesh Tab under the Animation rollout in the Default Animation slot. In my case it ended up being MeshAnimation'Weaver.Weaver'. Click in the slot and press Use for good measure.

You can set the speed of each animation in the Sequence Tab in the Animations Browser (Top Right) under Sequence Properties called Rate. Simply change this to suit your animations. For best results, see your doctor. Do this for all your animations.

Go to File | Save and save your character (don't forget...a different name than the texture package)




3DTotal Advertisement - We need your support!

As well as you tutorial hungry people eating through a terabit of bandwidth each month we also have many additional staff and running costs involved in creating these free pages. We want to continue bringing you many free tutorials and resources everyday, so PLEASE check out our products and amazon affiliate schemes via the above banners. Many thanks!




Now we get to do a quick test of the character in game to see how it is panning out.

But first we need to edit the xplayerL1.upl file in order to get the game to find our new character. any text editor can do it (however if you use notepad it will put a .txt after the filename by default...so watch for that). Also note that the line is ONE line with NO breaks. I have broken it up here however to fit inside the frame. Use wordwrap if you need to but make sure not to have returns.

The xplayersL1.upl file can be found in the UT2004 System directory. Once open it is full of things that look like this...

Player=(DefaultName="Malcolm",Race="ThunderCrash",Mesh=HumanMaleA.
MercMaleD, species=xGame.SPECIES_Merc,BodySkin=PlayerSkins.
MercMaleDBodyA,FaceSkin=PlayerSkins.MercMaleDHeadA,Portrait=
PlayerPictures.cMercMaleAD,Text=XPlayers.MercMaleDA,Sex=Male,
Menu="MALCOLM",Tactics=2.0,StrafingAbility=+2.0,Accuracy=0.5,BotUse=1)

This is all the information that the Unreal editor needs to reference all it's material. I will pull it apart bit by bit with the bits you would edit in blue, and the orange as optional:

Player=( = This starts of the players information section

DefaultName="Malcolm" The text inside the commas is the characters name in the selection screen

Race="Thundercrash" Extra information found in the selection screen (I believe)

Mesh=HumanMaleA.MercMaleD This is important in that it links to the mesh your model uses. The full stop within the link is in relation to filename, group name and character name. So if you had used a group you would be needing another full stop to break it up.

species=xGame.SPECIES_Merc This relates to species traits in species related game types (to my knowledge) This would be optional...although change it to something similar to the defaults. Look through the xplayersL1.upl for other examples.

BodySkin=PlayerSkins.MercMaleDBodyA The first skin channel of two. Once again it uses the Filename.Group.Texturename naming system

FaceSkin=PlayerSkins.MercMaleDHeadA The second skin of two defineable in the .upl. It uses the Filename.Group.Texturename naming system as well.

Portrait=PlayerPictures.cMercMaleAD This image is something you will need to make up to act as a portrait in the selection screen. It is a 256x512 image that you would import into your texture file and reference like the other textures.

Text=XPlayers.MercMaleDA This is the text that comes up describing your character once selected. You would need to edit the Xplayers.upl file to do so (I will have to test whether or not it can use an external file)

Sex=Male,Menu="MALCOLM",Tactics=2.0,StrafingAbility=+2.0,Accuracy=0.5,BotUse=1)
This is all generic stuff I rarely play with. If anything I take them out. But if it doesn't work. you can always put them back in. Look at other examples in the .upl to see if you find anything useful.



     
Page 33
     

 


3D Total Homepage