Difference between revisions of "Texturing"

From FreeSpace Wiki
Jump to: navigation, search
(Animated Textures)
(Animated Textures)
Line 38: Line 38:
 
Freespace 2 SCP also supports two kinds of animated file format. The first is the standard .ANI extension as used by Freespace Retail, you can convert these using the AniBuilder program from the Descent Tools package. The Second format is the new .eff file. This allows multiple single images to be chained together into an animated texture.
 
Freespace 2 SCP also supports two kinds of animated file format. The first is the standard .ANI extension as used by Freespace Retail, you can convert these using the AniBuilder program from the Descent Tools package. The Second format is the new .eff file. This allows multiple single images to be chained together into an animated texture.
 
All .EFF image files must be in the same format, but can be in any format Freespace SCP supports, and must have an underscore and their Frame number added onto their name as a 4-digit number starting at 0000, for example RunningLights_0000.DDS, RunningLights_0001.DDS etc.
 
All .EFF image files must be in the same format, but can be in any format Freespace SCP supports, and must have an underscore and their Frame number added onto their name as a 4-digit number starting at 0000, for example RunningLights_0000.DDS, RunningLights_0001.DDS etc.
Now simply create a new text file for your animated texture with the same Base name as your texture (in this case, RunningLights.EFF) and simply enter the following text.
+
Now simply create a new text file for your animated texture with the same Base name as your texture and a .EFF extension (in this case, RunningLights.EFF) and simply enter the following text.
  
 
$Type:      XXX ; Defines the type of file being used, can be DDS, TGA, PCX or others
 
$Type:      XXX ; Defines the type of file being used, can be DDS, TGA, PCX or others

Revision as of 02:01, 28 May 2006

General

Properly texturing a model is perhaps one of the easiest aspects of modeling to actually do, but possibly the hardest to do well. There are two types of texturing methods, tiling and mapping, each with its own distinct advantages and disadvantages. I am not qualified to explain mapping (also called texture wrapping or unwrapping), as this is by far the more difficult of the two to do well. This form of map is most commonly used on fighters, although some capships (many FS1 cruisers, as well as distinct ships like the Lucifer) make use of full mapping. The advantage comes in a form-fitted map, that has each piece distinctly textured to reflect the designer's intentions as to what function each section should serve. However, especially with the older 256x256 maps, large scale mapping can be blurry and inconsistant if extreme care is not given to the construction of a map. Mapping a ship also requires you to be able to create techy maps in a photoshop-like program, and there really isn't an effective substitute.

Texture tiling: This method is simple, and (besides being the primary capital ship texturing method used by Volition) produces a consistantly crisp and consistant hull if applied correctly. When constructing a model, the choice between mapping and tiling generally comes early; anything with large flat or gradually curved expanses can easily exceed the optimal resolution for wrapped textures and makes tiling extremely noticable. As a general rule of thumb, don't create large expances of unbroken hull and you won't have this problem. If you can't get around it, though, try to split the section into two or more horizontal or vertical sections that can be mapped with similar textures or otherwise find a way to break overly repeated textures up. Using a varient of the same texture (such as ~C~Tile1 and ~C~Tile5 from the stock FS2 textures) can work really well here. Once your model is ready to texture, you must provide UV coordinates for each polygon so that the game renderer knows how to display your textures. I start out usually by applying a box UV map to the whole object, and then work from there. This comes with the advantage of lining everything up for tiled textures, but can create some odd seaming effects around 45 degree facings. I then go back and planar map (TS5) or unwrap (3ds Max) any parts that require special attention, such as engines, viewports, corners, etc. so that they fit the scheme I want. I would advise against spherical, cylindrical, or shrinkwrap UV map options, as they tend to create unstable normals (in TS) and almost always create an unexpected "pole" effect around the ends which is difficult to rectify. For a step-by-step walkthrough, I would strongly suggest taking your modeling program of choice and just playing with it. See what you can come up with. And that's all of the texture section until someone who is better at it than I am comes along and fixes this page up.

SCP Team Recommendations

The new HT&L feature of Freespace 2 SCP has allowed a vast increase in the number of polygons that can be displayed at any one time, however, in order to keep gameplay smooth, the SCP team recommends the following rules when making models for use in Freespace 2.

Textures :-

1 : Use as few textures per model as is possible, optimization is the key, for fighters and bombers you should only need a single 512 x 512 map for the model. Capital ships can use more textures, but the less textures and the less memory they take up, the better.

