Author Topic: A problem with bitmaps  (Read 862 times)

Offline Greebo

  • Skinner Team
  • Platinum Member
  • ******
  • Posts: 7024
A problem with bitmaps
« on: October 04, 2009, 02:22:30 PM »
I've been having problems converting my MA terrain with the new TE. Since I started playing around with water effects the TE crashed every time I tried to build a res file.

Easyscor reckoned I might have got the bit depth wrong on one of the bmps but I'd already checked that. That suggestion got me on the right track however. It turns out that when my graphics editor Paint Shop Pro converts a native multi-layer image into a bmp it dithers some of the dots to a slightly different shade. So my gndtype.bmp file had 41 shades of grey instead of the original 13, and the same thing happened with waterc and waterd. Once I edited out all the slightly different shaded dots from the bmps, the problem went away.

I think the specific problem was with the waterc and d files. The TE uses these to create another bmp called cmpwater.bmp which draws the coastlines. With the faulty water bmps the cmpwater.bmp file was enormous, around 230,000 by 1024 pixels in size. With the corrected water bmps it is now 6240 by 1024. I think the TE just timed out trying to handle that huge cmpwater file.

Just mentioning this in case anyone else has the same issue.

Offline Easyscor

  • Plutonium Member
  • *******
  • Posts: 10899
Re: A problem with bitmaps
« Reply #1 on: October 12, 2009, 12:03:30 PM »
See my latest bug report.
Easy in-game again.
Since Tour 19 - 2001

Offline Greebo

  • Skinner Team
  • Platinum Member
  • ******
  • Posts: 7024
Re: A problem with bitmaps
« Reply #2 on: October 12, 2009, 03:33:26 PM »
The funny thing is since my last post here I've built the terrain a dozen times with no problem. Looking at the four backups I've made of the terrain since then, the cmpwater.bmp file has remained at 6.1 MB each time. However tonight the TE has corrupted the cmpwater file again as you described in your bug report, it made it 226 MB. Possibly its because I've been playing with the water files again, I've left them well alone until tonight.

As I've finished editing coastlines I have made cmpwater.bmp a read only file. This allows me to build the terrain once per session. If I try to build it twice in a session, the TE crashes. Seems less hassle than replacing the file each time though.

Offline Greebo

  • Skinner Team
  • Platinum Member
  • ******
  • Posts: 7024
Re: A problem with bitmaps
« Reply #3 on: October 13, 2009, 12:58:16 PM »
Actually don't make cmpwater.bmp a read only file. The TE builds the terrain OK but the game crashes when it tries to load the terrain.

Offline Easyscor

  • Plutonium Member
  • *******
  • Posts: 10899
Re: A problem with bitmaps
« Reply #4 on: October 13, 2009, 03:37:31 PM »
Ouch! Been there, a lot, but things are going better on this end.

Funny thing is, last night I used the Make Map function for the first time (it's and update terrain) and the next thing I knew, cmpwater.bmp was updating lol. Good thing I didn't get too excited, because it didn't happen again. I figure it might have been a combination of Make Map and importing the water files.

I did see how the waterc file is impacting the water color. Turns out that black is the lightest ocean color and white is the darkest. The opposite of what I expected but if I'd re-read the Readme documentation, I've have known that lol. Doh!
Easy in-game again.
Since Tour 19 - 2001