Monday, August 29, 2005

Fun and games with QBSP3 and textures

Among other things, the QBSP3 tool is responsible for aligning textures on the faces of polyhedrons, taking its information from the .map file output by whichever editor you're using.

In my opinion, the QBSP3 tool should ensure that the way the texturing appears ingame is identical to the way it appears in the map editor. How else can the mapper know how to get the textures looking the way he wants them to?

So, I thought I'd compare the performance of the various versions of QBSP3 I've got available to me. First off, the testcase, as it appears in QuArK. The two floating boxes are func_wall entities, and the left-hand one has an brush with the 'origin' texture on it to set the entity origin somewhere away from the default. Note that both boxes are identicaly textured in the editor, and the textures are square with the face edges:

This is how it appears using the TXQBSP3-derived QBSP3 modified by Armin Rigo and distributed as the recommended QBSP3 for QuArK. Note that right hand box is textured correctly, but the left hand one has had the textures displaced by the 'origin' brush.

Next, the output of Geoffrey DeWan's QBSP (my build). The textures are distorted, and it fails the 'origin' displacement test.

Finally, the output of the same tool with the -origfix command-line option. This makes an attempt at fixing the 'origin' displacement test, but fails.

So my current aims are to:

  1. Fix texture distortion in my QBSP3 build
  2. To fix displacement of textures when an 'origin' brush is used.

No comments: