                            ABOUT "NIGHT VISION"
                              by Darren Izzard

------------------------------------------------------------------------------
This document is a diary of the creation of the scene "Night Vision." In it,
I described the process of developing the image as it was actually happening,
although it was written in the past tense. This was really written in case
anyone is curious about how I approached the design of the scene, or just in
which order the source files were written.

The scene's design actually started on Saturday 21st March, with a few very
rough preliminary drawings.

SUNDAY 22nd MARCH

The first thing I did was draw a number of the things which immediately
popped into my mind when I thought of "Night." Those were the basis for
the concept of the picture. I tried various combinations of those elements,
but finally stuck on "Night Vision," which included the lights of a town,
the moon, an astronomer and the idea I had for a smiling star (yes, it's a
little silly, but I wanted to lighten the picture's mood).

The first part of the scene which was actually designed on the computer was
the star's smiling face. I used sPatch for that, starting with the eyebrows,
then the left eye (flipped for the right), nose and mouth, finally connecting
them all together with flattish patches. A slight rippling effect naturally
came out of not being too careful with the Z alignment of the control points.

Next I moved onto the geometry of the star. As in the original sketch, it had
five points with a flat front. In POV-Ray, I created a single 72-degree star
point, and constructed the star by copying it five times in a circle,
applying a combination of spiral2 and iridescence to the object which looked
far better than I had expected. The face was then stuck on the front. The
face's features turned out to be a little too flat, so I scaled Z a little
more than X and Y to enhance them. I also created a gold-like material with
specular highlights to make them even more visible.

The crescent moon followed, a difference of a sphere and a (black) ellipsoid.
I applied craters using dents, and "seas" with bozo, then tried various
experiments with a halo. That didn't work out very well, either blotting out
the object completely, emphasising the crescent's intersection or simply
not showing up at all, so I got rid of it.

The next thing was the hillside. I thought about doing this in sPatch, but
I decided I needed something with a more predictable, or controllable, shape
as a base for the detail. In the end, I used a simple stretched hemisphere
with a granite pattern of greens which, scaled small, looked very like grass.
The hut on the hillside was a simple form, although I used a scallop waveform
to turn it into a log cabin. However, it looked a bit odd attached directly
to such a steep hill, so I gave it a brick foundation, and then embellished
it with an open window and doorway, with internal light source. Getting a
good flood of light through the door without it affecting the rest of the
scene was very tricky, and I had to put the light very near the bottom of
the doorway to do it. I also increased the ambient finish of the window to
compensate, and give the appearance that the light intensity was the same.

The trees on the hillside were based on an old LParser fractal tree I
designed some time ago. I lowered the recursion level and used LParser to
regenerate it as a POV object. Heavy down-scaling was required on the
resulting tree. This object was still relatively complex, and even the few
trees I used increased the test-render time greatly. I thought some of the
trees might still have intersected the log cabin, but if they did, it was
well hidden, and I could always come back to it later. I noticed,
incidentally, that the light from the cabin's doorway was now catching the
trees' branches, which I thought added a sense of depth to that part of
the scene.

MONDAY 23rd MARCH

I decided to leave the hillside for a bit, mainly because I'd had a change
of plan about the astronomer, who originally was going to be a distant
shadowy figure on the hill. I'd already had some doubts about how to place
him on such a steep gradient - a similar problem to the one I'd had with
the log cabin the previous day, so I needed to find another location. The
somewhat risky new location was right at the front of the scene. This
would mean creating a head, arms, hands, and a more well-defined telescope
than I had been planning. I drew a few pencil studies of his pose and
appearance on paper, and finally hit on something that looked about right.

In sPatch, I constructed first the cheek, then the ear. The ear was based
loosely on an ear visible in a photograph I had handy. I didn't build
any features for the front of the face, since it would not be visible in
the final image. I then built up a rough hair form on a second sPatch
layer. The hair's patches were intentionally very uneven, which hopefully
would assist the bump-mapping in giving a realistic appearance. The far
side of the hair, like the face, was given much less attention.

The neck was layer 3, a fairly simple distorted cylinder. The arm and torso
were very tricky, and perhaps ended up a little wooden. The patches, also,
were a bit too rippling, but I thought that could have turned out to be an
asset when texture was applied, as they could look like folds of material.
In designing the telescope (layer 5), I noticed by chance that, if I had the
astronomer looking just to one side of the telescope, as if disbelieving
something he had seen through the lens, it added a sense of character. I was
lucky I hadn't drawn the hand yet. Anyway, the telescope was made from two
straight lines, lathed into two nested tubes. Anything more complex than that
was not needed, due to the angle of the character in the final image.

I put the hand together in profile first, placing the thumb round the
telescope first, then the fingers. I then hand-extruded them to form a rough
hand-shape, which represented the fingers as a single block. I was pretty
sure that I could create the illusion of separate fingers by use of textures
or image-mapping later. Plus, of course, the lighting for the astronomer,
which I intended to also hide the fact that he was missing a left arm.

After importing into POV-Ray, it turned out to be even easier than I had
hoped. The clothing became a thick woollen-type coat, which neatly hid most
of the ripples in the torso patches. The hair was made partly using a wood
texture, with bumps and turbulence to slightly randomise the colours. The
skin was made with the Flesh pigment, which comes with POV-Ray. The hand,
similarly, except that a Y gradient was used to turn a scaled wood
gradually into pure flesh colour. This gave the neat appearance of four
fingers! My only reservation with the astronomer was that he looked a little
too robotic, but, again, I decided to rely on lighting to remedy this in the
complete scene.

TUESDAY 24th MARCH

At this point, I was having some doubts about how I was going to compose the
scene, fitting in the star, the astronomer and the hillside. I decided to
create a first draft of the main POV file for the render, and to use it to
link together the objects I already had, plus make a start at setting up the
lighting.

Many changes took place at this stage. I used a number of copies of the
smiling star at various distances to create a blend into the starfield
background - created using a modified form of the POV-Ray Starfield texture.
The moon was placed in the middle of the stars, rotated to minimise the
visibility of the intersection.

The astronomer was placed at the front, slightly rotated backwards to give
the appearance that he was leaning back. The lighting proved difficult to
organise between the stars and the astronomer, because shadows from the
astronomer kept being cast on the stars, and shadows from the high red
light source (intended to give the impression of a glow from the large star)
kept being cast into the open torso of the astronomer. This was still a
problem, in fact, even at the end of the day's work.

The hillside was placed behind the astronomer, and rotated round to keep the
open doorway of the log cabin visible. Doing a 2/3-size test render (which
didn't take very long), the fractal tree branches showed over the top of the
astronomer's head, which looked quite good.

Various obvious omissions in the scene were now apparent. Around the
astronomer, solid ground was needed, as the temporary "flat grass" wasn't
very convincing. The starfield-to-blue gradient in the background was nice,
but boring - the mountains I had planned would definitely need to go in there.
Finally, there was a gaping space where the town lights were meant to go.
I considered none of this to be too much of a problem, except perhaps the
solid ground. In addition, I still had a few concerns over the lighting,
such as the red glow caused by the astronomer's internal shadows, and
possibly the stars being too bright. I was also beginning to consider fog
and atmosphere effects for the stars and, speculatively, the as-yet-
nonexistent town lights.

WEDNESDAY 25th MARCH

I decided that it might be better to separate the astronomer from the
background. This led to the creation of the fence, made out of 1-unit-wide
sections. Once it was positioned, I experimented again with the lighting,
and finally managed to get rid of the awkward shadows, and the glow inside
the astronomer, partly by changing the fade properties and partly by changing
the astronomer's body texture. The fence also lessened the need for the "solid
ground" I mentioned earlier.

Next, I tried generating some mountains for the background with GForge. The
exact command line I used to generate the height field file was:-
  > gforge -name mscape.png -dim 2.15 -power 1.20 -mesh 400 -seed 1235813
           -type png

I took mscape.png and loaded that into Paint Shop Pro, using it to apply a
vertical gradient, gradually levelling the landscape towards the bottom of the
field. After setting up the height field object in POVRay, and scaling the
mountains to fit, I realised they would need some extra lighting way off in
the distance. I set up a strong light source, which lit the mountains well,
however it again shone inside the astronomer. This was solved simply by moving
the light to the right, which not only got rid of the wierd shadows, but lit
the mountains even better.

Now my primary concern was the brightness of the main star's companions. The
obvious solution was to create a new "dark star" object, but I was still
trying to think of how I could achieve the same result with other effects.
Of course, the town and its lights still had yet to be created.

THURSDAY 26th MARCH

The first thing I wanted to get done was the town. I approached this by
designing a set of buildings, each with a maximum footprint of 10x10 units.
The list included a house, a house with an extension, a small towerblock, a
miscellanous building-with-tower, and a tree (the same tree, in fact, that
I used on the hillside). The buildings' lights were all yellow boxes with
high ambient finishes (similar to the log cabin's windows from earlier).

I then constructed an object which would create a town of these buildings,
where each building's type, size and position was selected more or less at
random. The distribution was a circle bunching in the middle. This was all
achieved using a couple of nested loops and some conditionals.

Positioning the town object in the main scene was not very easy, as the
gradients of the mountain (which I had forgotten extended all the way
forwards to Z=0) made it hard to place the town squarely on the ground.
Therefore I had it hovering in mid-air slightly, which actually looked
perfectly fine.

I took this opportunity to apply some ground fog, which I had been thinking
about for a couple of days. The fog was blue, which matched the gradient in
the background starfield. In fact, I set up two blue fogs, slightly different
shades, with different altitudes. I can't exactly put my finger on why it
looked better with two, but it just did. The fogs had high transmittance
settings with no filtering - this avoided giving the whole scene a deep blue
tint.

Here I did another 3/4-size test render. The scene now took around an hour
to render (mainly because of the low amount of memory I have installed).
Altogether the scene now looked almost complete. My two remaining problems to
fix were firstly to raise the fence above the mountain gradient to show the
base rail and tiled floor I had designed, and secondly to get the distant
smiling stars to dim down a little. Possibly a strengthening or raising of
the ground fog would be worth a try, too.

FRIDAY 27th MARCH

I had a go at doing all those things. I also rotated the astronomer slightly
to give his cheek a better profile. Now the ground fog was both higher and
thicker, it improved the quality of the town lights. The tiled floor below
the fence suggested further objects, possibly a seat.

I dimmed the stars by creating a dark star object after all, although the
increase in fog dimmed the lights anyway (so much so, in fact, that I had
to increase the intensity of all the lights to compensate). At this point,
I was wondering what other objects could be included.

I tried planning out a seat with swirly ironwork, but I decided it would be
too obtrusive. In the end, I opted for a smaller (and simpler!) briefcase.
Most of the day's work had been spent doing test renders with various
parameters. I decided to do a full-scale full-quality render. If it was good
enough, that could be the final image. If not, I'd have a much clearer idea
of what was going wrong.

SATURDAY 28th MARCH

The image (main1.jpg) looked promising. (It certainly wouldn't win, but then
again that was not really what I was aiming for when I first thought of it.)
The blue gradient in the background, combined with the ground fog, looked a
little too much like twilight for a night picture, so that needed dimming
down. The stars were also a little faint when rendered with AA turned on. The
handle of the briefcase seemed to be worth a bit of redesign, as it looked
very square. Possibly more of the smiling stars would be useful, to break up
the sky background. Other than all that, the picture had everything I was
trying to achieve.

I first remade the briefcase handle, this time out of a stretched torus. I was
going to make it a combination of torus segments and cylinders, but the single
torus looked much better than I thought it would, so I kept it.

The background was next. I strengthened the white component of the starfield
texture (again), then contracted the blue part of the gradient down a little.
This was an improvement, but not enough to make it "night," so I changed the
gradient from blue to green. This, combined with the blue/magenta ground
fogs, no longer lit up the background quite so much.

I built up the structure of the fence, then altered the texture to give the
effect of peeled paint on rust (rather than just rust). Initially, I tried a
vivid green paint, but that was far too much of a distraction. I settled on a
beige sort of colour in the end.

The astronomer's textures were also examined, but I decided not to alter them
this time, although I was still not entirely happy with the flesh tones and
clothing textures.

Next, I added a loop to the star-positioning section, which added a number of
very small and dark stars to the image. This gave the starfield a little more
depth, which it badly needed when compared to the lower half of the image.

I then turned my attention to the town. It needed some taller buildings, so
I constructed a sixth building: a kind of "super" towerblock, made of the
existing towerblock duplicated (with a rotation) on top of itself. The
rotation avoided a repetition of the lights in the two halves.

I was a lot happier with the overall look of the picture at that point,
although the astronomer, the town and the mountains - which now seemed almost
lost in the fog - were still giving me a few doubts.

SUNDAY 29th MARCH

I raised the transmittance of the "bigger" ground fog. This made the mountains
more visible, but the starfield a bit empty again. I increased the green
gradient on the starfield again, and that fixed it.

Here, I thought the picture was more or less complete now. It was time for
another complete render.

MONDAY 30th MARCH

Despite the shadowing on the astronomer's back (which I'd changed my mind
about and quite liked) I decided that it now looked as good as it ever would,
despite a million and one doubts, fears, and vows never to raytrace another
picture again in my life (do I take this too seriously?!). I filled in the
text file and got Night Vision ready for sending to the IRTC the next day.

---
