For nightmaps I usually take some extra steps. You can fiddle with all the light settings individually. Your things are good basics, but won't work for e.g. city maps, as you don't touch the static lightmaps (which don't give a sh*t about the color codes set in the init.con). Also, you forgot animated meshes and specular colors, which can be very important for maps with lots of statics and buildings as well.
The first section (between beginrem and endrem) were the original settings of a map I "nightified" for BG42. The lower ones are the dark ones. I made annotations as explanations.
- Code: Select all
renderer.globalAmbientColor 0.030/0.030/0.032 <-------- overall ambient color&brightness that is used to light statics that do NOT have lightmaps (usually small props like sandbags, bins, streetlights, buckets etc.)
renderer.ambientColor 0.030/0.030/0.032 <----------use the same as above, else you get an ugly inconsistent look
renderer.diffuseColor 0.20/0.20/0.22 <------overall ambient shadow color&brightness used for the shadow side of statics without lightmaps
renderer.specularColor 0.055/0.055/0.0552 <------ overall color and intensity of specular maps (applies for lightmapped statics as well!). Specmaps are mostly used on "metal" things (e.g. the big russian oil silos in vanilla) and make the "shiny-reflection" effect. Obviously, use a low setting for night...
renderer.fogColorVec 0.094118/0.101961/0.149020 <----fog color, obviously. Use a color that matches the sky color at horizont level for best aesthetic looks
renderer.animatedMeshAmbientColor .25/.25/.252 <---- ambient color and brightness of animated things. This means soldiers, soldier weapons and things like that. Very important to make a night map feel really "nightish".
The color codes used above make for a really dark map that makes it actually difficult to spot enemy soldiers in dark corner. Best way to spot them is by watching for muzzle flashes. Very unique for BF42 as most "night maps" are still way too bright, especially the animatedmeshes.
Overall tip for night maps: Remember that during night, blue is the most dominant color. Giving all your light settings and textures a very slight (don't go overboard with this, this effect can very quickly appear "cartoonish" if used too strong!) blue tint. Check my light settings, most of them have a slight extra stretch on the blue value (the last one). Subtle effects like these can do a lot for immersion.
Altering building lightmaps is another thing:
Lightmaps for statics are rendered either in BC or via the debugger in a simple grayscale image. The actual "coloring" and brightness of these is defined by the palette.pal file in the objectlightmaps folder. These are color tables that define a range of colors that is used for the lighting part, defining colors from "white" to "black". On a desert map this palette usually ranges from a dark/near black value (25/27/34) to a sand-color bright one (186/165/134). Bright does not mean "255" bright, remember!
Now, for a true night map you obviously don't want a weird sand colored brightness on your buildings while the rest of the terrain drowns in darkness. You now can either choose to replace your palette.pal with one of any other map that might look better, but due to the lack of true nightmaps in BF42 vanilla this is difficult. So just make your own.
Start Photoshop, open any file (doesn't matter, or just create a new one). Then go to Image->Mode->Indexed Color...
Hit ok. Then go to Image->Mode->Color Table...voila, this is your palette file! You can now use "load" to load any of the palette.pal files you have from bf42 to get a feel on how these are used and to get the correct number of indexed colors. To change them yourselves is very easy:
Select ALL squares. This causes a color picker to pop up. By selecting all squares you automatically tell Photoshop you want a color gradient. The first color to pick is your shadow color. Go for a dark one here, obviously (I used 15/15/17). Avoid pitchblack, that looks unrealistic ingame. Hit OK. After that another color picker pops up. This is your light color. Pick a "brighter black", it's night, remember
. I went for 35/35/37. Yeah, THAT dark. The range is so small simply because during nights there are no strong shadows visible, due to the lacking light power of the moon. Makes sense, right?
Now, hit "Save" in the color table and save it as "palette.pal" in your map's ObjectLightmaps folder, overwriting the old one.
Done. Now you have nice dark building shadows with a slight blue tint for extra niceness.
Another thing to do: Darken water color.
- Code: Select all
rem water.specularColor 0.650000/0.550000/0.400000
water.specularColor 0.10000/0.10000/0.1200000 <----darkened a lot, as the reflection of the moon obviously should be way more subtle than the one from the sun
water.scrollLayer1 0.020000 <------- Lowered this a lot to achieve a "calm sea" effect to make my night map more eerie
water.scrollLayer2 0.010000 <------- using asymetric speeds for the scroll layers is a good thing, makes water appear more "natural/random"
water.specularStreakFactor .001000 <---- the raw strength of how much the water should reflect with the spec map. The higher, the bigger the reflection will be. Obviously, very small number for moonlight.
water.tileLayer1 0.300000 <---- This defines how the water texture is tiled. I used a low value, which means the texture is stretched a lot. Which in turn makes the water appear very calm, with some large, slow waves rolling in
water.lightDirection -0.300000/0.500000/-0.650000 <----obviously, make this the same as your sun direction
water.color 0.200000/0.300000/0.300000 <---- water overall color, dark, with a purplish tint
water.deepColor 0.200000/0.300000/0.300000 <----- water color in "deep water" (I used the same, as it didn't matter for my harbour map. No shallow water there.)
water.waterAlphaDepth 0.300000 <----- Defines the depth of the "transparent" water on the coast. The higher the value, the deeper water can be and still be transparent. If you have island maps with large shallow areas, try increasing this value to 2 or 3 for some very awesome reef-water-effects
water.waterShallowAlpha 0.500000 <----defines the transparency of the water in the shallow area. 0,5 means half-transparent, obviously. If you use a higher "AlphaDepth" value, you should use a LOWER Alpha value here, else it will be difficult to see where the water actually hits the shore.
The above one makes for a blue-blackish calm water as commonly seen during night. Perfect for lakes or calm ocean parts (e.g. harbor bay).
So, as a general checkpoint list:
1: Choose a nice night sky texture. Either make one or pick sky_telemark_m1 (I think it's from Secret weapons? Or is it BG-exclusive? Dunno...)
2: Darken your ground textures with the detail.dds method killboy describes above
3: Edit your palette.pal as described above to make it darker
4: Edit your fog color settings
5: Edit ambient/diffuse/specular/water settings
As you will have to fire up BF42 with your map regularly to check how things look ingame, there's a small way to make life a bit easier. But only for step 4 and 5.
For that we use the magic wand that is bf1942_r.exe, also known as the debugger.
Start your map with it. Run around, choose a nice spot where you can see most of the things (or use the free camera. console -> game.enablefreecamera 1).
Then hit (P)AUSE. This prevents the console being cluttered with debug messages.
Now open the console.
Type in the very code from the init.con you want to edit
*abracadabra* The engine instantly displays the changed settings!
Useful hints for maneuvering in the console: It supports autocomplete with the TAB key!
Type "rend", hit TAB-> get "renderer."
Now type "anim", hit TAB -> get "renderer.animatedMesh"
Now, as there are multiple commands to go from here, double-tap TAB to get a list saying:
Now type "a", hit TAB -> get "renderer.animatedMeshambientColor"
If you are unsure what values to set in, tap TAB another time
You'll get "renderer.animatedMeshAmbientColor Vec3->void"
This means a triple vector is needed. A triple vector is 1/1/1 . Each value can be a float number.
Other common possibilities:
This means a float value is needed. Float values are any negative or positive numbers, with or without decimals. E.g. -0.12341555166 . However, sometimes the float range is limited. E.g. colors always range from 0 (black) to 1(full color). You can set "-2" or "100000", but as you can't get any brighter than maximum color or any darker than pitch black, it will always be interpreted as the maximum possible value. Making -2=> 0 and 10000=>1. Kind of failproof, really
This means a boolean value is required. Boolean values are "0" and "1". They are basically switches "on" and "off". Makes sense, as you can only enable or disable something, but not half-enable it...
TAB is a very sweet tool to quickly code in the debug console. Requires some getting-used-to, but it saves A LOT of time and typing. And especially helps avoiding typos.
Remember that in the console you can switch through the 10 recent commands you entered with the arrow UP/DOWN keys. Most important if you want to compare two settings swiftly or similar.
Also, for code in general:
1.0/1.0/1.0 equals 1/1/1 equals 1 . Three identical vectors can be shortened to a single float value.
0.5/0.5/0.5 equals .5/.5/.5 equals .5 . decimal numbers between 0 and 1 can be shortened, it is not necessary to type the "0".
I also made a short gallery of GIFs showing different settings for the most important light and water settings: