Complete guide for ripping of Static Meshes

 

Example: the Low-Poly pine tree of Antalus

 

Programs/tools used: UnrealEd 2.0 (UT), UnrealEd 3.0 (UT2004), Xnview, WR_PTXTool, MeshMaker, Microsoft Paint (yay), UMake

Note: With the exception of the PTX Tool you have to search and download the other tools by yourself.

 

This guide explains everything what you will need to know if you want to rip some static meshes from UT2004. This includes static meshes with more than as one used texture and also SM`s where you will later use Mask textures at the same time (mostly plants). Let us start.

BTW: I know my English is really bad, but I hope you can understand this anyway.

And keep in mind this is the way how I do it. It is surely possible to rip that stuff in a totally different way.

 

 

I opened the UnrealEd of UT2004, switched to the Static Mesh Browser and loaded “AntalusStatic.usx

(In this test room I added the Static Mesh called “AntTreeSmall)

 

 

Then I switched simply to the “in use” category of the textures browser to see what textures are now in use in the current map.

 

 

Rightclick on the “Branch shader” reveals that we will need

(AntalusTextures.All.cedarbranch)

 

Export this texture. Now we have to make use of the WR_PTXTool (originally intended for World Racing 2 mapping but also here very useful)

Copy that tool exe in the same folder where you exported the branch texture just some moments ago.

 

 

The current texture consists of 2 textures or however it can be described. The RGB texture and the mask texture (both together exists with the right compression in UT2004 [in this case DXT5] as an alpha texture, whatever, I am not a texture artist so my knowledge is here very limited).

 

Under Export you have now to export these both textures, BMP Image and BMP Mask, they should appear in the folder with the PTXTool exe. 

 

 

Next: Open the Mask texture (this black-white thingy) with Xnview. (at this point I should maybe mention that you can also make the mask channel visible over View > show mask, then you could make a screenshot and paste that in Xnview again, however, difficult with larger textures and sometimes annoying, you don’t need the PXT Tool really)

 

But however it does not matter which way you prefer, it's pretty much the same at the end.

The current textures consist of max. 256 “colours” This is the maximum amount of grey scales.

 

Note: If you want to scale down the texture for example from 1024 x 512 to 512 x 256, then do it now (Image > Resize).

You have to do that with the RGB texture, too.

 

Ok, what to do now. Image > Convert to Binary > Binary (No Dither).

After that only 2 grey scales remain (black and white).

 

Note: At this point it should be also mentioned that the texture will surely have now some pixel errors (meant that some white pixel will be somewhere where they should not be. It would be advisable if you rework the “Mask” texture a little bit in Paint.

You can also try to convert the 256 grey scale image to a 4 grey scale image for example. Estimate then yourself what grey scale should be black and which one should be white.

 

Convert it immediately back to True Colour and save.

 

 

Open this save texture file now in Paint and select two colours for the background from which you know they are not used in the RGB channel (for example blue and pink). But at the moment you need only one of these. Here it is blue (a basic colour from the colour palette below).

I have to assume that you know how you have to work with Paint because this is really difficult to explain (at least for me).

However in short for helpless noobs, I right clicked on the black background and selected then with a simple click on – like here – blue. “Ctrl + A” on your keyboard. Fill then the complete surface with blue, paste the texture again and de-select the last option under image (however this is called exactly in English, I have a German version of Windows XP). You can now paint a small area on the surface as like on the screenshot with pink. You will later know why we are doing this. Save!

 

Restart paint and open this mask texture again (sometimes useful because black and white will be reset as default colours). Select the complete texture again and paste it on the RGB colour. Important! De-select this last option under image again to have the following result:

 

 

Open this file in Xnview again: Image > Convert to Colours (256) and save.

Return to Paint and change that blue to pink, it should look like this:

 

 

(Why should I use now pink? Because it is used now in the colour palette, you remember? You saved in Xnview the image as 256 colour image).

 

Open this file in Xnview again: Image > Convert to Colours (256) and save. Yes, you have to do this now again.

Import now this texture in the editor, it does not matter which package because you don’t have to save that.

During import mark the “Mask” checkbox. If you made that all right, it should look like this, the texture is now masked.

Close now the UnrealEd without any saving!

 

 

So, what happened? With the first “Convert to Colours” you ordered the program to convert the image to 256 colours. Xnview selected the 256 most used colours and reduced in this way the amount of colours to 256. With the second converting – it seems at least – Xnview selected then the colour which is supposed to be in the game and the editor masked. In this case it is pink, not blue. I can not tell you why it works. Just accept it as it is. Ok this part is now done!

 

Now the other texture used as “bark” for the tree. This is simple: Export the dds-texture, open it with Xnview and convert it into 256 colours.

However, import those both textures into the Ed to export them again as pcx-textures.

 

From now on I will not say you why you have to do this and that, just do it! (I am slowly tired of this tutorial)

 

Locate your main Unreal Tournament folder and create a new directory called “AntalusTree”. In this new directory create 2 other ones, called “Classes” and “Models”.

Copy the two exported pcx texture files into your Models directory and rename them:

AntBark.pcx

and cedarbranch.pcx (pcx is only the file extension of course)

 

Locate the “Classes” directory and save there a simple text document (but with the extension *.uc) called Importer.uc with the following content:

class Importer extends Decoration;

 

#exec TEXTURE IMPORT NAME=cedarbranch FILE=Models\cedarbranch.pcx FLAGS=2

#exec TEXTURE IMPORT NAME=AntBark FILE=Models\AntBark.pcx

FLAGS=2 means that the texture should be imported as “mask” as you did it during some moments ago with the branch texture.

Note: You can also use the GROUP order for grouping the textures into groups! LOL! (Like GROUP=Skins)

 

So it should look like this at the end: …\Unreal Tournament\AntalusTree\Classes (contains only so far “Importer.uc”) and

…\Unreal Tournament\AntalusTree\Models (contains: AntBark.pcx and cedarbranch.pcx)

 

Compile the package now but better use the small but really cool tool called “UMake”. It makes compiling a lot more comfortable.

A package called “AntalusTree.u” should now appear in your System folder.

 

Open the UnrealEd 2.0 again and load the “AntalusTree.u” into the Actor Class Browser. Switch to the Textures Browser, you should find this:

 

 

You still now where the textures are located exactly? (Texturepackage.Groupname.Texturename)

So here it is: “AntalusTree.AntBark” and “AntalusTree.cedarbranch

 

Keep the UnrealEd 2.0 open and (if you have closed it the UnrealEd 3.0 again).

 

Take there a look in the texture browser. You will see that even a texture name is different there:

 

 

Again, don’t ask why, just do the following. Over a right click you can rename the textures. Rename them as like on the following screens:

 

 

 

Now select the pine tree static mesh with a right click (Convert > To Brush)

Maybe it is not a bad idea if you change now the Brush from solid to nonsolid. Now copy the tree brush to the UnrealEd 2.0. You can just to it with the simple shortcuts “Ctrl + C” and “Ctrl + V”.

If you have made it right, it should look like this:

 

 

In the case of the pine tree you should now select all branch surfaces then mark them as “Mask” and “Two Sided”.

Anyway, you can close now the UnrealEd 3.0. You will not need it anymore (I mean uhm you know what I mean).

 

But!!!!

 

 

Don’t save those packages! Otherwise your UT2004 install is screwed!

 

So choose “No” as answer!

 

Let’s continue because I really want to finish this now! Right click now the pine tree brush and select Polygons > To Brush.

Note: You should NEVER REALLY NEVER (De-) Intersect Brushes if you want to convert them to Meshes, otherwise you can welcome BSP bugs on meshes at least they look then like those bugs.

 

To save that thing for the converting progress: Brush > Export (and nothing else!). Save the map if you want to be on the safe side.

 

Start now MeshMaker and search for the pine tree prefab on your hard disk drive (wherever you saved it, default directory is the Maps directory of Unreal Tournament).

 

 

 

 

Check your “AntalusTree” folder. You should be able to find the files from the previous screenshot there.

Open the “Importer.uc” file and copy the two exec lines into the “PineTree.uc” class. Paste them in the right place:

 

// Generated by MeshMaker (c) 2001 by Mychaeel <mychaeel@planetunreal.com>

 

class PineTree extends Decoration;

 

#exec TEXTURE IMPORT NAME=cedarbranch FILE=Models\cedarbranch.pcx FLAGS=2

#exec TEXTURE IMPORT NAME=AntBark FILE=Models\AntBark.pcx

 

#exec mesh import mesh=PineTree anivfile=Models\PineTree_a.3d datafile=Models\PineTree_d.3d x=0 y=0 z=0 mlod=0

#exec mesh origin mesh=PineTree x=0 y=0 z=0

#exec mesh sequence mesh=PineTree seq=All startframe=0 numframes=1

 

#exec meshmap new meshmap=PineTree mesh=PineTree

#exec meshmap scale meshmap=PineTree x=0.67430 y=0.67430 z=1.34859

 

defaultproperties

{

  DrawType=DT_Mesh

  Mesh=Mesh'PineTree'

  bCollideWhenPlacing=True

  CollisionRadius=172.72950

  CollisionHeight=172.61999

  MultiSkins(0)=Texture'AntalusTree.cedarbranch'

  MultiSkins(1)=Texture'AntalusTree.AntBark'

}

The import script file for the textures can be deleted, it has no use anymore. If you want you can change several settings in the script file, for example you can add “Lodbias support” or you can change the collision settings and so on, but this would nearly need an other tutorial if I would go now into detail there. The basic settings are also ok. Only a tip: For plants it makes sense to change the bool from bCollideWhenPlacing to False. Compile now a second time the package with UMake.

Congrats, you have now ripped your first static mesh for UT, you little thief (:p)

 

Tutorial written by Creavion [14. June. 2009], my English is so bad

Anybody here who would like to overwork that thing?

 

The document ends right here.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

It really does.

 

 

 

 

 

 

 

 

 

 

END of universe.