2 : Unless it is absolutely vital, use the .DDS format for storing your images. These format files are compressed and are automatically decompressed by your video hardware, so they take up far less memory, thus improving performance. Freespace 2 also supports .TGA format files, but these should only be used where .DDS files are causing noticeable compression errors on your texture (this can happen most noticeably with semi-transparent textures.

3 : For highly detailed ships, it is better, from a memory point of view, to use one large texture than several smaller ones.

4 : ALWAYS use texture sizes that are a power of 2, i.e. 256, 512, 1024 or, at most, 2048. You can have different ratios, such as 512x256, but always use these sizes.

Models :-

Remember that any Level of Detail models are going to be stored in memory, so use them sensibly. Freespace SCP now uses Mipmap technology, so you no longer need to create LOD’s for the textures, an old requirement of Freespace 2 modding. Whilst polygon count does not have as dramatic effect on performance as texture size does, it is, as always, best to optimize where possible.

Texture Types

Freespace 2 SCP uses mostly .DDS and .TGA format images. These can also be linked together to form animated maps (see later). Also, .PCX files are commonly found as they were the original format of Freepsace 2 Textures.

Texture naming conventions

Whilst the textures on your models can be called anything, there are certain naming conventions in creating effects textures such as glow-maps or specularity, basically the naming convention works as follows.

TextureName.xxx – This is the colour map for the material. It should be mapped out to the models UV Map. This can use an alpha map for transparency.

TextureName-glow.xxx – This is the glow map for the model. It simulates the effect of ‘portholes’ or other glowing part of the ship. Using the same UV Map, and a black background, make any flat lighting effects you want on the ship on this texture. These are different from Glow-points, which are points on the model and are covered later.

TextureName-shine.xxx – This is the Specular map of the model, once again using the UV’s for the model, colour in all the parts of the surface which are metallic, using whatever colour you want the shininess to be. The brighter the colour, the shinier it will be. NOTE: Shine maps can also have an alpha map. This alpha map is used to define the level of ‘reflection’ when environment mapping is operating.

TextureName-trans.xxx – This enables the transparency for the map of the model, once again using the UV’s for the model. Map in question can also be set as -shine or -glow map (for example TextureName-trans-glow).

Animated Textures

Freespace 2 SCP also supports two kinds of animated file format. The first is the standard .ANI extension as used by Freespace Retail, you can convert these using the AniBuilder program from the Descent Tools package. The Second format is the new .eff file. This allows multiple single images to be chained together into an animated texture. All .EFF image files must be in the same format, but can be in any format Freespace SCP supports, and must have an underscore and their Frame number added onto their name as a 4-digit number starting at 0000, for example RunningLights_0000.DDS, RunningLights_0001.DDS etc. Now simply create a new text file for your animated texture with the same Base name as your texture and a .EFF extension (in this case, RunningLights.EFF) and simply enter the following text.

$Type: XXX ; Defines the type of file being used, can be DDS, TGA, PCX or others

$Frames: XX  ; Defines the number of Frames in the total (looping) animation.

$FPS: XX  ; The Frame Per Second speed of the animation.


This file should be saved in the textures folder of your project alongside the images themselves.

Lithium UnWrap

Lithium Unwrap is in my opinion, the best texturing program. It allows you to texture a model in one of two ways.

Lets start with the [Tutorial Ship] Modeled by Max Sterling. (click name to go to a download area)

  • 1. Open the file. File ----> Model ----> open
  • 2. Here you see a jumbled mess of faces, first we want to assign these faces to a material. We do this so we can begin UV mapping our Uylesses.
  • 3. Select all faces by clicking the arrow icon in the tool bar at top. Then drag a box around all faces you can see, if you can see only some faces or nothing at all, try zooming in or out by using the magnifying glass icon in the toolbar. Click and hold while moving your mouse up and down to zoom in or out.
  • 4. After selecting the faces, a red box should show up around them. Now click materials ----> modify -----> Mat 0 ----> Assign ----> ok and close the menu. Now normally Lithium will create a material and assign all faces to it if you dont already have one, but its good to know this.
  • 5. Now select material0 in the left hand column, expand materials by clicking the + if you have to.
  • 6. Drag select all the faces again and now click Tools ----> Uv Mapping -----> Box mapping ----> ok
  • 7. Now its slightly more organised but still a bit confusing if youe never used this before.

someone else can continue this.