!!!!!!!!!h                        .:!!!!h.   !!h      !!!                  
!!!     !!!  :<!!!!:. 4!:    <!  '!~    `!>  !!!!    !!!!     !!     !!!!!!!!
!!!::::<!! .!!~   `4!. !!:  <!~      .:<!~   !! !! .!!`!!    !!!!    !!!   '!
!!!``````  !!!      !!  !! :!~    :!!~``     !!  4!!! '!!   !!~`!!   !!!!!!!!
!!!        '!!.    :!!  '!!!~    <!          !!   ~!  '!!  <!!!!!!!  !!!     
!!!         `4!!!!!!~    '!!     !!!!!!!!!!  !!       '!! <!!    ~!h !!!     


------------------------------------------------------------------------------
         8/12/96 - Version 0.6 BETA - Pov2Map File Conversion Utility
       New versions at http://www.olympus.net/personal/danks/john/pov2map.htm

                                    ***

                      Created by darksead AKA John Danks
                            email: danks@olympus.net

                                    ***

          Support Free Speech, on the interenet and everywhere else!



Changes From 0.5
----------------

Lights are now supported!  They will appear as positioned in the .pov file.
Their intensity is taken from the red component of the light and multiplied
by 500.

Also, it will not crash when you don't give it any filenames. Now, it writes
an error to the screen and shows you the correct syntax.

Displays info about parsing progress.



Introduction
------------
  This utility has been created because no one would let me beta test their
Quake Level Editors.  I as poking around on ftp.cdrom.com and I found Quake
Brush Generator 1.00 by Niklata.  This great utility makes a rectangular
brush out of two 3d points.  Then I remembered that the syntax for a box in
povray was:

box {
  <-1, -1, -1>, <1, 1, 1>  <--- Two 3d points
    texture {
        Texture_Name
    }
    scale <x, y, x>
    translate <x, y, z>
}

And then Pov2Map was born.



---------------
Files Included:
---------------

POV2MAP.EXE   - Pov2Map conversion utility
POV2MAP.TXT   - Pov2Map manual.
EXAMPLE.MDL   - Moray 2.0 datafile to accompany example.
EXAMPLE.POV   - Exported version of EXAMPLE.MDL
EXAMPLE.MAP   - Pov2Map converted version of EXAMPLE.POV
DEMO.MDL      - Files for a uncompleted level I was testing with.
DEMO.POV      -   "     "
DEMO.MAP      -   "     "

-------------
Requirements:
-------------

* Moray 2.0 or newer

* QBSP, LIGHT AND VIS

* QUAKE 0.9x
(Newer versions will not run external maps unless registered, so REGISTER!)



-------------
Restrictions:
-------------

Absolutely NO rotations allowed.
Scale and translate must use at least two axes.

Example: scale <10,20,1> is legal but scale 10*x is not.

Unions are supported but each object must be given it own texture.
The union may not be rotated scaled or translated.

Merges, Intersections, and Differences are not supported. All objects within
them will not be converted. This could be useful for testing small parts of
the level.



----------------
Syntax and Usage
----------------

  Pov2Map is very easy to use. Simply type:

pov2map <inputname.pov> <outputname.map>

 Where <inputname.pov> is the povray source file generated by Moray, and
 <outputname.map> is the name you wish to have for the resulting .MAP file.

Example:

  Startup Moray.

  Create a cube and scale it by <100,100,1> and translate it by <-1,-1,-1>

  Go to the texture editor and create a texture called TECH07_2

  Exit and give the cube TECH07_2 as a texture.

  Repeat this for the following five cubes with these values:

  Cube 2: scale <100, 1, 100> translate<  -1, -101,  99>
  Cube 3: scale <100, 1, 100> translate<  -1,   99,  99>
  Cube 4: scale <1, 100, 100> translate<-101,   -1,  99>
  Cube 5: scale <1, 100, 100> translate<  99,   -1,  99>
  Cube 6: scale <100, 100, 1> translate<  -1,   -1, 199>

  Save this as example.mdl and then export it to a povray file.

  Copy it from your \moray\povscn directory to where ever you are keeping
  Pov2Map.

  Type:

    pov2map example.pov example.map

  Run it through qbsp, light and vis.

    qbsp example.map
    light example.bsp
    vis -v example.bsp

  If vis says "no vising was performed then it means that you have an opening
  in your level. Go back and check to make sure that all of the cubes are
  touching or overlapping and the enclosed space is "air tight".

  Copy example.bsp to you \quake\id1\maps directory and start quake with:

    quake +map example

  If you've done everything correctly you should be in a small cubical room.
  If there is a hole, you will see a neutral gray area in between two walls.

  Different textures can be used by giving the cube a texture with a name
  identical to the one in the graphics wad such as COMP1_3 or Tech07_2.
  Water and sky can also been done with names like *WATER0 or SKY4.

  After you create a level in Moray you need to edit the output of pov2map
  and add entities such as lights and monsters. If I'm working on a rather
  complex level, I usually keep all of my entities in a seperate text file
  and paste them in to the .map file when I want to test it.  Also, if you
  do not include any lights the map will be equally lit throughout the entire
  level.  Pov2Map automatically places a player entity at  <0,0,64>. If this
  is a problem please contact me at the address below.



-------------
How It Works:
-------------

Pov2Map searches the povray source file for a definition of a box and then
reads in the points. It also looks for a texture name and a scale and
translate keyword.  The scale is applied to the points and then the translate
is applied and the result is written to the .MAP file.

box {
  <x1,y1,z1>, <x2,y2,z2>
  texture {
    TECH07_2
  }
  scale <x,y,z>
  translate <x,y,z>
}

Converts to:

{
 ( x1 0 0 ) ( x1 1 0 ) ( x1 0 1 ) TECH07_2 0 0 0 1.0 1.0
 ( x2 0 0 ) ( x2 0 1 ) ( x2 1 0 ) TECH07_2 0 0 0 1.0 1.0
 ( 0 y1 0 ) ( 0 y1 1 ) ( 1 y1 0 ) TECH07_2 0 0 0 1.0 1.0
 ( 0 y2 0 ) ( 1 y2 0 ) ( 0 y2 1 ) TECH07_2 0 0 0 1.0 1.0
 ( 0 0 z1 ) ( 1 0 z1 ) ( 0 1 z1 ) TECH07_2 0 0 0 1.0 1.0
 ( 0 0 z2 ) ( 0 1 z2 ) ( 1 0 z2 ) TECH07_2 0 0 0 1.0 1.0
}



-------------
Improvements:
-------------

I will develop Pov2Map until I find a decent Quake Editor. Maybe even after
that if there is anyone still interested in it.

Rotations will never be implemented until someone tells me EXPLICITLY how
to do it, including C source code.

Intersections, and Differences will probably never be implemented.

The next version will support the conversion of lights, the intensity of each
light will probably be based on the color of the light. If the red value is
1.0 then the light will be 1000. If it is 0.4 then the light will be 400.

In the next major release I will rewrite the search and convert section so
that it will apply textures and scaling and translation from unions to all
objects in them.

What do you think about converting the camera position to the player's
starting place?

I was also thinking of using the objects name in Moray as a comment in .MAP
file to identify different objects for more advanced editing.

If you would like this then contact me or it may never be added!

If you are interested in creating a web page for Pov2Map please contact me!
I would do it myself, but it would have to be text only because I have no
access to uploading with FTP.

I'm taking ideas, suggestions, and criticism at:

darksead@scn.org

                                                    
----------
Thank You:
----------

id Software of course.

Niklata (Nicholas Dwarkanath) - For Quake Brush Generator, and the specs
                                about entites and maps.



