home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Dream 44
/
Amiga_Dream_44.iso
/
RiscPc
/
pov
/
raw2pov.arc
/
raw2pov
/
Readme
< prev
Wrap
Text File
|
1993-10-02
|
9KB
|
239 lines
Raw to POV-Ray Converter v1.8
Copyright (c) 1993 Steve Anger
RAW2POV is a utility that converts lists of triangle coordinates in raw
ascii text format to various raytracer formats. Adjustable levels of smoothing
can be applied to the triangle surfaces. If you're outputting to POV-Ray 1.0,
raw2pov will automatically add an efficient set of nested bounding shapes to
the scene to speed up the rendering.
POV-Ray users! Since POV-Ray 2.0 has now been released to the public the
default output format has been changed to POV-Ray 2.0. If you're still
using POV-Ray 1.0 you can still generate 1.0 compatible files by using
the -op1 switch.
File Format:
The triangle data can be organized in one of three formats:
1) Default - Nine numbers per triangle
Ax Ay Az Bx By Bz Cx Cy Cz
e.g. -3.5 -4.1 -5.0 -3.9 -6.2 -5.0 -3.4 -6.2 -7.0
2) Fractint colour (-fc) - Twelve numbers per triangle
R G B Ax Ay Az Bx By Bz Cx Cy Cz
e.g. 1.0 1.0 0.0 -3.5 -4.1 -5.0 -3.9 -6.2 -5.0 -3.4 -6.2 -7.0
3) Texture names (-ft) - Nine numbers and one texture name per triangle
Ax Ay Az Bx By Bz Cx Cy Cz TEXTURE
e.g. -3.5 -4.1 -5.0 -3.9 -6.2 -5.0 -3.4 -6.2 -7.0 RedPlastic
Ax, Ay, etc are the x,y,z coordinates of the three triangle vertices A, B,
and C. R, G, and B represent the Red, Green, and Blue components of the
triangle colour and range from 0.0 to 1.0. TEXTURE is a string indicating
the texture name. The numbers/names can be separated by spaces, tabs, or
carriage returns.
Non-numeric identifiers can be used to separate groups of triangles
representing different objects. See CHESS.RAW for an example.
Hardware Requirements:
Two version of the executable are included in this archive, RAW2POV.EXE and
RAW2POVX.EXE. The first version will run on all machines from XT's to 486's
but is only capable of using 640k of memory. The second version requires a
minimum of a 386 with a co-pro to run but can use all available memory plus
up to 128M of virtual memory.
Usage: raw2pov inputfile[.raw] [outputfile] [options]
Options:
-snnn - Generates smooth triangles. The boundary between triangles are only
smoothed if the angle between the triangles is less that nnn deg.
-s0 will not smooth any triangles while -s180 will smooth all
triangles. Values from -s45 to -s90 usually work well. If
unspecified smoothing defaults to -s70.
+v, -v - Turn verbose status messages on or off. Messages are off by default.
+i, -i - Turn internal bounding on or off for POV-Ray. By default internal
bounding is on for POV-Ray 1.0 output and off for POV-Ray 2.0 output.
-1 - Bound all of the input objects as a single object. By default all
objects are bounded separately and then combined. This option may
produce better results in some cases, especially if the input file
contains a large number of very small objects.
-x - Exchanges the Y and Z coordinates of all triangle vertices. Useful
if the input file was generated from a program that uses the Z
coordinate as vertical rather that the Y coord as is normally used in
POV-Ray.
-c - Adds a camera and a light source to the scene. The camera is
automatically adjusted to frame the object.
-fc - Specifies that the input file is in Fractint style colour format
with 12 numbers per triangle.
-ft - Specified that the input file contains texture names.
-op - Output to POV-Ray 1.0 format (default).
-op2 - Output to POV-Ray 2.0 format (2.0 is unreleased as yet).
-ov - Output to Vivid 2.0 format.
-ol - Output to Polyray format.
Examples:
// Convert CHESS.RAW to POV-Ray 2.0 format.
raw2pov chess
// Convert CHESS.RAW to POV-Ray 1.0 format. Add a camera and light.
raw2pov chess -op1 -c
// Convert CHESS.RAW to Vivid format with Y and Z axis' swapped
raw2pov chess -ov -x
// Convert CHESS.RAW to POV-Ray format with full smoothing and a new name
raw2pov chess melted -s180
Note: Smooth triangles will only work properly if the input file uses
consistent clockwise or counter-clockwise vertex ordering. Most CAD packages
that output triangular data will already have the data in the proper order.
Environment Variable:
If you find that you're often using the same command line options over and
over again you can set up your default command line options in the RAW2POV
environment variable. e.g. If you always want to have a camera and light
added to your scene you may want to add the following line to your
autoexec.bat:
set RAW2POV=-c
Commands specified in the environment variable will be overridden by those
specified on the command line.
Revision History:
Changes in v1.8
- Added POV-Ray 2.0, Vivid 2.0, and Polyray output.
- Default smoothing changed from 60 degrees to 70 degrees.
- A couple changes to the command line options.
- Doesn't choke on decimal numbers with no leading zero (e.g. ".25")
- RAW2POV environment variable added.
Changes in v1.7
- The -ft option in 1.6 just plain didn't work (oops).
- The -c option will automatically add a camera an light source to the scene.
- Fixed a bug that occasionally generated a bad smooth triangle normal.
Changes in v1.6
- Put the named texture feature back in with a command line option to turn
it on (-ft). A few people missed it.
Changed in v1.5
- Outputs POV-Ray 1.0 format files only.
- Uses the new box primitive available in POV-Ray 1.0 as a bounding shape.
- Accepts unformatted input rather than the one triangle per line format
used with previous versions.
Changes in v1.4
- Name changed from TXT2POV to RAW2POV.
- Now outputs only lower case keywords. I'll assume nobody's using DKB any
more.
- Allows you to swap the Y and Z axis when converting for those files that
use the Z coord as vertical.
- Automatically removes illegal characters in object/texture names.
- Better rejection of degenerate triangles.
- Little bug fixes here and there.
Changes in v1.3
- Name changed from TXT2DKB to TXT2POV although the version number was not
reset. The output files should be compatible with both DKB 2.12 and POV
0.50 beta.
- Nothing new as far as faster rendering times. :(
- The graphic preview was getting to be a pain to maintain in this version so
I dropped it.
- Protected mode compile (TXT2POVX) is now VCPI compliant and should work
with most 386 memory managers. Desqview and Windows are still no-no's.
- Now outputs both a data (.dat) file and a separate include (.inc) file
instead of one big data file.
- Generated files are about 30% smaller.
- You can now specify object and texture names in the input file.
Changes in v1.2:
- Added nested bounding shapes for improved rendering times (especially for
very large objects). Uses a mangled version of the octree method.
- Bounding shapes optionally shown in preview.
Changes in v1.1:
- The optimization routines can now handle input files that contain very
large numbers of different colours such as those generated by Fractint.
Bench Marks:
------ Render Time -------
Bounding Before After Speed-up
Object Triangles Index * Bounding Bounding Factor
-------- --------- ------------ ------------ ------------ --------
SKULL 1489 16.1 442s 46s 9.6
CAR1 3357 33.9 433s 25s 17.3
CHESS2 12583 165.5 1291s 39s 33.1
PLASMA 3672 52.9 669s 31s 21.6
ROBOTECH 2488 27.3 560s 31s 18.1
VENUS 1417 19.2 209s 24s 8.7
* Bounding index reported by RAW2POV when using -v option.
All images rendered at 160x100 on 33Mhz 486DX. Results should be scalable to
higher resolutions.
Compiler:
The protected mode version of this program was compiled with DJGPP 1.10,
DJ Delorie's DOS port of the GNU C/C++ compiler. Source code and executables
for this compiler and the DOS extender can be obtained from the following
ftp site:
host: omnigate.clarkson.edu
login: ftp
password: send your e-mail address
directory: ~ftp/pub/msdos/djgpp
Files:
RAW2POV.EXE - Raw to POV executable (compiled with Borland C++). Can handle
files of up to approximately 4500 triangles. Less when
generating smooth triangles.
RAW2POVX.EXE - 32 bit version of converter (compiled with MS-DOS GNU C++
v2.2.2). Limited only by available memory and disk space.
Requires 386 /w 387 or 486 CPU. 2Mb or more of RAM is
recommended.
RAW2POV.DOC - What you're reading.
CHESS.RAW - Example of RAW input file format.
SOURCE.ZIP - C source code.
CompuServe: 70714,3113
Internet: 70713.3113@compuserve.com
YCCMR BBS: (708)358-5611