Tread FAQ
Last Updated: 8/5/1999
Copyright © 1999 Prospect Vector, All Rights Reserved
Author: Joe Riedel
Email: jmriedel@planetquake.com

Forward
Nick and I get a lot of email everyday from users of Tread. They have questions, comments, suggestions, and all sorts of other things. We enjoy giving our users direct contact to get a hold of us and ask questions. We love to hear from everyone. However, it is suffice to say we do get a lot of repeat questions. I have compiled for you, a list of the most common problems with their solution. You should investigate this before asking Nick or I directly. If it's on the FAQ, then we may not respond to it. Many of these are verbatim quotes out of email from our users.

Questions
Q1: I looked around and Tread doesn't seem to be able to save in the .BSP format. This is very annoying. The game I’m making the map for needs a .BSP file.

A1: You must run your map by clicking the ! toolbar icon. Make sure you turn BSP on. If you need lighting, Quake2 and newer games require you to run VIS as well.

Q2: I ran my map with Tread and the game console comes up with an error "unable to load maps/xxxxx.bsp".

A2: For some reason or another, the build utilities did not produce a BSP file. Look at the built in console window in Tread for errors from the utilities.

Q3: Your stupid editor doesn't run QBSP3. QBSP3 keeps quitting with an error:

	Error:
	syntax QBSP3 [options] mapfile.

A3: You have done something incorrectly. You may have a long filename. The games directory cannot have a long filename in it. This is a limitation of the build programs. The most common problem occurs when you install the game in the "Program Files" directory.

Q4: I have configured Tread to build maps for our own game engine, using our build tools. When Tread runs the BSP program it stops with this error:

	TreadError: Unable to run BSP.EXE

A4: The most common mistake that gets Tread to report this problem is you have added extra command line parameters to the BSP program by specifying them illegally. In the Game(s) Setup dialog, Tread asks you for a BSP program to run. You cannot specify command line parameters here. If you do you will get that error. The solution to adding build specific commands is to write a batch file and have Tread run the batch.

Q5: I'm trying to build my Quake2 map with lighting. The level comes out full bright [or completely black]. I have made sure I turned on BSP, VIS and LIGHT. It's really making me mad!

A5: Okay, once again check your console for errors from the build utils. QRAD will not run if you do not have colormap.pcx in your baseq2/pics directory. Treads installation may not have installed it for you. You should be able to find it in the setups zip file.

Q6: What is carving, and how do I do it?

A6: Carving is another name for CSG, which stands for Constructive Solid Geometry. CSG is the term given to the process of performing logical operations on 3D solid shapes. You can add shapes, subtract shapes, and do the union of shapes. Tread supports one of these logic operations: subtract. 

To make it very clear first off, we greatly discourage carving of any kind. It can introduce many problems into your map that are very difficult to resolve, like leaks. You can build anything manually by hand that you can create with carve, only better. Carving is a cheap shortcut. There also is a reoccurring bug that we have yet to pin down that will cause a protection fault during some carving operations in Tread.

When you carve object A with object B, you will remove any part of A that was touching B. Object A will automatically be split up into a group of brushes.

To carve, move the object you want to carve with into whatever object you want to carve. Any part of the map touching the carving object will be removed. Right click on the object to carve with, and select "Carve".

Q7: I noticed another type of Carve called "Carve with Seal". WTF is that?

A7: This option has the potential to cause more problems then it's worth, at least as far as r_speeds are concerned. When using Carve with Seal, your r_speeds can skyrocket. Carve with Seal is a slight variation on Carve. After the normal carve Tread will attempt to seal any cracks in the objects just carved to eliminate leaks. It tends to overlap small portions of neighboring geometry causing lots of small polygons. Typically carving with objects that are angled causes leaks. This is due to floating point round off and other inconsistencies. Carve with Seal is only successful about 70% of the time at eliminating cracks. It is highly dependant on the circumstances of the Carve.

Q8: The fricken x/y shift controls on the face dialog are disabled! How the heck do I shift the face texture?

A8: They are disabled because you have "Texture Locking" on. To turn off texture locking unclick the Lock icon on the side toolbar. Tread disabled them because when texture locking is enabled it is controlling the x/y shift values.

Q9: I'm new to map editing. Can you please explain to me what BSP, VIS, and LIGHT do?

A9: I'd love to :). We'll start at the top.

Tread deals with a high level geometry format that stores grouping information and other things. Your map must go through some compilers before you can run it. Your map goes through 3 different types of files and compilers when compiling: From .TRD to .MAP to .BSP.

Quake2 and other games are heavily graphics intensive. They deal with a lot of geometry. That is, they draw lots and lots of polygons on the screen every frame. A problem that crops up very, very quickly is, for a given location in your map, what parts should we draw? You can't draw the entire map every frame and get any kind of decent playable frame rate.

BSP: QBSP3
A special data structure is employed to solve this problem, called a BSP Tree. BSP stands for Binary Space Partition. To stay away from getting too technical (lord knows we could) we will simply say that QBSP3 breaks up your map into many self contained pieces and generates a BSP tree of your map. 

VIS: QVIS3
You may be wondering how dividing a big map into little pieces helps you determine what's visible from any given point. The truth of the matter is it does, but not very much. By dividing the map up, you can remove parts of the map not in the view, but it doesn't help sort out what's in front of you.

To solve this problem Quake2 employs a program called QVIS3. QVIS3 computes visibility inside your map. It takes every little area divided up by QBSP3, and computes what other little areas can be seen from that one. Once the game engine has figured out what peice of the map your in, it just has to look up what other parts of the map that you can see. Needless to say, visibility computations are heavily math intensive and require a few hours to run a complete vis.

There are different levels of VIS as well. Normal, and Full. Normal is considerably faster than Full, and for good reason. Normal only discards parts of the map that are obviously not visible. A Full vis will refine the set of visible areas much better than Normal vis will. The end result? Normal vis completes faster but the average polygon count per frame is higher. Full vis takes longer, but there are much fewer polygons drawn per frame. You should always do a full vis of your map before releasing it publicly.

LIGHT: QRAD3
Lighting has nothing to do with the visibility problems. Those are solved by QBPS3 & QVIS3. You know the cool colored lighting in Quake2? That's all precompiled by QRAD3. This is also a very intensive operation, though not quite as bad as VIS. QRAD3 requires VIS to be run to speed up it's calculations. The type of lighting performed is called Radiosity lighting, and is a much more realistic form of lighting that done by Quake. I won't get into how it works here.

Q10: What is a leak?

A10: A leak is a hole (it may be microscopic) in your level that allows some entity from the inside of the map to get to the outside surrounding void. QBSP3 does what's called hull clamping. It clamps or removes outer surface geometry from the map. This eliminates surfaces that could never be seen. If your level leaks you will not be able to vis or light it.

Do not just surround you map with a huge cube or something to get the level to seal correctly. This will substantially increase build times, and increase r_speeds as well.