Bmp2gmp dummies guide?

Ins and Outs of Creating the Map
CJJackR
Hobo
Posts: 25
Joined: Wed Jan 12, 2011 10:21 am
Location: Assen, The Netherlands

Re: Bmp2gmp dummies guide? Unread post

Wolverine@MSU wrote: I think there may be a workaround for you CJ, provided you have a bit (no pun intended) of computer saavy. I'm working on it right now (instead of doing what I'm supposed to be doing at work). *!*!*!
--------------------------------------------------------------------------------------------------------------
Success ::!**! ::!**! ::!**!

All you need to do is add an alpha channel to the 24 bpp bitmap image (*.bmp) you want to paste and replace the "compressed" image space of the 64-bit-OS saved gmp file. You need a photo editor that can add an alpha channel (GIMP, Photoshop, Paintshop?) and a hex editor to do the cutting/pasting. It's actually pretty straightforward.

If anyone is interested, I can make a tutorial. With more and more folks going to 64-bit OS (Vista/Win 7) this may become a problem for mapmakers with a 64-bit OS who want to overlay an image on to a map.
Woohoo!!! I love you man, you're ace! {,0,} :lol:
I think I can manage adding an alpha channel to the BMP's (I've done that before with creating custom company logo's). I have got GIMP.
But the HEX Editor stuff goes way beyond me. I would really like a tutorial on that part. :-)
User avatar
Wolverine@MSU
CEO
Posts: 1166
Joined: Fri Nov 10, 2006 2:14 pm
Location: East Lansing, MI

Re: Bmp2gmp dummies guide? Unread post

Hex editing is no big whoop. It's a lot like word processing except you're cutting and pasting bytes instead of words. I need to work a little on streamlining the process as much as possible, and making sure it works as described, but should have a tutorial available in the next few days.
User avatar
Wolverine@MSU
CEO
Posts: 1166
Joined: Fri Nov 10, 2006 2:14 pm
Location: East Lansing, MI

Re: Bmp2gmp dummies guide? Unread post

Here is a tutorial for replacing the colormap on a map file saved on a 64-bit OS. Try it out and let me know if it doesn't work.

Hawk: I'm attaching it to this post as a "beta" version. If it works as described, you can move it into the RT3 Extras page.
Attachments
BMP2GMPfor64bitOS.pdf
(786.33 KiB) Downloaded 400 times
User avatar
Hawk
The Big Dawg
Posts: 6504
Joined: Fri Nov 10, 2006 10:28 am
Location: North Georgia - USA

Re: Bmp2gmp dummies guide? Unread post

I'll try to keep an eye on this thread, but if I miss that it works and can be added, please let me know via PM or email. (0!!0)
Hawk
User avatar
Wolverine@MSU
CEO
Posts: 1166
Joined: Fri Nov 10, 2006 2:14 pm
Location: East Lansing, MI

Re: Bmp2gmp dummies guide? Unread post

I will. As soon as I get a few replies, I'll let you know that it's OK, make any changes and PM it to you for posting, at which point I'll remove it from the thread and post a link to the new location.
CJJackR
Hobo
Posts: 25
Joined: Wed Jan 12, 2011 10:21 am
Location: Assen, The Netherlands

Re: Bmp2gmp dummies guide? Unread post

Thanks Wolverine, I've downloaded the pdf and I've taken a quick look at it.
I'm pretty busy at the moment, I'm going to make some time for this on the Tuesday afternoon. I'll let you know how things worked out. ;-)
CJJackR
Hobo
Posts: 25
Joined: Wed Jan 12, 2011 10:21 am
Location: Assen, The Netherlands

Re: Bmp2gmp dummies guide? Unread post

I think I've done everything according to what the PDF says, but the game crashes when I load the map.
I've opened the BMP I had, added an Alpha channel and saved it as TARGA, first with RLE-compression in both top left and lower left (whatever that means) and then without but there was no difference.
My GMP map (512x512) file with the RLE-compression (top left) Targa file added is 11.675.005 bytes and the one without RLE-compression is 9.652.060 bytes. So the filesize does look a bit more normal now.
As for the rest, as said before I think I did everything as dictated by the PDF and since it's pretty straight forward I have no clue on what I'm doing wrong once again...
soccersetter643
Hobo
Posts: 30
Joined: Sun Feb 05, 2012 3:38 pm

