KatsBits Community

Quake Wars and applying Materials/Textures to ASE models

kat · 1 · 13385

0 Members and 1 Guest are viewing this topic.

Offline kat

  • Administrator
  • Hero Member
  • *
    • Posts: 2692
    • KatsBits
ASE models and material references
There's been a slight change to the way the version of the Doom 3 engine behind Quake Wars is handling ASE models and material assignment. The important part of an ASE models typically looks like the following (the section shown below is a typical example of the material section of the mesh exported using 'relative' file paths to the assets);

Code: [Select]
*MATERIAL 0 {
*MATERIAL_NAME "\\fishingboat"
*MATERIAL_CLASS "Standard"
*MATERIAL_AMBIENT 0.0000 0.0000 0.0000
*MATERIAL_DIFFUSE 1.0000 1.0000 1.0000
*MATERIAL_SPECULAR 1.0000 1.0000 1.0000
*MATERIAL_SHINE 0.0000
*MATERIAL_SHINESTRENGTH 0.0020
*MATERIAL_TRANSPARENCY 0.0000
*MATERIAL_WIRESIZE 1.0000
*MATERIAL_SHADING Blinn
*MATERIAL_XP_FALLOFF 0.0000
*MATERIAL_SELFILLUM 0.0000
*MATERIAL_FALLOFF In
*MATERIAL_XP_TYPE Filter
*MAP_DIFFUSE {
*MAP_NAME "\\fishingboat"
*MAP_CLASS "Bitmap"
*MAP_SUBNO 1
*MAP_AMOUNT 1.0000
*BITMAP "\\fishingboat"
*MAP_TYPE Screen
*UVW_U_OFFSET 0.0000
*UVW_V_OFFSET 0.0000
*UVW_U_TILING 1.0000
*UVW_V_TILING 1.0000
*UVW_ANGLE 0.0000
*UVW_BLUR 1.0000
*UVW_BLUR_OFFSET 0.0000
*UVW_NOUSE_AMT 1.0000
*UVW_NOISE_SIZE 1.0000
*UVW_NOISE_LEVEL 1
*UVW_NOISE_PHASE 0.0000
*BITMAP_FILTER Pyramidal
}
}

Based on the above ASE snippet, when looking at previous iterations of the engine and their use of ASE materials the follow is the case;

Doom 3

Code: [Select]
*BITMAP "//doom3/base/textures/fishingboat/boat"
For more info on using ASE models in Doom 3, click here

Quake 4

Code: [Select]
*BITMAP "//q4base/textures/fishingboat/boat"
For more info on using ASE models in Quake 4, click here

Note that previously the game engine made use of the "*BITMAP" reference in the ASE file (as mentioned above); this has changed with now with Quake Wars making use of the "*MATERIAL_NAME" reference near the top of the each ASE "MATERIAL" block. It now looks similar to the following;

Quake Wars

Code: [Select]
*MATERIAL_NAME "textures/fishingboat/boat"
Along side this reference change note also that the material path does not have the '//' pre-pended to it (added to the front of the path). There is also no need to reference "base" somewhere in the path ('//q4base/' or '//doom3/base/')so simply stating the actual path used in a material header is all that's now needed for ASE models to show up in Quake Wars correctly material and textured.

Quote
Design note: make sure the path slashes are the correct way around otherwise the mesh will appear in Quake Wars with the black and red missing shader/material applied all over it (at least where the materials are broken). Valid for Quake Wars are '/'; invalid are '\'.

*.mtr material file setup for ASE models
Material files for Quake Wars are set up almost the same as previously with the exception of a number of game specific shader parameters. There is one notible amendment to a material block and that's the inclusion of "material" in front of the material header (file path). So, previous materials change from this;

Code: [Select]
textures/katsbits/cave/rock
{
noshadows
diffusemap textures/katsbits/cave/rock.tga
specularmap textures/katsbits/cave/rock_s.tga
bumpmap textures/katsbits/cave/rock_local.tga
}

To this;

Code: [Select]
material textures/katsbits/cave/rock
{
noshadows
{
diffusemap textures/katsbits/cave/rock.tga
specularmap textures/katsbits/cave/rock_s.tga
bumpmap textures/katsbits/cave/rock_local.tga
}
}

The only section of that which is needed for inclusion in the ASE files is the 'path' after "material", in this case "textures/katsbits/cave/rock".

Where to place the *.mtr file
Assuming you've used a default install of the Quake Wars editing SDK, then the *.mtr material file needs to be placed in the folder named "materials", likes so;

Code: [Select]
\sdk\base\materials\
(note: the above example is an approximate system file path not a material reference path) Placing it elsewhere will result in a 'no show' in the editor as the game can't find what it's looking for.