Sign in to follow this  

BSP texture files

Recommended Posts

I'm writing a BSP file loader, and I've found that the names of the texture file have no extension. Are they all TGA files? Or do I have to do searching the directory myself for a particular file name myself?

Share this post

Link to post
Share on other sites
What version of bsp are you talking about?
Bsp version 29 (Quake1 & Hexen2) had it's texture data inside bsp file.
Bsp version 30 (Halflife) uses external WAD files (header signature WAD2 & WAD3)
Bsp version 38 (Quake2 & Heretic 2) uses custom texture format (*.wal for quake, *.m8 )
Bsp version 46 (Quake 3) stores textures inside *.pk3 files (theese are actually zip files) in zip path /TEXTURES/xxxxx/texturename.tga or /TEXTURES/xxxxx/texturename.jpg

By the way, any information about bsp version 47???? (RTCW)

Share this post

Link to post
Share on other sites
Good question. Its most likely that I'm looking at the Quake 3 version.

The reason that I asked is that the texture names are stored without extensions, so, I find myself in a bit of a problem. How am I supposed to know which file format to try and use? Am I going to have to search through the files in the directory and file one with the identical name?

Share this post

Link to post
Share on other sites
You must search whitch texture exist and use it. I'm not pretty sure but
I think that TGA images are RGB(0, 0, 0) transparent but jpg are not.
Also TGA textures somethimes appears to be compressed.

Quake 3:
I was dealing with this particular problem recently and my conclusion was this:

You must make module that opens zip and reads files and search for TEXTURE\base_xxx\texturename[.ext] where ].ext] = '.jpg. or '.tga'

You must search in directories.

If you want any further help I can give some sample source code that
demonstrates how I've dealed with this problem while making my QuakeViewer

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this