Quake BSP Portalizer (BSP2PRT)

Version 1.0



by Alex R. Moon (odin@mdn.com)

based on original code by John Carmack (johnc@idsoftware.com)



Description:

      BSP2PRT creates a .PRT file from a .BSP file which allows that .BSP

      to be "re-vised".  What that means is that you can now recompile all

      your maps to use GLQuake's transparent water with virtually _NO_ speed

      hit.  This utility will also allow map-makers to re-vis their maps

      without having to re-qbsp them if the .PRT file has been erased or

      allow end-users to re-vis maps which were distributed without being

      fully vised.



Installation:

      Simply place the BSP2PRT executable in a convenient directory.



Required Software:

      QUAKE.EXE!

      VIS.EXE (or another "vis"-type program) to do the dirty work

      UNPAK.EXE (or another unpaking program) if you want to recompile paked

         levels (such as id's original levels)



Use:

      To generate a .PRT file from a .BSP file use:



         BSP2PRT.EXE [-nowatervis] [path\]filename[.bsp]



      The "-nowatervis" option disables transparent water in the resulting

      .PRT file.



      After you have generated a .PRT file you can recompile the .BSP using:



         VIS.EXE [-fast|-level {1|2|3|4}] [path\]filename[.bsp]



      See the documentation for your particular vis program for information

      on the available options.



      For example, to recompile E1M1.BSP to enable transparent water in

      GLQuake one would do:



         C:\QUAKE\ID1\MAPS> bsp2prt e1m1.bsp



         outputfile: e1m1.prt

         ----- portalize -----

         writing e1m1.prt

         2.0100 seconds elapsed



         C:\QUAKE\ID1\MAPS> vis e1m1.bsp



         ----- vis -----

         1148 portalleafs

         3312 numportals

         average leafs visible: 117

         c_chains: 5518616

         visdatasize:38535  compressed from 154151

         2315.0 seconds elapsed



         C:\QUAKE\ID1\MAPS>



      (NOTE: for the above to work, both BSP2PRT and VIS must be in your

      path.)



      NOTE: If you want to convert id's levels you must first unpak them from

      the pak0.pak and pak1.pak files in your Quake\ID1 directory using one

      of the many unpaking utilities available.



Technical Details:

      The portal file (.PRT) output by QBSP.EXE is generated using the BSP

      (Binary Space Partition) tree.  The BSP tree is stored in it's entirety

      in the .BSP file (obviously).  VIS.EXE needs only the .PRT file to

      reprocess the PVS (Potentially Visible Set) for a .BSP.  Furthermore

      the translucency of water is solely a function of the information

      stored in the .PRT file.  Therefore it is possible to use the

      information from a .BSP file to reconstruct the .PRT file that would

      have been created by QBSP and to then use that .PRT file to recompile

      the PVS information in the .BSP.



Features:

      - Allows re-vising of pre-compiled maps.

      - Allows recompiling of maps not originally compiled for transparent

        water to enable transparent water in GLQuake.

      - Allows the user to specify whether or not water should be treated

        as transparent.



Bugs:

      - None! (at least, not that I'm aware of)



Thanks To:

      - Ken Alverson (KenA@TSO.Cin.IX.Net) for his WQBSP program which gave

        me the idea and the incentive to create this program.

      - John Carmack (johnc@idsoftware.com) for being cool enough to release

        not only his utilities, but the source code to go along with them.

      - id Software for Quake!

