BF1942 Debugger Multifunctionality Tutorial

Lots of cool and useful tips to mod either serverside or clientside

Re: BF1942 Debugger Multifunctionality Tutorial

Postby Waldek » Wed Feb 06, 2013 10:15 pm

This is a message sent by me to user exe. I make it public so I hope it's gonna be helpful for someone who is struggling with red textures after having merged them.

I have yet another problem, it's the same as described by Apache Thunder:

Apache Thunder wrote:
Also, I've never gotten the terrain merger to work properly. It would always result in smurfed terrain. I also could not merge the terrain without first converting the terrain textures to TGA and dropping them in with the lgt TGA files. Otherwise it would refuse to merge them. (it would just exit without saying a peep). When I mean "smurfed terrain", I mean the resulted files would be useless because they are either all red, purple, or some other horrid random color hue to them. I have always had to merge them manually. (as in use a separate program to do the merging of the textures one at a time. )

My merged terrain lightmaps are always red:

So I've got it working. You have to place TerrainPalette.pal file in your Textures folder. Simple as that!

According to my observations, the best idea is to get one from existing map that is similiar to the one that you are working on, meaning the overall map color scheme. That's because the Palette.pal and TerrainPalette.pal seem to affect the tint of illuminated and darkened parts of mesh. In other words, palette files tell the executable what colours to use for light and dark areas.

In my opinion the Kursk from vanilla is a good example of well fitted palette.

Kursk Light maps palette:

Kursk Terrain palette:

btw. do you know for what these numbers are at the end: +game DesertCombat +workingFolder "ShadowWork\" +mergeTerrainShadows "bf1942\levels\MAPNAME\ 1.5 0.6"

The first seems to control the brightness, but adjusting the second one did nothing in my case.

I'm not an expert though and the above are just conclusions of mine.

How to view / edit palettes:
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.
Posts: 49
Joined: Thu Mar 08, 2012 12:09 pm

Re: BF1942 Debugger Multifunctionality Tutorial

Postby exe » Thu Feb 07, 2013 5:17 pm

Yes that did it! Thanks x100. I'm so happy that it's such a simple fix. 8-)
Posts: 60
Joined: Wed Feb 08, 2012 10:04 pm

Re: BF1942 Debugger Multifunctionality Tutorial

Postby Senshi » Fri Feb 08, 2013 9:39 am

Waldek, thank you for the detailed description on how to meddle with the .pal files. I have totally forgotten that this one is required for the BF lightmapping as well, despite me detailing the .pal usage in my nightmap tutorial as well :roll: . But your description is more sparkly and concise, I really like it! I'll include it in the main post so it's easier to find for newcomers (crediting you properly, obviously).
User avatar
Posts: 695
Joined: Sun Oct 18, 2009 1:14 pm
Location: Germany

Re: BF1942 Debugger Multifunctionality Tutorial

Postby Guido_Gross » Fri Jan 22, 2016 6:05 pm

Is there a special program for the creation of lighting and shadow?
Posts: 4
Joined: Fri Oct 09, 2015 1:24 pm
Location: russian


Return to General Modding Tutorials

Who is online

Users browsing this forum: Google [Bot] and 5 guests