Procedural Texturesanime girl

Procedural textures provide interesting visual effects by modifying the color values of a texture in real time. Some procedural textures can be controlled from APE, which can greatly enhance the interactive feel of the game. For some quick ideas on what procedural textures can do, load up map joeyproc and look around.

General Information

All procedural texture are created through the use of text scripts called Anachronox Texture Definition files. Definition files have the extension .atd and are used as replacements for normal textures. For example, if you use the texture water4.tga in some area and you want to use a procedural texture instead, just place water4.atd in the same directory and move or rename the old image. This way, you can easily replace textures for not only world brushes, but also models and 2D interfaces! All texture definition files must start with the four characters "ATD1" on the very first line, you will see this string often in the documentation.

ATD File Conventions

Spaces aren't important, so you can format your files to look nice. Comment lines must have # as the first non-whitespace character in the line. End-of-line may be indicated by LF or CRLF.

Old vs. New

This document describes how to implement procedural textures on model and level geometry using the "new" method. The "old" method, which involved creating a long and confusing string in a level's worldspawn, was difficult to use and incurred a major performance penalty. The new procedural texture code is easy to use, flexible, and fast. Map joeyproc has over 4 MB of textures visible at a time, many of them procedural, and it still runs at 40 fps on our low-end voodoo 2 systems.

Voodoo2 support

Use of the 3fx mini-client driver is NOT recommended, since bugs in that driver prevent the correct display of certain procedural textures. Instead, use the metagl driver by adding "+set gl_driver metagl" in your shortcut.

Comments and questions

This document and the code it describes was written by Joey. Therefore, any suggestions or comments concerning this documentation or bug fixes/feature requests for procedural textures should go to him.