TITLE: Bad Night
NAME: Al Vara
COUNTRY: USA
EMAIL: avara@aydin.com
WEBPAGE: none
TOPIC: Night
COPYRIGHT: I SUBMIT TO THE STANDARD RAYTRACING COMPETITION COPYRIGHT.
JPGFILE: bad_nite.jpg
ZIPFILE: bad_nite.zip
RENDERER USED: 
    Povray 3.0 for DOS

TOOLS USED: 
    Corel 5.0 Win, Moray 2.5 for DOS, Terrain Maker 2.0 DOS

RENDER TIME: 
    6 Hours 5 Minutes 27 Seconds

HARDWARE USED: 
    486DX100, 8 MB RAM

IMAGE DESCRIPTION: 
    My vivid memory of the surprises in the night.
It was the first image that entered my mind. I could not imagine
tring to capture this subject matter in any of my other favorite 
medias: pencil, pen & ink, or watercolor.  Photography presents
significant undesirable drawbacks too, if you get my meaning.


DESCRIPTION OF HOW THIS IMAGE WAS CREATED: 
    This is the second POV raytrace
I have attempted, so I did a lot of problem solving that I am
sure is old hat to most of you.  I'll describe my efforts to help other
newbies.

The mirror was easy to build (three flat shaped sweeps), but hard to align.
I went through a lot of trial and error until I developed a technique.
I made a mirror group to allow rotations about the group center, rather
than the origin.  Pointing the mirror was made easier by temporarily adding
a high ambient sphere near the mirror and in line with the desired center
of the police car image.  This made finding a reflection easier.  Successively
moving the sphere back clearly showed the direction for the necessary mirror
rotation improvements.

The police car started as a Corel clipart of a taxi.  I made a mask of the car
shape in black and white and used it to produce a heightfield, with a
waterlevel set to leave the car shape.  Placing the headlights (spotlights 
with high ambient cubes) was a nightmare of trial and error.  Then I got
smart and added the headlight opening to the outline mask.  Now the
headlights were moved behind the opening in the heightfields and alignment
was automatic. The resulting police car image is flat, but being dimly lit
with all that surrounding glare, it seemed passable.

The rotating police lights are colored spotlights centered inside of semi-
transparent cubes which have high ambient.  Tilted, white disks were added
to simulate the internal light reflectors. Finding the best rotation angles
was fun. Playing with the atmosphere was sheer magic.

The speed sign started out as a Corel clipart.  A high ambient image map
makes it seem like it had reflective paint.

Early in my creating, I developed a great heightfield for the roadside cliff
using Terrain Maker.  As more complex shapes were added to the project, I ran
out of memory.  Weeks were spent trying to find a way to only use the front
portion of the heightfield instead of the full 512x512 file size.  I was never
able to achieve complete success but I'll describe the method that worked best
for me.
If anyone knows a better way, let me know.  If anyone wants a description of
what doesn't work, I can bore you ad infinitum.

The output of Terrain Maker is a GIF file.  If you use a colored version, you
get random color indexes assigned when you import the image into Corel.  These
color indexes become the height values, so using color is a no-no.
Fortunately Terrain Maker lets you steal a color pallette and apply it to its
images. In a 8 bit grayscale image, I drew a gray shaded fill using all 256
values.  This was saved as a GIF.  In Terrain Maker, I opened my cliff file,
then changed the color map to that of the all gray GIF.  This was then saved.
This GIF has gray indexes corresponding to the height 256 possible height
values.  In Corel this image was cropped, converted to 8 bit gray scale and
saved as a TGA (TGA format allowed easier positioning later, since Moray can
read and display TGA, but not GIF).  You would think I had a perfect cropped
image at this point, but using it in leiu of the full image showed unsightly
distortions, after I re-scaled the heightfield volume to compensate for the
cropping.  The good news is that I had saved enough data points to fit
everything into memory at the same time.  I had to go back to Corel and do a 
minimal blur on the cliff image data.  This lost me the nice rocky edges
Terrain Maker had provided, but the overall shape was still there.  I played
with the texture and normals to get some of the rocky appearance back.

The car hood and dash are patches.  To reduce memory demands and take
advantage of the symmetry, only the left halves were modeled.  A reference
copy of each was made with a negative scale value to reverse it.  Grid snap
lets you butt the halves perfectly.  POVRAY complained when I used the patches
in a CSG, trying to cut the hood and dash along the same oval shape, but it
did a fine job.  Other cuts were made in these CSGs to provide more details.  
Black blockers were needed behind these cutouts to prevent underlying 
surfaces fropm showing through.

Grass is hard to do.  Heightfields made from random dots looked poor.
Texture controls I tried did not come close.  I settled for a tiled Corel
photo of some grass.  The image was not seamless but the low angle and some
games I played adding normal wrinkles, hid most of the tile edges.  If anyone
has a better way, pass it along.

I'll list some other tricks I taught myself along the way to help other
newbies get started.

1) Always do a small 80x60 thumbnail image before a bigger rendering.  It
catches lots of problems and saves wasted time.

2) Extra cameras don't take much memory and are great for evaluating complex
3D shapes. Use them all over.

3) On slow computers, put a few objects into a temporary group and use the
Moray "file - save select" feature to make a test model.  Unfortunately the
camera cannot be put into the temporary group, so write a note so you can
re-create it in the position and angles you need.  Now work on just these
objects, without the rendering overhead of all the other the objects. The
group can then be merged back into the original model after your refinements
are finished.

4) When your limited RAM computer complains of running out of memory while
rendering using Moray's render button, don't give up.  Export the POV/INC
files instead of rendering and then exit Moray.  This frees up the memory
Moray holds on to.  Now move to the directory you exported the files to and
start the POVRAY from the command line prompt.

5) Povray has a feature that lets you final render just a samll portion of 
the image.  I would have never completed this in time without it.

6) When your new at something, you never know if something is too hard to do, 
when you start.  Use that as an advantage.  Come up with your image without 
concern for the work involved.  In the middle of this project, I had my 
doubts my little computer could ever finish the job.  But wanting to create 
my vision bad enough, helped me fight through all the problems.  