Re: Bmp2gmp dummies guide? Unread post

This could actually be an awesome way of creating maps by using google maps/google earth. Start by just taking a screenshot of the google map view (not satellite), with the contour lines turned on. Then, convert to a .bmp and then put into the .gmp file. Create the topography manually by using the contour lines as reference, then create cities and events based on the map. then debug and test the scenario (you could probably even wipe the terrain color at this point, if necessary.

After you're done writing events and testing, just upload the second image and it would recolor the map (if I'm not mistaken) based on the satellite view!

*NOTE* I haven't actually tried this, so I don't know if it would work or not, but seems like it should be pretty straightforward!

*IMPORTANT EDIT* I remember searching the forms for this a while back, and not finding much, but for those of you interested in creating a map that is NOT 1024x1024, IT IS POSSIBLE. I created one today that was 1024x384. The key is that, once you have cropped and sized your .bmp image that you will use to be whatever size you are using, scale it up so that it stretches to be 1024x1024 anyway. When you apply the .bmp in the program, it will restretch itself to the size of your map, so in the end, the file will fit like a charm!
Last edited by soccersetter643 on Sun Feb 24, 2013 10:46 pm, edited 1 time in total.
soccersetter643
Hobo
Posts: 30
Joined: Sun Feb 05, 2012 3:38 pm

Re: Bmp2gmp dummies guide? Unread post

PS is there any way to release this set of scripts to a mac version? anyone know how to script for terminal in mac?
User avatar
Gumboots
CEO
Posts: 4824
Joined: Mon Aug 13, 2012 4:32 am
Location: Australia

Re: Bmp2gmp dummies guide? Unread post

Question: has anyone tried using this trick to reinstate a map image and get rid of the infamous "blue bleeding" around rivers and oceans?

I realise that re-applying the .bmp/.tga via hex editing will fix any painting issues or 64 bit compression issues, but AFAICT the oceans and rivers aren't part of the "terrain painting" as such. They're more like independent elements that exert an effect on the terrain painting. Since the blue bleeding comes from rivers and oceans, I'm wondering if re-applying the .bmp/.tga fixes that, or if the bleeding will stay regardless.
User avatar
Hawk
The Big Dawg
Posts: 6504
Joined: Fri Nov 10, 2006 10:28 am
Location: North Georgia - USA

Re: Bmp2gmp dummies guide? Unread post

Wolverine@MSU wrote:Hawk: I'm attaching it to this post as a "beta" version. If it works as described, you can move it into the RT3 Extras page.
So, has it been determined that this guide works and is ready for the archives?
Hawk
User avatar
RulerofRails
CEO
Posts: 2063
Joined: Sun Dec 08, 2013 1:26 am

Re: Bmp2gmp dummies guide? Unread post

Hawk wrote:So, has it been determined that this guide works and is ready for the archives?
I don't have 64-bit, but I think its solid. Avoiding color degradation of existing maps is arguably as important at present as the main purpose, so a mention of this ability with the file would be good, IMO. Even though it isn't mentioned directly, the only extra step is really a copy/paste which most people who have a hex editor should be able to do. ^**lylgh
User avatar
Gumboots
CEO
Posts: 4824
Joined: Mon Aug 13, 2012 4:32 am
Location: Australia

Re: Bmp2gmp dummies guide? Unread post

I may have to do some testing of this. TBH map degradation via editor saves is the main thing that has always prevented me from making new maps. I'm the sort of bloke who likes to do a job once and do it right. Fighting apps which continually screw the work up is not my idea of a good time.

What mainly interests me is how does this process handle oceans and rivers. Has anyone tested that?
User avatar
RulerofRails
CEO
Posts: 2063
Joined: Sun Dec 08, 2013 1:26 am

Re: Bmp2gmp dummies guide? Unread post

