So, you want to build a train for BVE4?
By now, you should have got your train directory, and in it your images
directory (called "d3d" or "bve4" or something else) and the images
directory should contain the panel image from part 3 and the animation images from part 4. All those images are "day"
images, which is to say, that's what they look like in full
daylight. Now, BVE4 also has "night" images, and these are used
anywhere that the lighting is reduced, including tunnels, under
bridges, and of course in the dark or even in a thunderstorm -
basically, anywhere that the route designer has decided that the
lighting is less then full daylight. Techincally, BVE4 displays
both images: the day ones on top of the night ones. As you go
from "light" to "dark", the day image is gradually faded out to become
transparent, and as this happens, more of the night image shows
through. In complete darkness, only the night image shows.
If you look at already-made trains, you'll see that pretty nearly all
the images are in pairs: for example, panel2.bmp and panel2_n.bmp, and
you've doubtless realised that the "n" images are the night ones.
So, the next job is to take all those images you made in parts 3 and 4
and do "night" versions, and once again, we'll start with the main
panel image. Basically, what you do is this:
1) open the image
2) increase the colour depth to 24-bit
3) alter the brightness/contrast until you think it looks about right
for "dark". note that you don;t want it to be pitch black -
there's a small amoutn of illumination, both from the gauges and
warning lamps and also a bit from the train headlamps reflecting back
into the cab. Study some other trains to see what the night
images should look like. As before, when altering brightness and
contrast, don't do one change
after another, if you're not happy with the effect, use the undo facility and try again.
On some software, in addition to plain brightness/contrast, you can
adjust highlight, midtone and shadow. Whatever you finally decide
is the correct transformation to apply, make a note of it. You're
going to be using it a lot.
4) having done that, save your panel image using "save as", calling it
panel2_n.bmp or similar. Make sure it's saved as BMP.
"hang on", I hear you say "You never told us to reduce the colours back
to 256! gotcha!". You're right, I didn't and there was a
good reason for it, 'cos you're not finished with that night image yet
- you'll have noticed that the dials are now all dark, and that's no
use. This is where the image editing gets a tad more interesting
(or complicated, depending on your point of view). What you want
is "lit" gauge images to put into your night picture. I'll
describe the method I use to achieve this, using PSP 10. Other
image editors will probably differ, so you may need to work out how to
do the various stages. I'll do this for the speedo, but the same
technique applies to all gauges.
On the daytime image, select the FACE ONLY of the speedo.
Normally, you want to select a circle or an ellipse. Take some
time to get the selection as close as you can to the edge of the
speedo, all the way around. Once you have the selection to your
liking, click edit > copy.
Click edit > paste as new image.
This should create a new image like the one below left with the speedo
face in it and a transparent background. You might need to alter
settings so that the background is transparent - PSP seems to do this
Now, you need to decide what it looks like in the dark. If you're
lucky, you'll have been able either to observe the speedo with the
night illumination on, or to have found out what colour the speedo
lights up. Sometimes, instrunments have more or less "daylight"
colour illumination, and if that's the case, you don't actually need to
do much to that image except maybe darken it a touch. However,
for the sake of this tutorial we shall assume that the gauge is
illuminated with a green-yellow colour. The next thing you need
to do is to alter the image until it looks how you want it to in the
dark. I use the adjust > hue
and saturation > hue/saturation/lightness panel on PSP 10 to
do this, with colorize turned on, but there are other methods, so pick
one that suits you. The PSP panel is shown below:
Once you decide on settings you like, click OK. Remember, you can
always use edit > undo to
go back. In choosing the colour and light, consider that the
speedo will probably look darker overall. If you're aiming for
plain illumination, you want a slight yellow cast. The settings
above would come from a green filter on the panel lights. If you
intend all the gauges to match, make sure you take note of the setting
you used in the panel, so you can do them again. Be aware,
however, that it's rare for different dials to be exactly the same colour at night,
so it adds realism if you put in some slight variations. If
you're doing a backlit gauge, then the techinque is slightly
different. In that case, I'd use adjust
> brightness and contrast > highlight/midtone/shadow, as
shown below, to make the gauge background more or less black, while
keeping the figures illuminated. Note that this kind of gauge
generally has an illuminated needle, of which more later.
Once you're happy with the look of the face, save it - I use PSP's
native image format at this stage, so that you can retain the
transparency. This is important. You don't have to save the
"day" face image. It's handy to save the night image although not
Now, you need to paste this new face into your night panel image.
With the image you just saved selected as the active image, click edit > copy, then get your night
panel image on the screen and zoom to the speedo so that it's more or
less filling the window. Now, click edit > paste as new selection,
and you should get a floating circular speedo face. Take your
time lining this up with the existing too-dark face on the night
panel. It's vital that the new, illuminated face is EXACTLY in
line with the exisiting one, otherwise, when you go from light to dark
in BVE the speedo will look as though it's shifting around. PSP
doesn't plant the floating new selection until you click the
mouse. A tip for you here is to hover the selection off to one
side, as shown below, so that it's in the right place vertically, then
note the Y value given under the editing window. Do the same for
left-right, using a suitable vertical marker, and note the X value,
then move the floating selection to those co-ordinates, and drop
it. You can check the alignment by doing edit > undo, watching the image
carefully - you shouldn't see any movement. then do edit > redo, to put the selection
back. If you didn't get it right, click edit > paste as new selection to
Placing the overlay image; showing correct vertical position, by
comparing the position of the figure 20. This particular speedo
contains a digital clock, and it might have benefitted from a bit of
editing to make it a touch lighter, after doing the rest of the
processing. You could also do that after placing it. You
can't, I don't think, get the digital clock to work, I've tried quite
Once you're happy with the speedo, you can move on to the other dials
like brake gauges, and ammeter if fitted, which you do in the same
way. You should finish up with a night panel image, on which all
the dials you want illuminated are glowing nicely,
The last thing you need to do to this image is to fix the blue.
When you darkened the image, you also darkened the blue in the windows,
so this is the point where you need to fix that - it has to be the
now-familiar html code #0000ff. The good news is that you should
be able to do this with a simple flood fill, so set the primary colour
to #0000ff and give it a go. You migh need to adjust the settings
slightly - the flood fill tool has a "tolerance" setting. You
need to check around the egdes of the window that there aren't extra
dark blue pixels. If there are, then adjust the tolerance a
bit. You might have to correct a few pixels "by hand" using a
small brush tool.
now, finally, this is where
you reduce the colour depth, as described previously, to 256
colours. In part 6, we'll do all the other "night"