These instructions are only for bsp2wrl2 version 1.1.
Unpack the bsp2wrl2 archive into a directory. If you run it with no options, it will print out the version number with a help screen and stop.
If you want to use bsp2wrl2 with textures, you must first extract the textures directories from the Quake 2 pak0.pak file. We recommend a utility such as QPed (http://www.planetquake.com/qped/) for this task.
You must move the directories in textures (e1u1, e1u2, etc.) so that they are directly below the directory where bsp2wrl2 is working. Our example below will clarify this procedure.
If you want to have a background (sky), you must also extract the env directory from the pak0.pak and convert all the TGA files in there to JPG files. We recommend a utility such as Paint Shop Pro (http://www.jasc.com/psp.html) or pbmplus (http://www.acme.com/software/pbmplus) for this job.
bsp2wrl2 [options] bspfile wrlfile
-h | Help Screen |
-d | Dump Texture Files in GIF format |
-b x0 y0 z0 x1 y1 z1 | Only process inside bounding box |
-n | No textures |
-b | No background node |
-x | Output a DXF file instead of VRML |
-xb | Output a binary DXF file (must use for 3DS) |
Options have to come before the filenames. If a wrlfile is not given, the default is the same as bspfile with the BSP extension replaced by WRL.
To generate the textures for WRL files, use the -d option. It will convert any WAL files found to GIF format.
The DXF files output by the -x and -xb options use a polymesh to represent each BSP leaf. There is no texturing or lighting, just geometry. If you want to import the DXF into 3D Studio you must use the -xb option.
This example shows how to convert the first level of Quake 2.
We'll assume that your Quake 2 directory is c:\quake2, and that you have extracted all the files in the bsp2wrl2 archive into c:\bsp2wrl2.
If bsp2wrl2 warns that it could not find textures, this means that there will be holes in your VRML world where the missing textures should be. If you want to generate a full world with no textures, use the -n option.
In order to get the Background node to look right, you will have to alter the orientation of some of the pictures.
Portions of bsp2wrl2 are from the id Software utility source distribution.
Our WAL to GIF conversion code is based on ppmtogif, which carries this notice:
Copyright (C) 1989 by Jef Poskanzer. Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. This software is provided "as is" without express or implied warranty.