Gumboots wrote:What mainly interests me is how does this process handle oceans and rivers. Has anyone tested that?
In the hour or so that I was playing with it, I looked fairly carefully at coastlines especially and the coloring looked the same to me. In theory this should work because the resulting file is always larger, meaning you are adding graphics detail back to the map. Although, not really a proper test, and for me I am satisfied as long as the map doesn't look blocky along the coast so my eye may not be sensitive enough to pick-up subtle differences with river shading/color textures. Try it, I sure was pleased with the results I saw.
User avatar
Gumboots
CEO
Posts: 4824
Joined: Mon Aug 13, 2012 4:32 am
Location: Australia

Re: Bmp2gmp dummies guide? Unread post

Well the rivers and oceans aren't on the original bitmap. They're added via the editor, so what I was wondering was whether throwing the original .bmp back into the .gmp had any effect on oceans and rivers that had been added. The big problem with them is the blue bleeding that eats land each side of rivers and along coastlines after multiple saves, and that seems to be something quite distinct from normal terrain painting.

The other thing that occurred to me about this is that it's still going to be limiting. All you can do is throw the original .bmp back in. There is no possibility of tweaking any parts of it for better in-game visuals, because as soon as you do that you have to save the changes via the editor, meaning you're screwed again. The only viable option is going to be to throw a Google Earth tiled image at the .gmp, and hope it's ok everywhere.

I was thinking about this 64 bit bug the other day, and I have a feeling that it's related to the infamous low res gfx bug. IOW, if the system specs are too high, RT3 thinks it has to save the maps at lower res. If this is the case (seems likely) then that opens the possibility of somebody figuring out an override for this bug too. That would be great, if it can be done. !*th_up*!
User avatar
RulerofRails
CEO
Posts: 2063
Joined: Sun Dec 08, 2013 1:26 am

Re: Bmp2gmp dummies guide? Unread post

Degradation Alt USA.jpg
Degradation Alt USA.jpg (50.16 KiB) Viewed 4906 times
Alt USA after replacing bmp.jpg
Alt USA after replacing bmp.jpg (49.93 KiB) Viewed 4906 times
For clarification this is the "blocky" effect that I see being effectively removed by replacing the bmp data. (This is from the modified Alternate USA only available via one of the forum threads (blocky) compared with the original version that comes with the game (copied the bmp from there for the fixed version).) I never really understood the use of the term "bleeding". Is this bleeding or not? If so, how does it affect rivers? If not, does someone have some screenshots of what it looks like in case I have a little testing time?

PS. I tried making a small, blank, close-to-white test map without textures to try to get some of this "bleeding" happening and easily visible, but after 10 saves file size is the same and I didn't notice any extra blue around the rivers. Maybe size is a factor or the presence of events/trees etc. in the file :?:
User avatar
Gumboots
CEO
Posts: 4824
Joined: Mon Aug 13, 2012 4:32 am
Location: Australia

Re: Bmp2gmp dummies guide? Unread post

What sort of box are you running?
User avatar
RulerofRails
CEO
Posts: 2063
Joined: Sun Dec 08, 2013 1:26 am

Re: Bmp2gmp dummies guide? Unread post

Laptop with Win 7 32-bit. 2.6GHz dual-core Intel, and Radeon 4650 graphics card. Why?
User avatar
Gumboots
CEO
Posts: 4824
Joined: Mon Aug 13, 2012 4:32 am
Location: Australia

Re: Bmp2gmp dummies guide? Unread post

Could be another 64 bit issue. I'm on W7 64 bit with nVidia gfx card and 8 meg of RAM, and I can generate the start of "blue bleeding" after just 2 saves.

This has me wondering if the best way to do RT3 maps on a 64 bit box would be in a virtual box running 32 bit OS. That may get around several issues, and once the map is finished it could still be played in the native 64 bit OS for better processing power.
User avatar
RulerofRails
CEO
Posts: 2063
Joined: Sun Dec 08, 2013 1:26 am

Re: Bmp2gmp dummies guide? Unread post

Since it appears that "blue bleeding" could be a 64-bit issue I don't see how I can do any meaningful testing whether replacing the bmp will repair it. Will leave it for someone else.
Post Reply