top of page

.HOD Editing  continued

HOD Type: Tells HW2 what kind of HOD this is

·   Homeworld2 Multi Mesh File: This is used for Asteroids, Resources, Salvage, Ships, Sub-systems and other “Normal” HODs.

·   Homeworld2 Background File: This is used to indicate that this is a background file, though this is never written in the HOD (Version written inside the HOD is different).

·   Homeworld2 Wireframe Mesh File: This is used for Wireframe UI meshes.

·   Homeworld2 Simple Mesh File: This is used for filled solid UI meshes.

Implied settings: Allows you to edit the information in Version chunk (VERS) and Hod Name chunk (NAME) yourself. This is recommended only if you know what you are doing.

a.     Textures:

Usually textures are the second thing you should work on. Below is the interface to edit textures in CFHodEd:

Add: Adds a new texture entry (Note: This is just a dummy texture entry. You must replace it with a proper texture (see below) otherwise you will not be able to save the HOD file).

Remove: Removes the selected texture (entry).

Replace: Replaces the selected texture (entry) with a texture (Only DirectDraw Surface and Truevision Targa only are supported by HW2!)

Export: Exports the selected texture to the path from where CFHodEd is run (Note: Do this only if you can write at the path where the HOD is present)

Preview: Previews the selected texture in a texture preview window. (Note: Do this only if you can write at the "TEMP" directory in Windows)

 

File Name: Complete path of the texture, when the HOD was written (this is used in HW2 for sharing textures)

Image Width: Width of image.

Image Height: Height of image.

Number of Mip-Maps: Number of MIP MAPS (smaller textures, which are used at greater distances) in the image.

Image Type: Format of image (DXT1, DXT3, DXT5 are DirectDraw Surface, 8888 is Truevision Targa texture)

 

Preferred format for textures: Direct Draw Surface (DDS)

This format is usually always used, since it is much smaller than Truevision Targa. They can be in DXT1, DXT1a, DXT3, or DXT5 format (no other texture formats are supported by HW2). These textures are handled a bit differently as compared to PSD (Photoshop Document). As told in the HW2 Documents, after preparing your textures, and after readying their export versions, textures have “$diffuse” and “$glow” layers. The Hiigaran Interceptor would look like this in Photoshop's Layer window (note that the "Ref" and "Background" layers aren't needed and can be deleted, exactly like Alpha channels):

 

Naming conventions for textures:

You need to export each and every one of these layers, as “<Original Texture Name>_EXPORT[x].dds”, where x is a number (from 1 to 9), which indicates the layer number, starting from bottom. So in this case, the "$diffuse" layer would be called as "HGN_InterceptorA_EXPORT[1].DDS" and the "$glow" layer would be called as "HGN_InterceptorA_EXPORT[2].DDS". Similarly, for a ship with engines that would glow on and off, "$diffuseOn" would be #1, "$glowOn" would be #2, "$diffuseOff" would be #3, "$glowOff" would be #4, etc. While all this is not really needed, these are healthy practices, which would help avoid errors in the long run.

Incase if you don't have either Photoshop or Paint Shop, you will need a tool, which can write DDS files with alpha (transparency) channels.

 

Working of Textures with a “ship.st” shader:

Typically, in a "$diffuse" layer,

1)     Red, Green and blue channel is the base surface texture of ship

2)     Alpha channel is used for team colours (or base colour). 0 means that it will have 100% effect of team colour, whereas 255 means that team colour will not be applied to that area.

 

In a "$glow" layer,

1)     Red channel is unused.

2)     Green channel indicates how much lit that part of the ship is. Usually, 0-127 is from unlit (depends on lights from other sources) to fully lit (doesn't depend on light from outside), and 128-255 means that the light will seep out into surrounding pixels (will light nearby pixels of the ship texture).

3)     Blue channel indicates specularity. 0 means that part will not be specular, and 255 means that part is specular.

4)     Alpha: Stripe colour. Functionality is exactly same as Alpha in a "$diffuse" layer.

a.     Materials:

Textures, alone are useless. Materials are assigned to objects, and textures are assigned to materials. So for a ship to properly react to light, textures, materials must be properly set. Below is the materials interface in CFHodEd:

bottom of page