SUBSIM Radio Room Forums



SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997

Go Back   SUBSIM Radio Room Forums > Silent Hunter 3 - 4 - 5 > SHIII Mods Workshop
Forget password? Reset here

Reply
 
Thread Tools Display Modes
Old 11-20-05, 05:57 AM   #1
Hunterbear
A-ganger
 
Join Date: Apr 2005
Location: California, USA
Posts: 72
Downloads: 18
Uploads: 0
Default I figured out how to add/change color(s) to the game map

SubSerpent originally started a post about an updated gamemap and I know FLB sale U-999 was working on a new map with names for bodies of water,etc. on it. I spent my time working on how to mod the colors of the game map and I finally figured it out.

It's been awhile since I added my 2 cents to the original post. My wife's been having a bit of health problems. I'm posting instructions of some experimenting I've been doing in hopes that others might find it useful.

Download my modded Color Table
http://rapidshare.de/files/7891390/m...table.rar.html

My map is English names. Map not setup for download.

Here's some sample pics:
I hope these links work (new to ImageShack).

North Sea area (No anti-aliased text in red and black)


The Med


I'm sure most of what I'll detail will be of help to FLB sale U-999 since he's doing the most work on the map. But if you have Photoshop you can play along and maybe you'll come up with a better map scheme.

I figured out how to change the colors of the map and how to add a color(s) to the game map. You could add more colors once its understood what changes need to be made to the map, but I would keep it to a minimum.

This information is only for those interested in experimenting with the color table of the game map. Do not save the map raw files when you have finished monkeying around with the Color Table. The mode changes made to the map raw files are only needed so you can view the Color Table used by the game map. I repeat, DO NOT save the map raw files when you're finished with changes to the Color Table, you only want to save the Color Table.

************************************************** *
MAKE SURE TO BACKUP YOUR ORIGINAL FILES BEFORE YOU PROCEED!

**** Make sure you make a backup copy of terrain.act and each map file (4320_2160.raw & 21600_10800.raw) before beginning any changes so you can revert back to the original files if you run into trouble or don't like the changes you made or you just screwed up. ****

************************************************** *
A FEW COMMENTS BEFORE WE PROCEED

1) I know many have expressed an interest for the game map to look more like the authentic OKM map. You may start drooling thinking this is now possible. This will not be possible or practical with this mod information. Why? Mainly because I believe the grayscale information on the map influences the depths and elevations of the oceans and land. Therefore you cannot reduce the map to a single solid color for the sea and a single solid color for the land. If someone knows better, then I'm open for correction on this point.

2) I do not claim the instruction used here to be the ultimate authority or best method to achieve the intended effects or changes. Proceed at your own risk. Basically that means I'm not liable if you proceed to screw up your game files or cause harm to your system.

3) All steps and instructions mentioned here were done using Photoshop CS. I don't know if older versions of Photoshop are incapable of duplicating the results, but as far as I know, they should be able to since it's not using any fancy function only found in Photoshop CS. If you have some other graphics program other than Photoshop, either read the help files for your program to see if it has some similar function or your probably out of luck, I can't help you there.

4) If anyone finds any errors or has a better explaination for doing some of the steps mentioned below or comes up with new solutions, by all means post the corrections and take credit for it. But as mentioned, this may or may not be the best way to do it as I list it. This was written in haste so that I could get this information to you guys/gals in the community so you have the opportunity to experiment for yourselves. Don't need to chastise me for any errors, just post any new findings or corrections.


************************************************** *
HOW TO OPEN AND VIEW THE COLOR TABLE FOR THE GAME MAP

First I'll explain how to open and view the CLUT (Color Look Up Table) used by the map. It uses the file called terrain.act in the data\Terrain\Pal folder.

1) Open Photoshop

2) Open 4320_2160.raw in data\Terrain\Maps\Map1 (Since its the smaller of the map files you can open it quick and easy)

3) Go to >Image>Mode>Grayscale

4) Now >Image>Mode>Indexed Color

5) Next >Image>Mode>Color Table

6) The Color Table window will pop up >click>LOAD

