
Enhanced RVis/Light/BspInfo utilities
=====================================

Main features are :

* Progress feedback that works in any console and does not cause performance loss.
* Large map capacity; most limits are beyond the Quake engine capacity.
* Enhanced warning/error messages.
* Log file.


==================================================================================================

The changes from the original Vis, RVis, Light and BspInfo source code are as follows :

Light 1.14 (Aug 15 2002)

1. Added min/maxlight support using options "-light #"/"-maxlight #" or "light"/"maxlight" keys in
   worldspawn. Note that these light levels are not affected by the "-range #" option. This makes
   the combination of global options more useful.
2. Added support for disabling all light entities using option "-nolight". Using this option
   together with e.g. "-light 50" is very efficient for quickly setting a low light level in the
   map. This in turn is very useful when looking for thin brush seams or tjunction effects.
3. Added more relevant info to the warning message "Entity at ... has unmatched target".
4. Added a warning message when there are unsupported light keys detected (e.g. "_sunlight") and a
   recommendation for proper light tool (TyrLite/IKLite).
5. Reduced memory requirements, typically about 50%.
6. Added several safety checks when reading entities to prevent data corruption.
7. Clarified error message when light data size is exceeded.


RVis 2.15, Light 1.13 and BspInfo 1.11 (Jul 30 2002)

1. RVis: Fixed a serious bug that caused data corruption when vising a map with more than 16384
   numportals. The limit is now set to 65536 and a safety check is added to prevent corruption.
2. RVis: Removed the limitation that causes the error message "Leaf with too many portals".
3. Increased two BSP data limits : MAX_MAP_VISIBILITY and MAX_MAP_LIGHTING from 1 to 4 MB. This
   allows for more complex maps that QBSP compilers now are capable of.
4. RVis/Light: Fixed bugs in the option handling.
5. RVis/Light: Improved printout when warning messages appear.


BspInfo 1.10 (May 29 2002)

1. Increased several BSP data limits : MAX_MAP_ENTITIES from 1024 to 4096, MAX_MAP_ENTSTRING from
   64KB to 1MB, MAX_MAP_PLANES from 8192 to 32768 and MAX_MAP_TEXINFO from 4096 to 8192. This
   allows for more complex maps that QBSP compilers now are capable of.
2. Added safety check to ensure data integrity when the BSP data limits are exceeded.
3. Fixed a bug in printout of surfedges.
4. Added printout of models.
5. Added handling of file name wildcards.
6. Minor adjustments to handle larger values in printouts of big maps.
7. Added version number. The original BspInfo is assumed to have version 1.00.


RVis 2.14 and Light 1.12 (May 28 2002)

1. Made option parsing case insensitive.


RVis 2.13 and Light 1.11 (May 17 2002)

1. Increased several BSP data limits : MAX_MAP_ENTITIES from 1024 to 4096, MAX_MAP_ENTSTRING from
   64KB to 1MB, MAX_MAP_PLANES from 8192 to 32768 and MAX_MAP_TEXINFO from 4096 to 8192. This
   allows for more complex maps that QBSP compilers now are capable of.
2. Added safety check to ensure data integrity when the BSP data limits are exceeded.
3. Added printout of percent estimated time completed.
4. Light: Fixed a bug when writing entity strings longer than 128 byte to the BSP file.
5. Light: Added log file (LIGHT.LOG) handling.
6. Light: Added coordinates to the warning message "Too many light styles on a face".
7. Light: Removed option "-threads" as it didn't work anyway.


RVis 2.12 (Apr 16 2002)

1. Added log file (VIS.LOG) handling.
2. Added printout of # leafs (if more than one) where the "max leafs visible" can be seen.
3. Added coordinates to the complete leaf list when "-v" (verbose) is used.
4. Minor adjustments to improve printouts.


RVis 2.11 (Apr 9 2002)

1. Changed the error message "Leaf portals saw into leaf" into a warning and added coordinates.
2. Added coordinates to the error message "CheckStack: leaf recursion".
3. Added printout of max leafs visible with coordinates. This indicates the position in the map
   where the framerate will be low. Note that only worldbrushes count here, no entities.
4. Minor adjustments to handle larger leaf values in printouts of big maps.
5. Removed option "-threads" as it didn't work anyway.


RVis 2.10 and Light 1.10 (Jan 16 2002)

1. Fixed a bug in estimation when using option "-rate" with percent parameter 0 and process is
   lengthy.
2. Added version numbers. The original Vis is assumed to have version 1.00, RVis 2.00 and Light
   1.00.


RVis/Light, no version number (Nov 5 2001)

1. Improved overall estimation accuracy.


RVis/Light, no version number (Nov 2 2001)

1. Improved estimation accuracy at the beginning of a process.


RVis/Light, no version number (Oct 31 2001)

1. Added useful progress printout and an option to control it.


==================================================================================================

Details regarding progress feedback
===================================

One of the major enhancements is the ability to display progress while running.
This is especially important in the RVis process, since it may require a long time to finish.
There are other variants available (e.g. RVis+, HVis) that can also display progress, but they :

1. Increase total process time significantly.
2. Output a large amount of text and this is bad when running in the console of e.g. QuArK or WC.
3. Do not make any serious attempt to estimate how long time left until the process is finished.
   It is definitely not enough in the Vis process to display the # objects (or percentage thereof)
   that is finished, since the process is non-linear. It is quite normal to have 60% objects done
   but 80% processing time left.

==================================================================================================

Progress is displayed in the form (example from RVis) :

Base:  68.3%, Elapsed:   13:09, Left:    6:43, Total:   19:52,  68%

The "Left" time is a filtered, dynamically calculated linear estimate. It is NOT a 100% reliable
figure, but it _will_ indicate the overall progress. The first percent number displays processed
objects and the last displays estimated time completed.

==================================================================================================

There is a new option that controls this progress feedback, "-rate sec,perc,line,tot".

Explanation :

sec	minimum # seconds between screen updates, default 10
perc	minimum # percent between screen updates, default 1
line	new linefeed for each screen update, default 1 (TRUE)
tot	display total estimated time, default 1 (TRUE)


The default setting has been tweaked to suit most situations.

==================================================================================================

Tip : When you leave your computer for processing a lengthy operation (e.g. RVis), make sure
      you're using a very simple screen saver (e.g. the one that just makes the screen black).
      Modern CPU intensive screen savers can _easily_ add 50-100% processing time.

==================================================================================================

Original Vis/Light/BspInfo source code by John Carmack, www.idsoftware.com
RVis modification by Antony Suter <antony@teamfortress.com>, TeamFortress Software
Several modifications inspired by Tyrann's RVis+ and TyrLite, www.planetquake.com/tyrann


