Enhanced TxQBSP =============== Main features are : * Very low memory requirements, typically 10-20% of most other compilers. * Fast processing, partly due to the low memory requirements. * Large map capacity; most limits are beyond the Quake engine capacity. * High precision in floating point calculations. * MultiWAD (WorldCraft-style) and wildcard support. * Support for default wad file if no other wads found. * Support for Valve WAD3 format. * Support for Hipnotic/Ritual entity rotation. * Support for enhanced texture positioning in QuArK. * Support for Valve 220 map format, e.g. from Hammer. * Support for Q2/Q3 map format, e.g. from GtkRadiant. * Support for floating point coordinates in map files (e.g. from QuArK). * Enhanced warning/error messages. * Enhanced leak handling. * Progress feedback that works in any console and does not cause performance loss. * Transparent water support. * Cleanup of texture names. * No hull files. * Log file. ================================================================================================== The changes from the TxQBSP 0.6 source code are as follows : TxQBSP 1.13 (Oct 5 2006) 1. Added new option "-group" that enables support for func_group parsing from editors like GtkRadiant. Thanks to Vic for this one. TxQBSP 1.12 (Jul 9 2005) 1. Added coordinates to several portal error messages. TxQBSP 1.11 (Feb 16 2005) 1. Improved handling of complex maps such as terrain. This is done by increasing precision when identifying unique planes (faces) and modifying hull expansion logic. This reduces the risk of clipping errors and creates much smoother clipping hulls which can help player/monster movements. All maps don't benefit from this, therefore two new options have been introduced; "-oldexpand" which just disables the new expansion logic and "-epsilon x" (default 0.01) which sets the plane identifying tolerance. To revert to previous compiler behaviour, just add options "-oldexpand" and "-epsilon 0.05". The default settings have been chosen for overall best results. If you have a big map that still doesn't build correctly, you can try lowering the epsilon even more, e.g. 0.001. In most maps the default settings have little effect on # clipnodes, but some maps can see either a significant increase or decrease. Thanks to Tyrann for this one. 2. Removed option "-altexpand" as it's replaced by the new logic. 3. Increased MAX_FACES (# faces on a brush) from 128 to 512 and MAX_MAP_PLANES from 32k to 64k to accommodate the new hull expansion. A warning will still be printed if planes exceed 32k. 4. Changed some of the "Brush not closed" warnings into "Too few/many faces in brush" and kept the brush if possible. 5. Added coordinates to the "CheckFace: Non-convex" error. 6. Fixed minor bugs in verbose printout handling. TxQBSP 1.10 (Oct 1 2004) 1. Changed warning for # faces exceeding normal engine capacity from 64k to 32k. TxQBSP 1.09 (Sep 11 2004) 1. Added new option "-q2map" that enables support for Q2/Q3 map file format from editors like GtkRadiant. Thanks to Riot for this one. 2. Added automatic healing to point off plane warnings by adjusting the points to the plane. 3. Added new option "-altaxis" that enables an alternative handling of 45 degree textures (same as the default behaviour of TreeQBSP). 4. Reduced MAX_MAP_PLANES/MAX_MAP_TEXINFO to 32767 and MAX_MAP_VERTS/MAX_MAP_FACES to 65535 to conform with the bsp format limits. 5. Added warnings for various objects exceeding normal engine capacity. TxQBSP 1.08 (May 22 2004) 1. Minor improvement of compiling speed for maps that spend a lot of time in the SolidBSP stage. Thanks to Tyrann for this one. 2. Added coordinates to the "CheckFace: BOGUS_RANGE ..." error message. 3. Fixed a bug that prevented '%' characters in the map title from being written to the log file. TxQBSP 1.07 (Apr 23 2004) 1. Added a check for each axial brush forming a closed volume. If a brush is not closed, the bsp file might get corrupt and crash the engine. 2. Added error messages for various objects exceeding theoretical bsp limits. 3. Added warnings for various objects exceeding normal engine capacity. 4. Increased the clipnode limit from 32k to 256k. There will still be a warning at 32k. TxQBSP 1.06 (Mar 8 2004) 1. Added support for wildcard "*" in wad file specifications, e.g. "c:\wads\*.wad". 2. Added new option "-verbosetex" to enable more texture information printout. At this time, it will print the wad name for each found texture. Using "-verbose" will also enable this. 3. Added a correction when using Valve 220 format and texture scale 0. It will now be set to 1, same as Classic Quake format. 4. Fixed a bug when log file couldn't be opened. 5. Fixed minor bugs in wad file specification handling. 6. Changed some memory printout texts for clarity. TxQBSP 1.05 (Feb 18 2004) 1. Added support for Valve WAD3 format. 2. Fixed a bug that in large maps sometimes could produce a crippled leak line. 3. Improved results when using the "-altexpand" option. This sometimes helps reducing # clipnodes, getting rid of leaks or clipping errors. Thanks to XP-Cagey for this one. 4. Moved the missing texture handling to the beginning of map processing. 5. Added new option "-nofillvis" which disables filling of hull 0 (the visible hull). This can shorten the turnaround time when compiling large maps that spend a lot of time in the hull 0 SolidBSP stage. Note that no portal (prt) file is generated and the produced bsp may not be loadable in the engine. 6. Improved file error handling and added filename to the error messages. 7. Changed so using the "-onlyents" option will automatically enable "-hilimit". 8. Removed printout of animating textures if 0. 9. Changed bsp summary printout for higher capacity. TxQBSP 1.04 (Feb 3 2004) 1. Added support for Valve 220 map file format from editors like WorldCraft 3.3 and Hammer. However, wads still need to be in WAD2 (standard Q1) format. See also notes below. Thanks to Riot for this one. TxQBSP 1.03 (Jan 29 2004) 1. Added coordinates to the "CutNodePortals_r: New portal was clipped away" warning message. This warning indicates brush misalignments. 2. Reduced # planes written to bsp to conform with TreeQBSP. TxQBSP 1.02 (Jan 10 2004) 1. Added new option "-noents" that removes all entities except world and players. This is very convenient when dealing with architecture related problems. Recommended together with the "-solid" or "-hull #" options. TxQBSP 1.01 (Nov 24 2003) 1. Added a warning for different # models in bsp and map when using "-onlyents". TxQBSP 1.00 (Sep 18 2003) 1. Added a check for the world being the first entity. 2. Added a check for no entities in map. TxQBSP 0.99 (Aug 26 2003) 1. Fixed a bug that could occur if using a rotate_object with a target that had no origin key. This would generate an invalid "0 0 0" origin key for the rotate_object. Also, improved information for bad rotate targets and removed repeated printouts. 2. Changed error "Too few faces in brush ..." into a warning. 3. Changed warning "No entities in empty space ..." into a critical warning (always printed). 4. Added warnings for multiple or missing info_player_start entities. TxQBSP 0.98 (Jul 29 2003) 1. Added coordinates and texture printout to the "SubdivideFace: Didn't split the polygon ..." error message. This error usually means that a texture is scaled too small. TxQBSP 0.97 (Jul 15 2003) 1. Improved compiling speed for maps that spend a lot of time in the CSGFaces stage. There is a new option "-oldcsg" if you prefer the old method. Thanks to Tyrann for this one. 2. Added new option "-altexpand" that enables an alternative brush expansion method. This might help solving some clipping errors. Beware that # clipnodes normally increases. Thanks to Tyrann for this one. 3. Reduced memory requirements, typically about 25%. 4. Added new option "-priority #" to set the thread priority 0-2 (below/normal/above, default 1) in order to make the compiler more flexible in the Windows environment. 5. Added printout of total # faces and map title ("message" in worldspawn). 6. Changed warning "No valid wad files ..." into a critical warning (always printed). 7. Improved linearity in the SolidBSP progress feedback. TxQBSP 0.96 (Jun 11 2003) 1. Added new option "-numpercent" to select a numerical progress indicator instead of the default bars. Note that this only works properly in the operating system console. 2. Increased MAX_MAP_PLANES (32k to 64k), MAX_MAP_VERTS (64k to 1M), MAX_MAP_FACES (64k to 128k) and MAX_MAP_MARKSURFACES (64k to 128k) to handle unusual conditions. 3. Added new option "-hilimit" to set a special extreme capacity mode. When enabled, several bsp format limits (e.g. max # nodes) can be exceeded. Use with caution. TxQBSP 0.95 (May 29 2003) 1. Added support for Hipnotic/Ritual entity rotation. 2. Changed default hull processing order to 0-1-2 (instead of 1-2-0) and added a new option "-starthull #" to select this (0-2, default 0). This is very convenient in large maps when there is a leak in a certain hull. While trying to fix the leak you just tell the compiler to start with that hull and then you'll get feedback faster if you've actually fixed the leak or not. The compiled result depends somewhat on the hull order but differences are usually small. 3. Added new option "-nofillclip" which disables filling of hull 1 (the player clipping hull). This can help when having troublesome clipping problems, i.e. the player walking/falling through walls/floors. Beware that # clipnodes will increase and may exceed the limit in large maps. 4. Minor reduction of memory requirements. 5. Added new option "-percent" to be used after "-quiet". TxQBSP 0.94 (May 15 2003) 1. Added new option "-expand #" which makes all brushes expand a selectable distance (recommended values are 0.5-2.0). This will have the effect of automatic sealing of tiny gaps that cause leaks. However, brush overlaps and therefore compile time will increase. Some texture issues may also occur, since the compiler adds new faces that lacks specific texture info. 2. Added new option "-solid" which removes all liquid worldbrushes and treats sky as solid. This can be really helpful when hunting for leaks and/or increasing loadability in the engine. 3. Changed error "CheckFace: Face with too few ..." and some of the "Mixed face contents ..." errors into warnings. 4. Changed option "-leak #" to select which hull (0-2) to generate a pointfile for. Default value is -1, which means any hull. As before, by selecting an invalid hull # (e.g. 3), you might be able to force the output of a prt file even if there is a leak. 5. Fixed a bug where loading and saving a bsp (using option "-onlyents") would cause random garbage bytes to be written at the end of each data lump. These bytes aren't harmful but may be confusing in a file comparison. 6. Added new option "-quiet" which just enables "-noverbose -nowarnings -nopercent". TxQBSP 0.93 (Apr 10 2003) 1. Improved check for invalid wad files. 2. Added line # to and removed entity information from the "Entity with no valid brushes" error message. 3. Added new option "-nowarnings" which disables most warning printouts to screen. 4. Added printout of total # warnings. 5. Changed the various verbose options so that log file will always be unaffected by limiting options like "-noverbose". Also, "-verbosemem" will now only cause output to log file. This makes it possible to have a really compact screen printout but still have all details in the log file. Try options "-noverbose -nowarnings -nopercent" and see how it looks. 6. Added more detail to some of the error/warning messages. 7. Fixed a bug in printout of bsp version when mismatch. 8. Added new option "-hull #" that selects which hull (0-2, default 0) that should be made visible. This is highly experimental and should only be used for tracking down difficult leaks in hulls 1/2 or educational purposes. Look out for HOM effects in hulls 1/2, that might indicate clipping errors. TxQBSP 0.92 (Mar 11 2003) 1. Added a check for multiple world entities. 2. Improved line information when checking entities. TxQBSP 0.91 (Feb 11 2003) 1. Fixed a bug which prevented default wad handling when truncated (but valid) path existed in the wad key. TxQBSP 0.90 (Nov 15 2002) 1. Fixed a crash bug that could occur if there were no brushes in the worldspawn entity. 2. Added a check to make sure all entities have a key "classname". 3. Added a check for too few faces in a brush. Now there must be at least 4 faces in each brush. TxQBSP 0.89 (Aug 19 2002) 1. Fixed a bug which caused the compiler to abort if the warning message "Brush plane with no normal ..." occurred. TxQBSP 0.88 (Jul 26 2002) 1. Fixed bugs in the option handling. 2. Added a more descriptive option printout. TxQBSP 0.87 (Jul 16 2002) 1. Added automatic sorting of brush faces while loading the map file. The compiler is very sensitive to different face ordering so the deterministic sorting has two benefits. The first is independence of the editor saving order, especially QuArK has problems with this. The second is that the sort order has been chosen in an attempt to minimize error/warnings and to increase speed in most maps. There is a new option "-nosortface" to disable this behaviour. 2. Added map file line information to the "Couldn't create brush ..." warning message. 3. Fixed a bug that was causing data corruption when exceeding MAX_FACES (128) and added map file line information to the error message. TxQBSP 0.86 (Jun 25 2002) 1. Improved compiling speed when there are large brushes covering parts of the map (for testing purposes). Thanks to Tyrann for this one. TxQBSP 0.85 (Jun 14 2002) 1. Added leak line simplification handling (same as TreeQBSP) which is now default. There is also a new option "-oldleak" if you prefer the old variant. 2. Added new option "-simpdist #", which sets the "simplification distance" (default 100) that is used when simplifying the leak line. Lower values can make the process faster but the line will probably be longer. TxQBSP 0.84 (Jun 6 2002) 1. Added new option "-fill", which will force filling in hulls 1/2 when there are leaks. This is very useful in large maps when the leaks cause the max # clipnodes (32767) limit to be exceeded which aborts the compile. The forced filling will probably cause the player and most other entities to be stuck when loading the map in Quake. Use noclip to move around and find the leaks by loading the pointfile. 2. Increased the default value for the distance between dots in pointfiles from 2 to 4. This cuts the total # dots in half while still maintaining a visible trail. 3. Added validation of the "-leakdist" option value. TxQBSP 0.83 (May 21 2002) 1. Added check to prevent using a sourcefile with the extension ".bsp". 2. Made option parsing case insensitive. TxQBSP 0.82 (May 6 2002) 1. Added proper handling of memory allocation problems. If you run into this, your virtual memory limit is too low in Windows. 2. Changed printout so info for hull 0 is printed instead of hull 1. This is more relevant and conforms with TreeQBSP. There is a new option "-oldprint" if you prefer the old variant. 3. Added new display option "-noverbose" for a minimal printout. TxQBSP 0.81 (Apr 16 2002) 1. Increased MAXEDGES from 32 to 64. This allows more complex brush arrangements in the map. 2. Fixed a file handle leak. TxQBSP 0.80 (Mar 18 2002) 1. Fixed a crash bug when maximum # clipnodes (32767) were exceeded. TxQBSP 0.79 (Mar 4 2002) 1. Increased floating point precision from float (32-bit) to double (64-bit). This helps avoiding problems in some maps and improves tjunction calculations. 2. Due to the increased precision, memory requirements nearly doubled. To compensate for this, another reduction was made and requirements are now about the same as before. 3. Eliminated hull files. If they exist at startup, they will be removed to avoid confusion. 4. Removed options "-draw", "-noclip", "-usehulls" and "-hullnum" as they didn't work anyway. TxQBSP 0.78 (Feb 14 2002) 1. Another reduction of memory requirements, in some situations up to 40%. 2. Added handling of multiple wad files using standard format, e.g. "f1.wad;f2.wad;f3.wad". 3. Increased MAXTOKEN again from 256 to 1024. 4. Added new option "-verbosemem" to enable extra memory printout without extra map info. 5. Fixed a bug in the FillOutside printout. 6. Fixed a file handle leak. TxQBSP 0.77 (Jan 29 2002) 1. Added coordinates to the "Checkface: # points" error message and clarified it. 2. Added portal file information to the Portalize printout and changed it slightly. 3. Added # faces and texture (max 4 unique) printout to the "Couldn't create brush faces" warning message. 4. Changed prt file handling so vis portals between adjacent sky brushes are not generated. 5. Fixed a small memory leak. 6. Minor adjustments to handle larger values in printouts of big maps. TxQBSP 0.76 (Jan 15 2002) 1. Another reduction of memory requirements, typically about 30%. This also reduces processing time with about 20%. In some maps, the Tjunction calculations will behave slightly differently as a result. 2. Added handling of a default wad file. If no wad file is specified or none can be found, then a wad file with the same name in the same directory as the map file will be used. 3. Increased MAXTOKEN (size of a token string in the map file) from 128 to 256. 4. Fixed a bug when writing entity strings longer than 128 byte to the bsp file. 5. Added face contents printout to the "Mixed face contents" error message. 6. Added entity printout to the "Entity with no valid brushes" error message. 7. Added check for too long texture names in map file. 8. Moved warning/error handling of missing/invalid wad files to the beginning of the processing. 9. Fixed bugs in general path name handling. 10.Fixed a bug in bsp summary printout. 11.Fixed a bug and improved linearity in the progress bars. 12.Improved accuracy in memory summary calculations and changed printout slightly. 13.Added new option "-nopercent" to disable progress bars. 14.Other minor adjustments to clarify printouts. TxQBSP 0.75 (Jan 3 2002) 1. Fixed a memory corruption bug that caused crashes in 0.74 and erratic behaviour in all earlier versions (e.g. error message "Bad contents" for no obvious reason). 2. Increased MAX_MAP_ENTSTRING (total amount of entity data) from 64KB to 1MB. 3. Added entity classname to the leak printout (e.g. "item_shells"). 4. Added simple progress bars to calculation intensive parts. The bars display one character for each 10% completed and the positions for 50% and 100% are marked with a '+', i.e. "----+----+". 5. Fixed a bug in printout of "CanonicalVector: degenerate edge" error and turned it into a warning. 6. Changed elapsed time and memory summary printout slightly. 7. Tjunction calculations are now printed. 8. Removed the printout of models altogether when "-verbose" is not used. 9. Changed coordinate printouts slightly. TxQBSP 0.74 (Dec 20 2001) 1. Major reduction of memory requirements, typically about 75% (!). This also reduces processing time with about 5-10%. 2. Increased MAX_FACES (# faces on a brush) from 32 to 128 (same as TreeQBSP). 3. Added memory allocation summary printout and removed printout about "BSP data size". When option "-verbose" is used, even more memory information is printed. TxQBSP 0.73 (Dec 14 2001) 1. Added new option "-leak #" (default 1) to select which leak to generate a pointfile for. Note that when using an invalid leak # (e.g. 0), you might be able to force the output of a prt file even if there is a leak. The Vis process will probably be substantially extended in this case. 2. Improved handling of texture names when used in mixed upper/lower case in map/wad files or when there are ending garbage characters in wad files. Thanks to Maddes at Quake Info Pool (www.inside3d.com) for this one. 3. Added map file line information to warning/error messages. 4. Fixed a bug where both prt and pts files were generated. TxQBSP 0.72 (Dec 5 2001) 1. Improved handling of pointfiles when there are leaks in different/several hulls. 2. Added new option "-leakdist #" (default 2) to reduce the amount of dots in pointfiles. 3. Fixed a rather large memory leak. 4. Fixed a bug in map file line counter (used in warning/error messages). 5. Changed leak warning for clarity. TxQBSP 0.71 (Nov 26 2001) 1. Changed error "Degenerate edge" into a warning and automatically attempting to heal it. 2. Reinserted error "Point off plane" and changed it into a warning. 3. Improved visual information for the above warnings and the "Mixed face contents in leafnode" by supplying coordinates. TxQBSP 0.7 (Sep 11 2001) 1. Fixed some serious bugs in the leak handling. Now the coordinates for the leak are displayed correctly and the pts file is generated if there is a leak in hull 0. 2. Improved display output in the QuArK console so it updates while running. 3. Fixed the prt file problem. This fix at least creates consistent prt files, but I'm still uncertain if the conditions for watervis are correct. 4. Added the VC compiler switch /Op ("Improve floating point consistency") which eliminates the differences in results that otherwise occur between debug and release version of the TxQBSP program. This is a rather significant matter, since one of the points with QuArK and the TxQBSP program seems to be improved precision in calculations. Unfortunately, this disables some optimization and makes the program slower (~20-30%). Better slow than sorry ... 5. Removed the hull files after usage. 6. Removed 0-byte prt/pts files for clarity. 7. Minor speed enhancements that don't affect result but unfortunately don't help much either :( 8. Optimized build cuts the exe size in half. ================================================================================================== Note : Some lighting problems might occur when using most light tools together with a compiler that supports enhanced texture positioning (e.g. QuArK ETP or Valve 220 Hammer). Light 1.27 and TyrLite 0.94 (see Tyrann's site below) or later versions support ETP. ================================================================================================== Original QBSP source code by John Carmack, http://www.idsoftware.com TxQBSP 0.6 source code by Armin Rigo, http://www.planetquake.com/quark Several modifications inspired by Greg Lewis' TreeQBSP, http://toronto.yossman.net/~tree and Tyrann's TyrQBSP, http://disenchant.net Valve and Q2/Q3 support inspired by Riot's DuBSP, http://www.orbiter-productions.com/alchemy Alternate clip hull generation inspired by XP-Cagey, http://www.xp-cagey.com