Hi,
I am creating an application that will allow you to select the .map or the .bsp file of your map, and it will present you with a list of all the textures you used in your map.
Then, the application can tell you which textures are standard ET textures, and which are custom textures.
This way, it becomes easy to determine which textures you need to supply in your pk3 file and you won’t forget textures!
Now, so far I have managed to extract the textures from the BSP file, but there is one problem:
It does not list the actual ‘image texture files’, but instead it lists the shaders!
So far example, if you happened to use the textures/alpha/bars_m01 shader in your map:
textures/alpha/bars_m01
{
cull disable
nomipmaps
nopicmip
surfaceparm nomarks
surfaceparm alphashadow
surfaceparm metalsteps
surfaceparm pointlight
surfaceparm trans
implicitMask -
}
My application will tell you that you used textures/alpha/bars_m01. However, I have no way of telling if the actual image file (which you would need to supply in your pk3 assuming this was not a standard texture) is either of these:
- textures/alpha/bars_m01.jpg
- textures/alpha/bars_m01.tga
(It is the .tga one, because the .jpg one doesn’t exist, so I guess that is one way to determine which one you need…)
Another example. Suppose you used the textures/battery/ocean_0 shader. My application will tell you again that you need to supply textures/battery/ocean_0. However, this is not even an image! (There is not even a ‘battery’ directory in the textures directory). Instead, if you look at the shader, it uses two other textures:
- textures/liquids_sd/seawall_specular.tga
- textures/liquids_sd/sea_bright_na.tga
textures/battery/ocean_0
{
q3map_baseshader textures/battery/ocean_base
cull none
deformVertexes wave 1317 sin 0 2.5 0 0.15
deformVertexes wave 317 sin 0 1.5 0 0.30
{
map textures/liquids_sd/seawall_specular.tga
blendFunc GL_ONE GL_ONE
rgbGen vertex
tcGen environment
depthWrite
}
{
map textures/liquids_sd/sea_bright_na.tga
blendFunc blend
rgbGen identity
alphaGen const 0.8
tcmod scroll 0.005 0.03
}
}
So… My question really is, is there any way to determine easily what image files a certain shader uses, as these are the files you might need to supply in your pk3…
If I can just determine this, my application could even create the textures folder for you!
)