7) Choose the terrain.act file (data\Terrain\Pal)

8) Now you should see a familiar sight. Its the game map in color!
The only thing I want to point out is that the colors you view in Photoshop will be slightly more saturated than what you'll see on the actual game map ingame (due to the mode changes). Ingame, the colors are lighter. Just remember that point when choosing new colors and you wonder why they came out lighter ingame.

************************************************** *
HOW TO CHANGE THE DEFAULT MAP COLOR TABLE

Now if you want to change just the 2 default colors (blues/browns) for something else, here's what you do.

Say for example you want to change the sea color from blue to gray.

1) Open the Color Table popup window (as mentioned above, step #6-7) if its not open. In the open Color Table popup window click and hold the left mouse button over the first blue box on the left of the first row (dark blue).

2) With the mouse button still held, drag it down to the last blue box on the right of the third row (light blue).

3) Now release the mouse button.

4) The Color Picker window will pop open and it will say 'Select first color:'. You can enter any values you like for the dark color of your choice or click on the 'Custom' button to use a palette such as Pantone,etc. Once you click OK you'll see all the sea on the map turn into 1 uniform color, don't worry.

For test I just entered 75 for the K value in the CMYK (but this can be any color you like, just make it dark)

5) The Color Picker window now says 'Select last color:'. Create a lighter value color or choose 'Custom' again to select from a palette as before.

For test I just entered 15 for the K value in the CMYK (but this can be any color you like, just make it light)

Now when you hit OK you'll see the colors in the Color Table window change to a nice gradient going from your darkest color to the lightest and now all the sea color on the map reflects your color choices.

6) Once you are satisfied with your new colors 'Save' the Color Table (data\Terrain\Pal\terrain.act) Make sure you backed up terrain.act before saving the new changes to the Color Table.

Repeat steps 1-5 to change the color of the land if you like as well.
Now you've changed the default map colors. Enjoy it ingame.

************************************************** *
HOW THE MAP AND COLOR TABLE RELATE

The .raw map files are a grayscale image, obviously, if you open the raw file in Photoshop.

The Color Table assigns a different color (shade) to each value in the grayscale map file. In the default Color Table, there are 48 shades of blue for the water and 208 shades of brown for the land, for a total of 256 colors. But not every color in the Color Table has much or any use in the game map. How can you tell?

Well, open 4320_2160.raw in data\Terrain\Maps\Map1 and go through the steps outlined above to view the map in color. With the Color Table popup window open, click on the eyedropper icon in the Color Table popup window; not the eyedropper in the toolbar. Now start clicking each box (shade) of blue starting from the top. What you're supposed to see is that anywhere that color (shade) is used on the map will turn transparent. You'll notice almost no change for
the first 5 shades of blue. Click on the 6th shade on the top row from the left and you'll see the majority of the deep ocean depths go transparent. Continue on to see which colors in the Color Table are actually used. You can do the same on the land colors to see what shade is used where.

So what you may ask. What does that have to do with anything? Well it comes in handy if you want to know how to add new colors to the map.

************************************************** *
ADD NEW COLOR(S) TO THE COLOR TABLE

This section might get a bit confusing or long-winded just for the lack of a proper explaination of how everything interacts with each other exactly (Color Table and grayscale values in the .raw map files).

I'll explain how I added black, white and red colors to the map. It was time consuming and required some trial and error to get it right, but it does work. At least you don't have to run SH3 each time a change is made to view it properly because you can view it directly in Photoshop as you change it.

First off, I created a series of grayscale colored boxes to use as teststrips to see what colors I get at what percentage of black. Each number in the box represents the percent of black. So compare my grayscale teststrip image to the color teststrip image to see what color showed up at what percent, using the new Color Table I created.

Grayscale Teststrips


Resulting Teststrips in Color (also shows my modded Color Table)


I used the eyedropper method mentioned in paragraph 3 of the 'How the map and color table relate' section to see what colors were actually used on the map. Not all of the colors represented in the Color Table are used to much noticeable effect on the gamemap. So there was room to play around and add colors.

