Custom Textures
by WillyP


Tools

  Download the latest version of D3Edit here! Many thanks to Nirvana, Otherone and Atan, for debugging and adding features to the original! Here's a tut on how to set up D3Edit and Quicktest.

  GamTool, by Alan deLespinasse. You could use D3 control panel instead if you prefer, but I use gamtool, so that is what is referred to in this tut.

  D3Image-Tool, by Rob 'SuperSheep' Piontek. Comes with an excelent help file, check it out!

  If you want to create your own textures you will need a graphics or paint program that can save in 32bit uncompressed TGA format. I use Paint Shop Pro.

  Quick Tip: You can launch external tools, html, and text files from within D3Edit. Click 'Tools >Customize >Add' then surf to your tool's executable (exe) file, click Open >OK. If you are not sure which file opens your tool, right click the shortcut to view it's properties.


Custom... or Customized?

Say what?

  A custom texture is an image that was not included in the set of textures that came with Descent 3: Retribution.

  Use a custom texture when you cannot find an image you like in the stock texture set. An example of a custom texture would be an image you created, or perhaps found on the internet. There are also textures included in Mercenary that you can extract and use as custom textures in your level. You can use digital photos, scanned fabric or wallpaper samples, screenshots or something you create from scratch in your favorite paint program. You can use just about anything!

  A customized texture uses a stock image file from D3 but a custom tablefile page (gam entry) is used to alter it's properties.

  Use a customized texture when you have found an image in the stock D3 texture set that you like, but you want to alter it's properties. The most common property to alter would be light emmission, some other properties include destroyable, slide, sound, flythrough and many more.

  Ok?


Custom Texture Image Requirements

File It...

  The best image size is 128x128 pixels. You can also use 32x32, 64x64, 256x256. These are the supported sizes, although you can use other sizes, results may vary. Too many large textures may result in a lower framerate.
  Save your image as a 16, 24 or 32 bit uncompressed tga (Targa) file.


Convert to Outrage Graphics File

.tga -> .ogf

  Open D3 Image Tool. Make sure Targa is selected for 'Files of type', and browse for your .tga filename. Select 'OGF' for 'Output Type', and browse to the directory you want to save to in the 'Save To' window.
  Next is ARGB Output Settings'. The OGF 1555 is 1 bit alpha, 5 bits each red, blue, green. The OGF 4444 gives us 4 bits of data in the Alpha channel (but only 4 each for RGB) which allows for blended textures, like the Neon signs.
  The last setting is 'Mipmaps'. Mipmaps may help your framerate by allowing D3 to dispaly a lower resolution image when you are further away. In most cases it will improve the overall apperance of your level, too. It will increase filesize, and texture memory used, as every mipmap is another image. Each mipmap is half the size of the preceding one. So if your image is 128x128 and you set mipmaps at 5, the mipmaps would be 64x64, 32x32, 16x16, and 8x8. If you choose 1 mipmap, just the main image will be used. Try each in a level to see the differance, I find the 1 mipmapped image looks very poor from a distance. This may vary depending on your hardware and settings.
  Hit 'Convert' and in a split second you'll have a brand spankin' new Outrage Graphics File... Congrats!


Make a Gam Page for Your Custom Texture

Give your texture the kiss of life!

  Without a gam page, D3Edit won't have a clue about your texture, and neither will Descent. In the gam page you will specify how much (if any) light your texture emits, whether or not it can be destroyed, and if you can see through it. Make it slide, make it play a sound, you can make it set the playewr on fire when touched. The gam page determines where in the texture browser you will find it, and many other things.

  Open GamTool and Table1 will open, by default, as a blank table file. Note: Table file is another name for the gam file. You can 'Save As' to change the name. Use the same name as your .mn3. If your level is 'xyz.mn3, save your gamfile as xyz.gam. Or, if you already have a gamfile for your mission, open that. Your custom texture needs a gam page, there are two ways of doing this. You can create a new page or copy an existing one. To make a new page, hit 'Alt+T. To copy a page you need to open a gam file and find the page of a texture that is closest to what you want. Click on the Texture Name and hit copy, then paste it into your gam file.
  Either way, you'll need to double click the the fields for 'Texture:' and 'File name' to change them. 'Texture:' is the name of the texture, this is the name that will show up in the D3Edit texture browser. Press enter after you type in these fields.

To customize an existing texture:

  If you want to customize the properties of a stock texture you only need to copy a gam page, or create a new one. Use the texture filename of the stock texture. If you use a different texture name you can use both the stock and customized version in your level. If you keep the same texture name, you will only have your customized version. You won't need to extract the texture file and insert it into your mn3, as it's already in d3.hog.
  Save your changes.



Now have some fun with the settings!

About those settings...

  Open Image Tool again and go to: Help> Help Contents> Using D3 Image Tool> Texture-GAM Tool Settings, here you will find the most comprehensive list of settings for the gam page that I've seen. Many thanks to Rob 'SuperSheep' Piontek for creating and including this!
  Make sure you check a category, ie: 'Mine' or 'Light' and the size if it's other than 128x128.

Another Option...

  If you make a custom ogf with the same filename as a stock one, then include it in your mn3, it will override the stock image. This way you won't need to make a custom gam page. Note, all the textures in your level with this texture name will change to your custom image.


Get Your Texture Into D3Edit

  The last thing to do before you can use your textures is include all your custom files in your mn3. If you are not sure how to do this, read Setting up D3Editor and QuickTest to learn how to use Quicktest.


Animated Textures

  Animated textures can add a lot to a level, if used judiciously. Compared to objects, they are easy to make, can be very low overhead, and no scripting is required. Once again I will refer you to the help file in D3 Image Tool. There you will find an excellent tut on making an animated texture from individual frames.




Comments? Click here to discuss issues related to this tutorial.



...WillyP...