Log in

View Full Version : [REL] SH5/3 Map viewer/gradient editor


TheDarkWraith
08-30-11, 05:34 PM
Have you ever wanted to change the colors of the map and see those changes in real time? Now you can :yeah:

How it works:
When the app is loaded everything is using the same gradient (map, selected, and editing) and the Gradients color changer box (indicies) is loaded with colors from that gradient. If you press G to cycle through available gradients then obviously the selected gradient changes. To adjust the colors (indicies) of the selected gradient that you have chosen you have to press the load colors button. Pressing that button will change the editing gradient to the selected gradient. That will load the colors from the selected gradient into the editing colors box. Now when you edit any color index in the gradients editor box it will update the index color and also update the editing gradient so that you can see the change. To apply the editing gradient to the map you have to press the editing gradient's map button. Anytime you press the load colors button the selected gradient will be replaced and all changes are lost.
Pressing any gradient's map button will cause that gradient to be used for rendering of the map and the map will be reshown using it.
Pressing any gradient's save button will save the gradient shown in that gradient box to a file.

Press H (for help) for available commands and how to pan/zoom map

The app has the ability to take screenshots of your work also

6 gradient tga files are included with the app (4 of them are from Nisgeis's work from his nav map mod)

If you prefer to edit/make your own tga gradient files they have to follow these stipulations:
- width 256 pixels
- height 1 pixel
- bit depth of 24bpp

In order to see the gradient and/or changes in game you must save as the game file Terrain.act

http://www.subsim.com/radioroom/picture.php?albumid=446&pictureid=4814

v0.0.18: http://www.gamefront.com/files/20729...DarkWraith_zip (http://www.gamefront.com/files/20729596/SHMapViewer_0_0_18_by_TheDarkWraith_zip)

:|\\

Magic1111
08-31-11, 06:22 AM
Many thanks TDW !!! :yeah::up::yeah:

Best regards,
Magic

SquareSteelBar
08-31-11, 07:20 AM
:rock:

urfisch
08-31-11, 09:46 AM
nice seeing you back at sh3 modding...tdw. thanks for this.

Hitman
08-31-11, 11:46 AM
Awesome, been wanting to change the colours for those in real KM charts for ages :yeah:

Sailor Steve
08-31-11, 01:56 PM
When I try to load it I get an 'Exception' message and then this:

http://i14.photobucket.com/albums/a325/SailorSteve/Image1-17.jpg

Awesome, been wanting to change the colours for those in real KM charts for ages :yeah:
Cool. That's all I really want. Can you put it up or mail me a copy when it's done?

TheDarkWraith
08-31-11, 06:08 PM
nice seeing you back at sh3 modding...tdw. thanks for this.

I'm not modding SH3, I'm modding SH5. I made this for 5 but since everything was 95% similar (except for SH3 uses the Terrain.act file as it's gradient) I ported it over to SH3 also :up:

TheDarkWraith
08-31-11, 06:10 PM
When I try to load it I get an 'Exception' message and then this:

There's a Dbgview app included in the package. Run that first (ensure capture Win32 checked) then run the app. I'll need to see output of Dbgview to see why you're getting an exception.

makman94
08-31-11, 06:34 PM
thank you for this tool ,TDW ! :rock:

Hitman
08-31-11, 06:41 PM
Cool. That's all I really want. Can you put it up or mail me a copy when it's done?

Sure, but I can't tell you when I will do it as I'm busy with other projects, and there are two different colour schemes of real KM charts I have seen so far. One with water in light blue and land in light beige (No different colours for depth/heigth but flat colour as in SH4 land), and another -I tend to favour- with water in light blue and land in white.

Anvart
09-02-11, 07:39 AM
I'm not modding SH3, I'm modding SH5. I made this for 5 but since everything was 95% similar (except for SH3 uses the Terrain.act file as it's gradient) I ported it over to SH3 also :up:
In the game (SH3) there is Terrain.act file, it's a Color Table - palette (256 colours) for indexed maps... this file is standard file for Color Table of Photoshop.:03:
i think, it's more correct terminology... :woot:
...
In classical programming is more correct to use standard graphic table - palette of colors with the ability to edit... with showing changes on the map. :salute:

http://img851.imageshack.us/img851/1152/terrainpalette.jpg

You can use Photoshop to change the Color Table. For example, load height map *. raw... Switch menu item Image-->Mode to Indexed Color (if Indexed Color is unavailable, first switch to Grayscale) ... then select the menu Image-->Mode-->Color Table and load file ..\data\Terrain\Pal\Terrain.act in the Color Table of Photoshop. Using standard tools, you change colors of the map or/and the Color Table and then save the Color Table - palette into file Terrain.act.
...
To better illustrate the interaction of Color Table and indexed map, i used TerrainTypes map (used 48 indexes) in this example:

http://img339.imageshack.us/img339/2457/terraintypes.jpg