Since the game is a sub sim, I didn't mess with trying to add new colors by changing any box of blue in the Color Table (ie. I didn't add black,white or red to the blue section), so that remains at default and won't cause any problems ingame. On the otherhand, since we'll never see the interior of the continents beyond what we can see near the shoreline, it leaves plenty of room for adding new colors without any real detrimental effects to the game environment.

I simply wrote down the original light and dark color values for the default beginning and ending browns. Then I reramped them using the click and drag method mentioned in the 'How to change the default map color table' section to free up the bottom row of the Color Table to add more colors. If you used the eyedropper method on the bottom row, you'd see they either aren't used or barely used on the map.

If you look at the Color Table image of the new Color Table I created, you can see how I added the colors in. The first 4 slots are black, then I ramped a light red to a bright red and finally black and white in the corner slots. If you compare the color teststrip to the Color Table, you can see that there is a slot in one of those first 4 black that could probably just as well be a new color on its own since the 3 and 4 percent teststrip boxes are both black. Also the red didn't need to be ramped out so much since only 2 shades of red showed up on the teststrip. White only needs that 1 box. So it was trial and error to find a reasonable arrangement for the new colors.

Now, if you use text with anti-aliasing on, you won't get nice solid filled in characters. Since the anti-aliasing creates different shaded pixels to blend the edges, what you'll most likely end up with is a mottled brown outline around your fill which looks ugly and stupid against the blue sea colors, like my testing showed. So I had to choose a font that looked reasonably well (I know it's not historic looking) without being anti-aliased or too hard to read at different point sizes. So I used Verdana. Create your text and fill with the appropriate percentage of black to get the color of your choice. For example, to get the black text, I typed it with no anti-alias clicked on, using Verdana and filled the letters with 3% black. With no anti-alias, the letters are jaggy somewhat (that's due to the low resolution of the file as well) but you get a solid fill with no mottled brown outline around your text. If you guess how to ramp enough of a color to cover the light and dark pixels of anti-aliased text, then I suppose you could use anti-alias to smooth things a little bit, but I just didn't have time to try to get that to work. This was the best compromise I could come up with to get solid filled characters.
************************************************** *****

Once you experiment a bit, you can change the colors almost anyway you like in the Color Table. But just remember, the colors will be lighter ingame than how you view them in Photoshop. The black is solid black but it shows up like a dark gray color ingame (same for the bright red). If you figure out how to get a true solid black, post it.

The only minor side effect you may notice on the game map using the Color Table I created is that the interior area of Asia around the Himalayas(?) has an 'Eye of Jupiter' thing going on and along the west coast of South America theres a little strip of black cutting through the mountain range, but its not that bad. To clear it up, you'd just have to open the raw map files and fill those affected areas with some nearby gray color thats not affected to get rid of it from view on the map. But like I said, this was all done in haste to get it to all of you in a timely manner. So experiment away!

Eye of Jupiter Thingy


P.S.- Adding colored text on the map doesn't affect the depth of the ocean. You won't hit anything solid or get sucked into a black hole. I sailed missions to test the map ingame and sailed through the teststrips with no groundings or Bermuda Triangle incidents. I frequently checked my depth under keel and was topside on the bridge to make sure nothing bit us in the rear while sailing through my multicolor teststrips.
Hunterbear is offline   Reply With Quote
Old 11-20-05, 06:39 AM   #2
Col7777
Grey Wolf
 
Col7777's Avatar
 
Join Date: Jun 2003
Location: Manchester UK
Posts: 944
Downloads: 260
Uploads: 0
Default

A great enhancement to the sim, good job.
__________________


Silent and Violent
Col7777 is offline   Reply With Quote
Old 11-20-05, 07:05 AM   #3
Axlwolf
Navy Dude
 
Join Date: Aug 2005
Posts: 177
Downloads: 23
Uploads: 0
Default

So,its now possible to have a depth chart!
Good work
Axlwolf is offline   Reply With Quote
Old 11-20-05, 07:33 AM   #4
timetraveller
Beach Leaf
 
