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? Post

When I don't edit the map with 3rd party software I can open the map just fine, no problems at all. :-)

But the point is that every now and then I like to use satellite imagery to paint the map to make editing a bit easier and to make it look a tad more realistic.
To do that, I have to use BMP2GMP. For as far as I know there's no other software like it. (I don't like to use heightmaps for creating maps.)
I've tried things myself and I've tried all of your suggestions to make it work, but so far no luck. :-(
The maps still come out all purple-striped-only-part-of-the-bmp-painted.
User avatar
Hawk
The Big Dawg
Posts: 6503
Joined: Fri Nov 10, 2006 10:28 am
Location: North Georgia - USA

Re: Bmp2gmp dummies guide? Post

Ah! OK! I got'cha!
Unfortunately I'm all out of ideas. **!!!** Wish I, or anyone, could help more.
Hawk
User avatar
Wolverine@MSU
CEO
Posts: 1166
Joined: Fri Nov 10, 2006 2:14 pm
Location: East Lansing, MI

Re: Bmp2gmp dummies guide? Post

No clue here either !hairpull! . What OS are you using? Vista? Win7? If either of these, what happens if you run it in Win XP (or even Win 98) compatibility mode?

Please do this:
Start 1.05, go to the Editor, make a new map from scratch, use the default size of 320 x 320, let it load and save it immediately. When I do this the file size is 7,169,791 bytes, and the "Size on Disk" (in Properties) is also 7,169,791 bytes. Is this what you get? Hawk (or anyone else willing to do the test), could you do this too and report your exact file size(s).

If we can't get it figured out for you CJ, you could just PM me the bmp you want overlaid, the size of the gmp map you want, and I can overlay the bmp and PM it back to you.
User avatar
Hawk
The Big Dawg
Posts: 6503
Joined: Fri Nov 10, 2006 10:28 am
Location: North Georgia - USA

Re: Bmp2gmp dummies guide? Post

I get file size as 7,169,791, same as you, but for Size on disk I get 7,172,069.

I'm on XP.
Hawk
CJJackR
Hobo
Posts: 25
Joined: Wed Jan 12, 2011 10:21 am
Location: Assen, The Netherlands

Re: Bmp2gmp dummies guide? Post

I'm running 7. I enabled compatibility mode XP SP2 (also run as Administrator just to be sure).
This is what happened:
In 1.05, I created a 320x320 map (named TEST), the file size was: 3.301.631 bytes, file size on disk: 3.305.472 bytes.
Restarted the game.
I created a second map (named TEST320), the file size was: 3.237.631 bytes, file size on disk: 3.239.936 bytes.

In 1.06, did the same thing.
TEST file size: 3.330.942 bytes, file size on disk: 3.334.144 bytes.
TEST320 file size: same as above, file size on disk: same as above.


I enabled compatibility mode 98 (also run as Administrator just to be sure).
In 1.05, I created a 320x320 map (named Win98TEST) and the file size was: 3.301.631 bytes, file size on disk: 3.305.472 bytes. (Same as WinXP mode.)
Restarted the game.
I created a second map (named Win98TEST320), the file size was: 3.237.631 bytes, file size on disk: 3.239.936 bytes. (Same as WinXP mode.)


In 1.06, did the same thing.
Win98TEST file size: 3.407.742 bytes, file size on disk: 3.407.872 bytes.
Win98TEST320 file size: 3.330.942 bytes, file size on disk: 3.334.144 bytes. (Same as WinXP mode.)


So you might be on to something here Wolverine. :-)
User avatar
Hawk
The Big Dawg
Posts: 6503
Joined: Fri Nov 10, 2006 10:28 am
Location: North Georgia - USA

Re: Bmp2gmp dummies guide? Post

Not sure if this has been asked or not yet, and I just don't have time to go back through all the posts, but do you have RT3 installed somewhere outside of the Program Files directory, or did you install in the default location?
Hawk
User avatar
Wolverine@MSU
CEO
Posts: 1166
Joined: Fri Nov 10, 2006 2:14 pm
Location: East Lansing, MI

Re: Bmp2gmp dummies guide? Post

I'm not too concerned about the "Size on disk" disparities. That happens because files are stored in descrete "blocks" on the disk, and if the tail end of the file doesn't quite fill the "block" the unfilled part stays empty, but the entire "block" size gets reported in the "Size on disk". More troublesome is the small file size itself. Something is missing on your file that is there in mine and Hawk's. It's also strange that 2 saves of the same map, even with different names, should be so different in sizes. I'm sure this is the root of the problem, but I'll be darned if I can tell you what it is. Looks to me like something that Win 7 is doing (even in "compatibility" modes) that's altering the file. I have a dual-boot machine here (XP/Win 7) but don't have RT3 installed in the Win 7 part. I'll bring in my disks and install on Win 7 and see what happens. I'm sure there's a tweak somewhere that need to be done to make things work right. !hairpull!
CJJackR
Hobo
Posts: 25
Joined: Wed Jan 12, 2011 10:21 am
Location: Assen, The Netherlands

