Working with Textures

From FleshWorks

Jump to: navigation, search

by OrbWeaver

Contents

Introduction

The next step after building BSP geometry is to apply textures to the brushes and surfaces to make the map look realistic. Correct use of textures is at least as important as building good geometry: the best geometry in the world will look shoddy if poor texturing is used, whereas a relatively simple physical design can be made to look outstanding with good quality texturing.

The texture browser

The texture browser in T3Ed is the primary interface for working with textures. It is visible by default when the editor is loaded, and can be displayed at any time by clicking the Texture Browser button on the top toolbar (looks like a painting).

Loading matlibs

The texture browser as first displayed by T3Ed is somewhat empty of usable textures. In order to access the variety of textures used in the game, it is necessary to load matlibs (short for "material library"), which are the rough equivalent of the "texture families" used in Dromed.

To load a matlib, choose File -> Import Matlib... from the menu in the texture browser. The textures directory will be shown with all its matlib files (ending in ".mlb"). The first matlib to load will normally be T3_GEN, which contains a lot of wood and stone textures.

You can also load all of the matlibs by choosing Load all Matlibs from the File menu. This takes a few seconds, after which all the textures in the game are available, in categories selected with the dropdown listbox at the top of the texture browser.

Features of textures

There are a number of features that apply to textures selected in the texture browser.

  • Texture size. A texture is basically a 2D image tiled over the surface it is applied to. As a result, the size or resolution of the 2D image determines the quality of the texture, and how much detail it can contain before it has to repeat. The size of a texture is immediately visible in the texture browser; when there is a choice, always select the largest available texture in order to increase the quality of the rendered level (unless there is a particular need to keep the size down).
  • Normal map. Most textures in T3 have normal maps. Normal maps are used to make textures look "bumpy" in three dimensions, by defining ridges or grooves that catch the light. This is in fact a trick: by looking closely in-game you can see that the surface is completely flat, but from a small distance the normal-map effect makes a texture look much more realistic.

Applying textures

Before any application of textures on changed brushwork can be undertaken, the level must be rebuilt with Build All. If textures are wrong, out-of-date or surfaces cannot be selected, try rebuilding the level as a first solution. It is also necessary to rebuild if textures are changed (in contrast to Dromed, where rebuilding was only necessary if geometry was altered), but in this case you can just Build Flesh BSP which is much quicker than Build All.

To apply a texture to a brush

To apply a texture to a brush:

  • Select the surface in the 3D window, by clicking on it. The selected surface will highlight in pale blue. If you cannot select the surface, do a Build All to update the BSP (you may also need to switch to the regular 3D view, as the Flesh renderer does not always highlight surfaces properly).
  • With the surface selected, click on a texture in the texture browser to apply it to the surface.
  • Continue to select surfaces in the 3D window, and apply textures with the texture browser as necessary.
  • Finally, rebuild to change the textures in game, and playtest the level.

Hint: To select all surfaces on a brush, highlight one of the surfaces and type Shift-B.

To "pick up" a texture from a surface

You can pick up a texture from a surface in the 3D window, and select it in the texture browser, by using **Alt-Rightclick** on the surface. Note that this will select the texture in the browser but will not scroll the window to display it, or change the selected category if the picked up texture is in a different one to that shown.

To copy a texture onto a different surface

By using the Alt-Leftclick combination, you can "paint" the currently-selected texture onto a different surface, without needing to select that surface first. By using the Alt-Leftclick and Alt-Rightclick commands together, it is easy to copy textures from one surface to another.

To apply a texture to a static mesh

You can pick a texture and apply it to a static mesh using the Alt-Leftclick combo. (Although, it keeps the same UV mapping so it sometimes looks weird). Then add the skin under the static mesh right click menu. If you don't add the skin to the static mesh, it will not be stored.

Aligning textures

Texture alignment is the process of determining the way the 2D texture maps onto the surface it is applied to. Texture alignment settings are modified through the Surface Properties dialog, which is displayed by selecting a surface in the 3D window, right-clicking and choosing "Surface Properties" from the viewport context menu.

Alignment methods

A number of different alignment methods can be set from the Alignment tab of the Surface Properties dialog. The alignment method used will depend on the situation in which the texture is used.

  • Planar. This is probably the most commonly used alignment method. It tiles the texture image in both dimensions and projects it onto the surface. Planar alignment uses global texture co-ordinates, which means that textures using this method on adjacent surfaces will line up perfectly (ideal for walls and floors).
  • Face. This scales one instance of the texture to exactly fit the surface. No tiling or repetition is used. This method is ideal for textures with edges that must fit perfectly onto a surface, such as a door or window texture. Note however that the face must not be too big, otherwise the texture will be scaled up too much and look grainy.

Panning, rotation and scaling

The Pan / Rot / Scale tab of the Surface Properties dialog offers options to pan, rotate and scale the textures. The buttons to perform these operations are fairly self-evident. You can:

  • Rotate the texture in 45 or 90 degree increments. If you need smaller increments, use the texture rotate tool.
  • Pan the texture in two dimensions (known as U and V) in a number of differently sized steps.
  • Scale the texture in one or both dimensions, either relative to its original size (Relative checkbox is inactive) or relative to its current size (Relative checkbox is active).
  • Flip (invert) the texture along the U or V axis. Note that this may affect the orientation of the normal map.

The Texture Rotate tool

If you need to rotate a texture in smaller increments than 45 degrees, click the Texture Rotate button on the left toolbar (3rd one down on the right column, looks like a T with a circle of arrows around it). Select the surface you want to affect, hold down ctrl and the right mouse button, and move the mouse left and right to rotate the texture. You just have to mess with it until it looks aligned right, it doesn't let you type in a numerical angle.


Back to Getting Started With The Editor