Dunno if it will help, but people quite often use Blender to construct 3d terrain models from grayscale height maps.
http://johnflower.org/tutorial/make-mou ... eight-maps
Bmp2gmp dummies guide?
Re: Bmp2gmp dummies guide?
Complete express car and caboose packs - Custom double tankers (Alternative F era) - Pennsy H3 Consolidation
Слава Україні! Героям слава!
Слава Україні! Героям слава!
Re: Bmp2gmp dummies guide?
Stands to reason that every cell must have a height value, but beats me how that relates to Milo's notes. There are going to be 1024x1024 cells on a map, assuming they are each 1px square on the base .bmp the game uses, or possibly 1025x1025 if using the vertices rather than the cells. So how that ties in with what Milo says about 66x66x3 is a mystery, because that is a totally different number.RulerofRails wrote:Milo mentions the heightmap in his notes on the GMP format:I don't know how to extract that data into a usable format. Seems each game cell has an entry for height.Code: Select all
--- end of fixed-location fields --- 00006a78:00006ac7 array header (industry) - see below 00006ac8:00006ad0* industry enabled bitfield 00006ad1:000073b6* 67 industry records @ 34 bytes each - see below 000074c7:00007516* array header (engines) - see below 00007517:0000751f* engine enabled bitfield 00007520:000085e1 66 engine records @ 65 bytes each - see below 000085f2:000085f5 Map width in cells + 1 000085f6:000085f9 Map height in cells + 1 64x64: 00008602:0000ca11 heightmap, 66x66x4 0000d269:0000e2e6 groundmap, 66x66x1 02=uninitialized, 00=water, 11=land appears not to be necessary 0000f479:000125f8 watermap, 66x66x3 byte 0: 0=no water, 1=ocean, 2=river, 3=lake, bits 3-5 = direction 0=N,8=NE,10=E,18=SE,20=S,28=SW,30=W,38=NW byte 1: 2=river byte 2: 10=wave blocking, 20=river junction f479=0,0 f47c=0,1 f536=0,63 f53f=1,0 125f0=63,63 Each row = 66 cells at 3 bytes/cell = 198 bytes. Total size is 64 rows at 198 bytes/row = 12672 bytes. 00013895:00014914 rivermap, 66x66x1 00=ground, 01/nonzero=river 000172a2:000182a2 territory map 64x64x1 bits 7-4 = territory # bits 3-0 = 0 unfortunately, setting to 0 or >C0 causes terr editor as well as any game to crash on mouse over that square 0001b32b:0001b72a region map, quarter-scale (16x16x4) - see below
Complete express car and caboose packs - Custom double tankers (Alternative F era) - Pennsy H3 Consolidation
Слава Україні! Героям слава!
Слава Україні! Героям слава!
- RulerofRails
- CEO
- Posts: 2063
- Joined: Sun Dec 08, 2013 1:26 am
Re: Bmp2gmp dummies guide?
My guess would be that Milo was reporting on a square map 64 cell map. 64x64 is the smallest map size available. Unfortunately, I don't have an idea past that. Probably not very useful except in special cases like Hawk has.
Re: Bmp2gmp dummies guide?
Ok, that makes sense. In which case the heights would just be a simple float or integer, in some unit, and the block of bytes would presumably expand to suit the size of the map. I can see how, in principle, it would be possible to extract the information and use it. Actually coding it to be usable by most people could be a fair bit of work.
Complete express car and caboose packs - Custom double tankers (Alternative F era) - Pennsy H3 Consolidation
Слава Україні! Героям слава!
Слава Україні! Героям слава!
Re: Bmp2gmp dummies guide?
Just had a look inside a .gmp file. Screenshot attached. Checked a few values, and the heights are obviously given as standard four byte floats (decimal values of 1993, 1987, etc).
The screenshot also demonstrates why there were problems with Lirio's renaming of locomotives causing them to go missing from the options when playing existing maps. As I suspected, the .gmp coding relies on calling the locos by their in-game names rather than by loco id number, so if you change the in-game name then the .gmp will not recognise that loco.
This would be easy to get around if anyone wanted to. All you would need to do is open the .gmp in a hex editor, search for the locomotive's name, and edit it to suit the new name.
The screenshot also demonstrates why there were problems with Lirio's renaming of locomotives causing them to go missing from the options when playing existing maps. As I suspected, the .gmp coding relies on calling the locos by their in-game names rather than by loco id number, so if you change the in-game name then the .gmp will not recognise that loco.
This would be easy to get around if anyone wanted to. All you would need to do is open the .gmp in a hex editor, search for the locomotive's name, and edit it to suit the new name.
Complete express car and caboose packs - Custom double tankers (Alternative F era) - Pennsy H3 Consolidation
Слава Україні! Героям слава!
Слава Україні! Героям слава!
Re: Bmp2gmp dummies guide?
I have no earthly idea where on this planet that map originally came from. Aside from that, I believe I can terraform the terrain in the game a lot easier than using a paint program, but thanks for the tip anyway.Gumboots wrote:Dunno if it will help, but people quite often use Blender to construct 3d terrain models from grayscale height maps.
http://johnflower.org/tutorial/make-mou ... eight-maps
I was just hoping to make it a little easier by using the RT3 map, and the tga has long since been forgotten.
It might be more fun doing it in game anyway.
Hawk