Re: Bmp2gmp dummies guide? Post

@Hawk
No, I never install any programs in de default folder.

@Wolverine
Yes, I thought that was very strange aswell (the name thing).
And I suspected as much (Windows 7 doing 'something' strange).
Curious about your findings on RT3 on Windows 7.

Has absolutely no one else got RT3 installed on 7? :-?
Last edited by CJJackR on Wed Jan 26, 2011 6:03 pm, edited 1 time in total.
User avatar
nedfumpkin
CEO
Posts: 2163
Joined: Sat Feb 16, 2008 9:16 pm
Location: Hamilton - Canada

Re: Bmp2gmp dummies guide? Post

Wolverine@MSU wrote:No clue here either !hairpull! . What OS are you using? Vista? Win7? If either of these, what happens if you run it in Win XP (or even Win 98) compatibility mode?

Please do this:
Start 1.05, go to the Editor, make a new map from scratch, use the default size of 320 x 320, let it load and save it immediately. When I do this the file size is 7,169,791 bytes, and the "Size on Disk" (in Properties) is also 7,169,791 bytes. Is this what you get? Hawk (or anyone else willing to do the test), could you do this too and report your exact file size(s).

If we can't get it figured out for you CJ, you could just PM me the bmp you want overlaid, the size of the gmp map you want, and I can overlay the bmp and PM it back to you.
Now this is weird, I did that exactly, and my files are ½ the size...


3.30 MB (3,467,575 bytes)
3.30 MB (3,469,312 bytes) size on disk

So I tried it in TM....same thing.

3.27 MB (3,437,044 bytes)
3.28 MB (3,440,640 bytes) size on disk

....CJ..are you using the files I sent you? I am on Vista.
CJJackR
Hobo
Posts: 25
Joined: Wed Jan 12, 2011 10:21 am
Location: Assen, The Netherlands

Re: Bmp2gmp dummies guide? Post

Yes I am using your executables and configs. And you've got 'weird' file sizes aswell!! The question is now, what happens if you try to paint them with BMP2GMP and reopen them in the Editor? :-)
User avatar
nedfumpkin
CEO
Posts: 2163
Joined: Sat Feb 16, 2008 9:16 pm
Location: Hamilton - Canada

Re: Bmp2gmp dummies guide? Post

I haven't tried it yet, I am planning on it for a map I am working on so I am really interested. I will try to do it and get back to you.
User avatar
Wolverine@MSU
CEO
Posts: 1166
Joined: Fri Nov 10, 2006 2:14 pm
Location: East Lansing, MI

Re: Bmp2gmp dummies guide? Post

nedfumpkin wrote: I am on Vista.
This is interesting. Ned, can you successfully BMP2GMP a bitmap onto a gmp map? I'll be installing on my Win 7 partition soon and I'll get back when I have some results.
User avatar
Wolverine@MSU
CEO
Posts: 1166
Joined: Fri Nov 10, 2006 2:14 pm
Location: East Lansing, MI

Re: Bmp2gmp dummies guide? Post

So I just installed RT3 on my Win 7 partition (running 32-bit version), updated to CtoC, applied the "Vista Patch" (game would crash until I used the patched "engine.cfg"), went to the Editor and made a 320x320 map, and guess what.........the file size of the saved map is 7,169,791 bytes! Haven't tried to BMP2GMP it yet, but I suspect it will work.

CJ: Are you running Win 7 64-bit? That's the only reason I can see that might be causing your problems. If so, how to fix it is beyond me, unless you can can run Win 7 in 32-bit mode. If you're not running 64-bit, the only other thing I can think of is that you haven't updated your Win 7 install. I went to windows update, and found several "recommended" updates that had to do with compatibility issues in Win 7. I installed them without testing things first, so I don't know if that was the issue.
CJJackR
Hobo
Posts: 25
Joined: Wed Jan 12, 2011 10:21 am
Location: Assen, The Netherlands

Re: Bmp2gmp dummies guide? Post

Yes, I am running 64-bit, and I update Windows quite regularly. I really don't understand why RT3 wouldn't write almost half of the file just because I run 64-bit. Although stranger things have happened. :-P
MS should develop and release a 32-bit compatibility mode. :-)
User avatar
Wolverine@MSU
CEO
Posts: 1166
Joined: Fri Nov 10, 2006 2:14 pm
Location: East Lansing, MI

