
M32 Texture
Support & Compile Tools
|
Copyright info |
|
All
code in this tutorial is protected by the [GPL License]. |
|
Tutorial by: |nc |
||||||||||||||||||||||||||||
|
Mailto: mmilley@yossman.net If you're wondering
what the .m32 texture format is, its basically the .wal format upgraded to
32bit with a few extras. Before we
start, this does not add FULL .m32 support. It only adds support to the
OpenGL renderer, qbsp3, and qrad3. The engine itself will still try to
download the .wal for a texture even if the GL renderer already loaded a .m32
for it, so the allow_download cvar should be set to "0" unless you
want to see a bunch of texture download failures. Don't bother looking for
detail or damage textures, because this tutorial doesn't go into that. Also,
the qrad tool Raven uses must have been compiled with different light falloff
values because the sample map from their SDK (the first level of SOF) was WAY
too bright when lit with Quake2's qrad3. If you can't find the Quake2 tools
source, its at "ftp://ftp.idsoftware.com/idstuff/quake2/source/old/q2source_12_11.zip".
This code works with the 3.19 and 3.21 source. Quake2:
Open the Quake2 source and set ref_gl as the
active project. Open the "Header Files" folder in the File View and
open qfiles.h qfiles.h:
After:
Add:
gl_model.c: In function Mod_LoadTexinfo(): Replace:
With:
gl_image.c: After function GL_LoadWal(): Add:
In Function GL_FindImage(): After:
Add:
QBSP3:
qfiles.h (in the "External
Dependencies" folder): After:
Add:
textures.c: In function FindMiptex(): After:
Add:
After:
Add:
QRAD3:
patches.c: Replace the entire CalcTextureReflectivity()
funcion with:
Now you can compile maps with .m32 textures
and Quake2 will load them if theres no .wals with the same name. |
Tutorial Originally found at: