anachronox-sdk/docs/procedural/intro.bak

67 lines
2.8 KiB
Plaintext

<!DOCTYPE html PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML>
<HEAD>
<TITLE>Introduction to Procedural Textures</TITLE>
<LINK type="text/css" rel="stylesheet" href="../webdocs.css">
</HEAD>
<BODY>
<H1>Procedural Textures<IMG src="kawaii1.gif" align="right"
alt="anime girl"></H1>
<P>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 <B>
joeyproc</B> and look around.</P>
<H4>General Information</H4>
<P>All procedural texture are created through the use of text
scripts called Anachronox Texture Definition files. Definition
files have the extension <B>.atd</B> and are used as
replacements for normal textures. For example, if you use the
texture <B>water4.tga</B> in some area and you want to use a
procedural texture instead, just place <B>water4.atd</B> 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.</P>
<H4>ATD File Conventions</H4>
<P>Spaces aren't important, so you can format your files to
look nice. Comment lines must have <B>#</B> as the first
non-whitespace character in the line. End-of-line may be
indicated by LF or CRLF.</P>
<H4>Old vs. New</H4>
<P>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 <I>fast</I>. 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.</P>
<H4>Voodoo2 support</H4>
<P>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.</P>
<H4>Comments and questions</H4>
<P>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.</P>
</BODY>
</HTML>