Join Date: Dec 2004
Location: Atlantic Shipping Lanes
Posts: 287
Downloads: 1
Uploads: 0
Default

Most impressive work and description, Hunterbear!

Thanks.

TT
timetraveller is offline   Reply With Quote
Old 11-20-05, 07:49 AM   #5
rulle34
Grey Wolf
 
Join Date: Apr 2005
Location: Sweden
Posts: 835
Downloads: 8
Uploads: 0
Default

Wow Awsome
I would like to have a map with both convoy-routes and the names. Can you use that map with the convoylanes and just add these names as you showed?
__________________
rulle34 is offline   Reply With Quote
Old 11-20-05, 08:26 AM   #6
HundertzehnGustav
Sea Lord
 
Join Date: Jun 2005
Location: Lux, betw. G, B and F
Posts: 1,898
Downloads: 66
Uploads: 0
Default

Oh sunofagun that looks fine
am not happy with the Adrian sea label,, but aaah what a fiiine Job! :hmm:

:hmm:
looks like a real map finally...
__________________
In conclusion: SH3 is the shizzle, yo. -Frau Kaleun
Another negative about using your deck gun is that you are definately DETECTED, which has long term effects on your relationship with aircraft. -snestorm
HundertzehnGustav is offline   Reply With Quote
Old 11-20-05, 08:57 AM   #7
Hudsonhawk
Electrician's Mate
 
Join Date: Mar 2005
Location: Staten Island,New York
Posts: 133
Downloads: 0
Uploads: 0
Default

SWEET!!!!!!!!!!!!!!!
__________________
Hudsonhawk is offline   Reply With Quote
Old 11-20-05, 11:18 AM   #8
tommyk
Watch Officer
 
Join Date: Apr 2005
Location: Near U-995 (Kiel, Germany)
Posts: 337
Downloads: 5
Uploads: 0
Default

Wau, Hunterbear, this is great!
__________________
Gute Jagd und fette Beute!
tommyk is offline   Reply With Quote
Old 11-20-05, 02:05 PM   #9
Hunterbear
A-ganger
 
Join Date: Apr 2005
Location: California, USA
Posts: 72
Downloads: 18
Uploads: 0
Default

Thanks guys. I hope you find the information useful. I was up until 3am PST finishing the post so I may have been a little punch drunk and suffering from lack of sleep, besides seeing things, hehe.

Just play around with my instructions if you have a system capable to handle the raw map files and you can do almost anything. Just experiment.

to rulle34

Yes, you can add what you like. Later on I was figuring to use that one Satellite mod that showed you all the shipping traffic so I could create general shipping lane markers. I added the red color to the Color Table in hopes of using it to mark the general location of minefields and nets. I say general because if you zoom in on either map (4320_2160.raw & 21600_10800.raw) file, you won't get that detailed of a close-up. I believe the tile files in the Map2 folder are for the extreme zoom-in views but I haven't figured out how to open or modify them yet.

to HundertzehnGustav

Yeah I know. Just a crappy jpeg I spit out to give you some idea of what I've been up to. Same reason though that I'm not putting my map up for download yet. Still experimenting. All of the names used on the map I created came out of a huge sized encylopaedia brittannica world atlas from 1956 that my dad had, so if some of the names are not correct for the period,WWII, then that's my fault.

to Axlwolf

I would imagine you could add the numbers on the map to indicate the depth for the area. I don't think I would add too many because it might start crowding the view, but it is something worth looking into. My only concern would be that if you used the depth data from say the AOD OKM chart, how accurate is the depth portrayed in SH3 compared to a know depth chart? Probably a lot of trial and error to get it reasonably right.

L8r guys.
I'm glad some of you can use this info.
Hunterbear is offline   Reply With Quote
Old 11-20-05, 02:38 PM   #10
Seeadler
Pacific Aces Dev Team
 
Join Date: Mar 2001
Location: Northern Germany
Posts: 1,096
Downloads: 169
Uploads: 0


Default

Here are examples of the original KM grid maps.
Seeadler is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 06:39 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 1995- 2025 Subsim®
"Subsim" is a registered trademark, all rights reserved.