[Previous - Step 1: Cube Map] [Next - Step 3: Post Processing]

Step 2: Render using POVray.

At this point you should have your six-sided cube map. If not, go and do the stuff in step 1. The cube sides should be named env1.tga through env6.tga and should correspond to the sides shown in the reference graphic in step 1. From this point forward we will refer to these six targa files as your cube map textures. Note that as long as your cube map textures were generated with equal horizontal and vertial FOV, it does not matter what their dimensions are. For example, Anachronox would have written screenshot files at the resolution of the game, say, 1280x960, and these non-square images are just fine for use in this step. Do NOT shrink down these images before using them here because you will degrade the quality of the environment map. We only shrink down the image sizes in the last step.

This step involves using POVray to render the cube map onto two back-to-back parabolic mirrors. If you want to see a visualization of what these surfaces look like, check out this neato render that I did (1.9 MB mpeg1 video).

POVray installation

POVray 3.1 or higher must be installed on your system. You can find a copy of POVray for Windows on our PION server. Just run POVWIN3.EXE from \\pion\devl\anox\envgen\install. This zip file in that directory is optional and does not need to be installed.

Once POVray is happily installed, take your cube map textures and dump them into \\pion\devl\anox\envgen\input. Note that since this directory is accessibly by everybody, you should make sure that nobody else is trying to do this at the same time. Now it's time to execute a batch file.

Open up a command prompt Window. Lets say you have \\pion\devl mapped to your V: drive. Go to your V: drive, then change your current directory to \anox\envgen. Now run the batch file envgen.bat. Here is a sample command prompt session:

Microsoft Windows 2000 [Version 5.00.2195]
(C) Copyright 1985-2000 Microsoft Corp.



 Volume in drive V is ION_STORM
 Volume Serial Number is 0000-0000

 Directory of V:\anox\envgen

12/04/2000  02:45p      <DIR>          .
12/04/2000  02:45p      <DIR>          ..
12/04/2000  02:08p      <DIR>          bin
12/04/2000  02:33p      <DIR>          data
12/04/2000  02:30p      <DIR>          input
12/04/2000  02:47p      <DIR>          install
12/04/2000  02:52p      <DIR>          output
12/04/2000  02:37p                 774 envgen.bat
               1 File(s)            774 bytes
               7 Dir(s)     999,999,999 bytes free

Ready to render to .\output\
Press any key to continue . . .

The envgen.bat batch file will check to make sure that all the necessary binary and data files are in the right place before proceeding. After pressing a key, POVwin for Windows should start, and it will render two 1024x1024 Targa files and place them into output. It takes a while for POVray to render, so be patient. Here is a sample screenshot of what you should see while POVray is rendering:

POVray screenshot

Note that you can interrupt the render by clicking "Stop" in the toolbar. Please do not modify the batch file on the PION server or any of the POVray scene files, since everybody is using the same files. You can copy the entire \anox\envgen directory to your local hard drive if you want to make changes. When POVray is done, the \anox\envgen\output directory should contain 1.tga and 2.tga like this:

V:\anox\envgen>dir output
 Volume in drive V is ION_STORM
 Volume Serial Number is CCE1-EA2B

 Directory of V:\anox\envgen\output

12/04/2000  09:05p      <DIR>          .
12/04/2000  09:05p      <DIR>          ..
12/04/2000  09:04p           2,644,648 1.tga
12/04/2000  09:06p           2,625,045 2.tga
               2 File(s)      5,269,693 bytes
               2 Dir(s)   1,554,313,216 bytes free

That's it! Now you have two hi-resolution renders to be used as sources for the parabolic environment map textures. You're now ready for the next step...

[Previous - Step 1: Cube Map] [Next - Step 3: Post Processing]