Re: Bmp2gmp dummies guide? Post

CJ: I don't think it's a matter of only writing "half of the file" since the files load back into your RT3 OK (don't they?). It sounds to me more that the 64-bit version changes the way the bytes are written to a file (I may be blowing hot air here) or does some other crazy thing when writing to the disk.

Let's try something: Looking at the "Maps" folder in your 1.05 installation, what is the size of the "Crossing the Alps.gmp" scenario? On my computer (running Win XP this time) it is 6,485,709 bytes. Load it into the Editor, Unclick the "Campaign Scenario" box and resave it as "Crossing the Alps_Resave". Check the size: mine is 6,485,846 bytes. Is your's a similar size, or is it significantly smaller?

I have another machine that's running Win 7 64-bit, so I'll install there and see what I find out. This problem gets more interesting at every turn!
User avatar
Wolverine@MSU
CEO
Posts: 1166
Joined: Fri Nov 10, 2006 2:14 pm
Location: East Lansing, MI

Re: Bmp2gmp dummies guide? Post

I did the above test on a 64-bit Win 7 and the re-saved file size was 2,553,616 bytes. Clearly the 64-bit OS is messing with the files.
CJJackR
Hobo
Posts: 25
Joined: Wed Jan 12, 2011 10:21 am
Location: Assen, The Netherlands

Re: Bmp2gmp dummies guide? Post

Wolverine@MSU wrote:CJ: I don't think it's a matter of only writing "half of the file" since the files load back into your RT3 OK (don't they?).
LOL! I know that, it was just figure of speech. ;-) And yes, they do load OK.
Wolverine@MSU wrote:This problem gets more interesting at every turn!
It definately does. :lol:
Wolverine@MSU wrote:Let's try something: Looking at the "Maps" folder in your 1.05 installation, what is the size of the "Crossing the Alps.gmp" scenario? On my computer (running Win XP this time) it is 6,485,709 bytes. Load it into the Editor, Unclick the "Campaign Scenario" box and resave it as "Crossing the Alps_Resave". Check the size: mine is 6,485,846 bytes. Is your's a similar size, or is it significantly smaller?
I did the above test on a 64-bit Win 7 and the re-saved file size was 2,553,616 bytes. Clearly the 64-bit OS is messing with the files.
I am going to try right now, I'll edit this post for the result.

EDIT:
I've done exactly as you told and I got the same result.
Normal file size: 6.485.709 bytes
Resaved file size: 2.553.746 bytes
User avatar
Wolverine@MSU
CEO
Posts: 1166
Joined: Fri Nov 10, 2006 2:14 pm
Location: East Lansing, MI

Re: Bmp2gmp dummies guide? Post

It seems to be an RT3-specific problem. I saved several different kinds of files (TIFF, PDF, DOC, RTF) on a 32-bit system, loaded them into the 32-bit applications on a 64-bit OS, resaved them, and they all came out to be the same size as the originals (give-or-take a hundred bytes or so). I wonder if the 64-bit OS is doing some sort of on-the-fly file compression before writing to the disk, and then "uncompressing" when it's read back into RT3. I'll see if I can track down what's missing from the 64-bit files compared to the 32-bit files and whether a 64-bit file, when read back into a 32-bit OS RT3 resaves as the smaller file, or gets "expanded" back out to its original size.

I talked to our computer guy and he was baffled too. I haven't been able to find anything on the web that addresses this phenomenon, so it must not be very common.
User avatar
Wolverine@MSU
CEO
Posts: 1166
Joined: Fri Nov 10, 2006 2:14 pm
Location: East Lansing, MI

Re: Bmp2gmp dummies guide? Post

It appears to be some kind of file compression that RT3 does when running on a 64 bit OS, but strangely, a map saved on the 64 bit OS reads in just fine when loaded on a 32 bit OS. However, resaving the read-in file does not expand it back to its original size. Interestingly, all of the 64-bit saves are roughly 3,932,XXX bytes smaller than the original files, and is primarily located at the end of the files. I'm pretty sure that that's where the color map is stored. I made a 64 x 64 map with default colors and one with black paint, and the only real difference was the last ~4 Mb. It looks like the color map is saved as a 1024 x 1024 x 32 bpp (4-bytes per pixel) bitmap. I was able to cut out that part from a 32-bit file and use it to replace the last part of a 64-bit map and the pasted color map appeared on the 64-bit version. 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). *!*!*!
User avatar
Wolverine@MSU
CEO
Posts: 1166
Joined: Fri Nov 10, 2006 2:14 pm
Location: East Lansing, MI

Re: Bmp2gmp dummies guide? Post

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.
Post Reply