Help:Importing textures

From Killing Floor Wiki
(Redirected from Importing Textures)
Jump to: navigation, search

Contents

[edit] Import from Graphics File

First, make sure the image you are trying to import is:

Then, in the Texture Browser, do Texture Browser Menu -> File -> Import. Find the directory containg your .pcx or .bmp file, then select it and click Open. A window will appear asking for specifics on how to import the file:

Package

If you want to save the image in an external package, just enter the package name. If it does not exist, KFed will make a new package for it. It is a really really bad idea to import into a package file you downloaded or that came with the game: Do Not Alter Default Packages. If you want to use a few textures from a downloaded pack just export them and re-import them into your own package, and remember to credit the author. To embed textures into a map, use "MyLevel" as the package name and don't save it.

Group

This is pretty simple, it's just what group the texture will be displayed under in the Texture Browser. This is for package organization only, and if you only have a few textures in your package just type in "None" or leave this field blank to not assign a group to your new texture.

Name

This is just the name your texture will have inside KFEd. Some types of texture need a specific name (for example the map Level Screenshot. But generally, just give the texture a unique name that you will remember.

Masked

If your texture has Texture Effects (grate effect) then check this box otherwise you'd need to set each surface using the texture to Masked (under surface properties) in order to achieve the same effect.

Generate MipMaps

MipMaps are smoothly downsized versions of your texture that will be displayed when your texture is rendered smaller than its original size (i.e. at a distance). The goal of mipmaps is to make the downscaled textures look smoother than it would if the renderer simply skipped pixels of the original-size texture. Any texture (including those displayed on the HUD or as the level Screenshot) can benefit from mipmaps, but you have to weigh the slight improvement in visual quality against doubling the texture's memory consumption.

When you're all done, just click import and start using the new texture(s) in your level.

Once you've imported your textures into your new package don't forget to click on the Save button to save the new package in the texture folder or else your level will play with the generic bubble texture instead of your new texture. You can edit old texture packs but it is best to only do this with packages that have not yet been publically released (to avoid missing textures and version mismatch errors for your users caused by multiple versions of the package in circulation) and you should never modify the original Epic texture packages bundled with killing floor!

[edit] Further Techniques

[edit] Troubleshooting

If KFed refuses to import a texture, the most likely problem is that the texture file isn't conform with the rules of the engine. Check off the list of points below. If you know of any other problems, please add them.

Texture size

The width and height must each be powers of two. So the only acceptable numbers are: 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024. Images larger than 1024x1024 aren't supported (see Unreal Textures) and anything larger than 256x256 will crash UT if you don't allow mipmaps.

Image format

The file must be in 256 color mode when importing from BMP or PCX. If using Photoshop, that's Mode -> Indexed Color. The Exact palette option is fine.

Image Editors

Make sure that your resize your texture before you reduce the color depth when editing. Some image editors such as Irfanview kick the depth back up to 24-bit when resized. From the point of view of image quality it also makes sense to give your image app the largest colourspace to work with when resizing.

File Location

If it still doesn't import then you need to check how deep the texture file is located in your directory structure. Basically when you import a texture in UnrealEd, the pathname and filename will be stored in a string of some kind with a fixed length. So if your directory is too long, the whole thing won't be able to fit in the string and KFEd can't find the texture. The solution is simple: Move the texture(s) you want to import to C:\ for example. Also note, that UnrealEd doesn't like spaces in the pathname.

[edit] Exporting

To export a texture from UnrealEd, go to the texture browser and select the texture you want to export. Do Texture Browser Menu -> File -> Export. Then simply select the directory to save the .TGA file to and export the file. You can then view or edit the file in any image editing program.

Some texture formats won't open properly in standard graphics applications:

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox