home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Der Mediaplex Sampler - Die 6 von Plex
/
6_v_plex.zip
/
6_v_plex
/
DISK2
/
MULTI_04
/
3DSDKB.ZIP
/
3DS2DKB.DOC
< prev
next >
Wrap
Text File
|
1991-09-03
|
5KB
|
117 lines
3SD2DKB
Version 1.1
(c) Jeff Bowermaster
Greensboro, NC
9/03/91
Ver. 1.1 Changes: RIGHT <-1.33 0.0 0.0 > in VIEW_POINT produces
much better circles
COLOR for the light sources moved outside the
TEXTURE block (oops. I'm still learning...)
8/24/91
Ver. 1.0
This program reads the ASCII save file from the 3D Editor in 3D
Studio and writes a DKB raytracer Data file consisting of smooth
triangles for really good looking reflections. It also writes
the camera and light positions. Unfortunately, it doesn't handle
colors and textures automatically, (although I'm working on it.)
They all default to a white shiny plastic, and you must go in
manually and adjust them to what they were.
Syntax:
3DS2DKB \path\infile[.asc] [outfile][.dat] [/i]
I went a little overboard on the filename parser. Long story
short, when you save ASCII, put the extension .ASC on the file.
Put 3DS2DKB in your \DKB directory (or where ever you run DKB
from). Then, for example,
C:\DKB-> 3DS2DKB \3ds\birdshow
assumes the input file is birdshow.asc in the \3ds directory and
outputs birdshow.dat in the current directory (\dkb). It also
creates a file birdshow.inc that contains a list of the materials
found, all defined as white shiny plastic that gets INCLUDEd at
the beginning of birdshow.dat. You can go into the materials
editor in 3DS and read the RGB values, GIF specs, shinyness, and
with appropriate parameters change the white plastic into the
materials in your original 3DS file. (For example, divide the
RGB values by 255 to get the 0->1 that DKB wants). I've included
an example (birdshow.inc) that as we speak is rendering
birdshow.dat. I wrote in one option (/i) that allows the
materials to be included in the data file rather than 2 files.
For simple objects it's convenient to have just one file to deal
with. For complex objects, finding all the definitions scattered
in the DAT file can be a pain, and it seemed reasonable just to
make a separate file to deal with all of them.
Specifics:
This program is a parser and a processor. The first part reads
the lines in the ASCII file and does appropriate things with the
information. It creates two arrays and fills them with the
vertex list and the face list. It processes these into two more
arrays, the face normals and the vertex normals. It then prints
out a list of smooth triangles as composite objects bounded by
boxes defined by the min and max of x, y and z. A fifth array
holds the material list for the faces. The head in birdshow had
2 different materials in one object and rather than fight it I
just incorporated it. Material names are fused with underscores
and are listed in the .inc file.
Operation:
Be warned these files can take a LONG time to render (several
days). There is sometimes a very long wait from the time you
start the program to the time you see anything on the screen. (I
don't have a clue.) I suspect you'll need DKBPRO since the data
files can be VERY large (1-2 Meg). I've had problems sticking
objects together with snap on and getting vectors (that is,
triangles where two vertices are the same point) that gives
divide by zero errors on calculating normals. I've not had much
experience with this program and so you're liable to be doing
beta testing for me. Please get back with me on any problems and
we can deal with them.
Directions:
Optimized bounding shapes (Steve Angers stuff) would be nice.
Cutting off smoothing when the angle gets too severe would be
nice. Reading 3DS .MLI material definition files directly would
"drop the other shoe" as it were, making manual material modification
unnecessary.
This program doesn't handle spotlights. I suspect you can either
add a mask in front of a normal light or design a parabolic reflector
and a lens (that sounds easy, huh :)). Spots default to simple diffuse
lights at the same location as the spot.
I left some debugging stuff in the program, lets you print text
listings of the triangles or whatever, making that another option
might be nice but if I stop to do it now this'll never make it
out the modem. (I just added more debugging info, oops).
Currently I just blow over things like vectors when triangles are
expected, making it problimatic whether it'll run or not. I need
to add major geometry fixing stuff to this so that when unexpected
information is encountered it fixes it.
Add stuff, change it, fix it, use it, enjoy the images, get back to me
on what you do and your suggestions. I'm on the Ray board and in the book.
Whatnot:
Thanks to Steve Anger for his smooth triangle suggestions.
It was awfully nice of the 3D Studio people to provide ASCII text
output for their program. The more I use 3DS the deeper it gets.
It's amazing the amount of stuff that's been crammed into this
program. If version 2.0 has Renderman this utility might be less
important, although DKB makes very nice images now.
Jeff