GMAP and Custom Layers

Post bug reports and ask for game support here.
Post Reply
User avatar
SilentHunter
Posts: 213
Joined: Sun Sep 29, 2013 1:30 pm
Location: United States

GMAP and Custom Layers

Post by SilentHunter »

I'm happy that custom layer are available and I really like the look. I'm having some issues and hope the forum can help me.

I'm using the directions posted in another forum/thread - creating the two files/renaming one to pgw and then loading the png file. It does not always work though, as an example I have created an area with zoom 15 when I try to load the layer I get "Command - Error in the application". I've tried several files of various sizes and various zooms - some load but never display, other load and work, and some give the error mentioned. It seems very sporadic in terms of what is working and what is not.

- Is zoom level 17 required?
- Is there a max size that Command can load?
User avatar
SilentHunter
Posts: 213
Joined: Sun Sep 29, 2013 1:30 pm
Location: United States

RE: GMAP and Custom Layers

Post by SilentHunter »

Another example I create two files of the same area, one at zoom 11 and the other at zoom 13. The one at zoom 11 loaded just fine, when I load the one with zoom 13 it says it loaded but never displays in game. Zoomed in zoomed out, moved around but it never loaded or gave any errors.

Is anyone else using custom layers and are you having problems with gmap? Here's an example of what I'm talking about the regions remained at default even though it shows it's loaded.

Image
User avatar
SilentHunter
Posts: 213
Joined: Sun Sep 29, 2013 1:30 pm
Location: United States

RE: GMAP and Custom Layers

Post by SilentHunter »

So next I created static files at 11, 12, and 13 zoom. Layered them and it worked this time, but I can't get Command to accept anything past 13 zoom in this case ... I get the error in the first post above. So I'm left wondering is this a limitation in Command?

Image
Image
Image

mikmykWS
Posts: 7185
Joined: Tue Mar 22, 2005 4:34 pm

RE: GMAP and Custom Layers

Post by mikmykWS »

No we suggest you load zoom level 17 imagery.

Did you give Command a couple moments to load the files correct?

Give it a shot with another source (Google). GMAP is pulling from outside sources so sometimes the imagery has issues.

Mike
User avatar
SilentHunter
Posts: 213
Joined: Sun Sep 29, 2013 1:30 pm
Location: United States

RE: GMAP and Custom Layers

Post by SilentHunter »

ORIGINAL: mikmyk

No we suggest you load zoom level 17 imagery.

Did you give Command a couple moments to load the files correct?

Give it a shot with another source (Google). GMAP is pulling from outside sources so sometimes the imagery has issues.

Mike

Yes Sir I waited several minutes. These custom layers really add a new depth to the game so I'm hopeful more show interest in this area and more attention is given to it. As it right now it's hit and miss for me, not sure about others. I do believe that I'm trying to capture bigger areas than what I've seen other do and believe I'm running in to some kind of limitation in Command and not GMAP. Before we say it's only bigger areas it's not though, sometimes small areas will load and other times no. I'm hopeful once all the priority bugs are worked out either you devs or the community will come up with a better and bigger way for this, I'm sure as we all learn more about it something will come of it.
mikmykWS
Posts: 7185
Joined: Tue Mar 22, 2005 4:34 pm

RE: GMAP and Custom Layers

Post by mikmykWS »

If you can post the files that don't work. I'd like to take a look. I think you need to zip them to post them to the forum.

Mike
User avatar
SilentHunter
Posts: 213
Joined: Sun Sep 29, 2013 1:30 pm
Location: United States

RE: GMAP and Custom Layers

Post by SilentHunter »

ORIGINAL: mikmyk

If you can post the files that don't work. I'd like to take a look. I think you need to zip them to post them to the forum.

Mike

I wish I could even zipped these files are close to 100meg, that would take me days to upload on my connection :(
I said they were big !
brassen
Posts: 4
Joined: Tue Oct 01, 2013 5:53 am

RE: GMAP and Custom Layers

Post by brassen »

It all does work Silenthunter, I have just crunched a 1.23GB gmap capture to ingame. And it loads instantly to boot!

Ensure to Click the [Get Static] button on the right panel of gmap after you select your SMALL sample area. In the new pop up box, tick the make world file box and set zoom to 17. Click the [Generate] button and prepare to wait while gmap does its stuff.

Try working from zoomed right in and work out (Which is the scope of the 17 zoom it appears), rather that out to in.

mattpenfold
Posts: 94
Joined: Sat Jul 01, 2006 7:57 pm

RE: GMAP and Custom Layers

Post by mattpenfold »

I just made a test scenario where I set-up a custom layer for RAF Lossiemouth, and then imported the base using the import/export function. All the facilities line up right where they should on the overlay. I then took great delight sending in 12 paveway Tornados to blow things up.
User avatar
SilentHunter
Posts: 213
Joined: Sun Sep 29, 2013 1:30 pm
Location: United States

RE: GMAP and Custom Layers

Post by SilentHunter »

ORIGINAL: brassen

It all does work Silenthunter, I have just crunched a 1.23GB gmap capture to ingame. And it loads instantly to boot!

Ensure to Click the [Get Static] button on the right panel of gmap after you select your SMALL sample area. In the new pop up box, tick the make world file box and set zoom to 17. Click the [Generate] button and prepare to wait while gmap does its stuff.

Try working from zoomed right in and work out (Which is the scope of the 17 zoom it appears), rather that out to in.

How big was the area though? When you say work zoomed in to out you can't capture much area when zoomed too far in. See post 2 above, that's about the size of the area I'm expecting to use which is the training from the air training mission.
brassen
Posts: 4
Joined: Tue Oct 01, 2013 5:53 am

RE: GMAP and Custom Layers

Post by brassen »

The area I captured was 16km x 16km over the red target area in the first tutorial mission. Scale factor in gmap didnt seem to matter, as long as I used the 17 zoom in the dialog box to create the .png file. gmap crunched all the blocks (all 2700 of them) together to make up a 1.23GB .png file. It took 59minutes for gmap to create the .png. I used a technique which I will post about soon to get that 1.23GB file down to 19MBs and 3MBs with no real loss of fine detail. (Hence the instant load ingame.) For only 3MB of file to cover 16km x 16km, you could stitch a few together and cover a reasonable area.
User avatar
SilentHunter
Posts: 213
Joined: Sun Sep 29, 2013 1:30 pm
Location: United States

RE: GMAP and Custom Layers

Post by SilentHunter »

thanks I was hoping for much larger areas, as pictured above I would like the entire AO and all surrounding areas, though sporadic I've been able to get it at zoom level 13 (which was acceptable) with one gmap worldfile and it's about 700meg. It does take some time for sure, further you can layer on top of that some smaller ones at 15 or 17 zoom. Thanks for the reply
brassen
Posts: 4
Joined: Tue Oct 01, 2013 5:53 am

RE: GMAP and Custom Layers

Post by brassen »

ORIGINAL: SilentHunter

thanks I was hoping for much larger areas, as pictured above I would like the entire AO and all surrounding areas, though sporadic I've been able to get it at zoom level 13 (which was acceptable) with one gmap worldfile and it's about 700meg. It does take some time for sure, further you can layer on top of that some smaller ones at 15 or 17 zoom. Thanks for the reply

I have not tried doing that yet, but recall reading on this forum that the overlays work in layers as they are added to the game. So large area - low res added ingame first followed by the smaller area - high res target areas over the top afterwards. I imagine if you add an alpha layer for transparency to the hires .png's you could blend them in much better than having stark edges.

I will try the level 13 tonight and see what the detail is like and what area I can work with. Once I get my forum account sorted I will post up the details for getting large overlay files down to working sizes. i.e. 700MB > 3 MB.

EDIT:

I've just tried the 13 zoom creating the .png file in gmap. The area I selected was around 20km x 20km on the same location. gmap used only 110 blocks and took about a minute to build the .png. This .png had copyright notices watermarked around the edges of the image. Also when compared to the 17 scale image, the 13 was pixelated at the same zoom level ingame.

Now the important bit. I added the 13 ingame first, However the 13 was OFFSET across and down! So those carefully placed units appeared to be up and to the left. Whether it is a pure offset or a scaling issue, I need to investigate further and will post what I find. Although I would hedge it is an offset due to the copyright watermarking.

With the 13 ingame, I add the 17. It comes in over the top of the 13 and of course those carefully placed units are aligned perfectly to the 17 overlay.


chemkid
Posts: 1238
Joined: Sat Dec 15, 2012 2:02 pm

RE: GMAP and Custom Layers

Post by chemkid »

.
montanaza
Posts: 42
Joined: Sun Jan 06, 2013 6:45 pm

RE: GMAP and Custom Layers

Post by montanaza »

@brassen would really like to hear more about the 100 mb to 3mb technique, sounds great!


ORIGINAL: brassen

The area I captured was 16km x 16km over the red target area in the first tutorial mission. Scale factor in gmap didnt seem to matter, as long as I used the 17 zoom in the dialog box to create the .png file. gmap crunched all the blocks (all 2700 of them) together to make up a 1.23GB .png file. It took 59minutes for gmap to create the .png. I used a technique which I will post about soon to get that 1.23GB file down to 19MBs and 3MBs with no real loss of fine detail. (Hence the instant load ingame.) For only 3MB of file to cover 16km x 16km, you could stitch a few together and cover a reasonable area.
chemkid
Posts: 1238
Joined: Sat Dec 15, 2012 2:02 pm

RE: GMAP and Custom Layers

Post by chemkid »

.
User avatar
SilentHunter
Posts: 213
Joined: Sun Sep 29, 2013 1:30 pm
Location: United States

RE: GMAP and Custom Layers

Post by SilentHunter »

I'll have to try the .jpg trick and see if it helps. I want the entire globe rendered at 17, I have a data warehouse of servers setup to hold the images
brassen
Posts: 4
Joined: Tue Oct 01, 2013 5:53 am

RE: GMAP and Custom Layers

Post by brassen »

The image that you posted chemkid does show an important feature as part of the process. I have the process documented but cant post it till I get my forum account sorted so I will give you guys a quick description. (From memory!) It will be best if you keep the .png file format. The .jpg compression algorithm can cause some poor results. Gmap creates a .png image file and a .pgw text file. You will need to work with both.

You will also need to know how to reduce an image for the process to work.

The dialog box showing the Image size as 8128 x 8128 pixels is where you do the change in that application. Click on the drop down where it indicates Pixels, then select Percent so that the width and height is now at 100 percent. Both values should change as they are linked (as per the line to the right). Now change the 100 to 50 in both width and height and apply the change. You have now shrunk the image by 50% but removed 75% of the binary data so you will lose some image quality. If you were to load it ingame it will appear at 50%.

You now need to edit the .pgw text file to compensate for this. In a simple text editor such as notepad, open up the .pgw text file and you should see 6 sets of figures. Note the first and fourth values. Use a calculator and multiply those numbers by 2. These are scale factors for the .png image. What we reduce in image we enlarge with the scale factor by the same amount (with some image quality loss.)

For the 1.23GB file I repeated this process 4 times to get the 3mb file. Zooming right in ingame it only just started to pixelate. This was for a 17 zoom file with about 2700 block. I haven't confirmed a 2700 block 13 zoom file yet but again you should end up with a 3MB file anyway.

I found the values for the offsets to move the 13 file into alignment and will post them when I get home from work. (Something like 0.0031 and 0.0027) that you need to add to the fifth and sixth values in the .pgw file. I believe this is latitude dependant so it will probably be different for other regions of the world.

The .pgw is

Scale factor Lat?
Top left hand corner Lat?
Top left hand corner Long?
Scale factor Long?
Bottom right hand corner Actual longitude.
Bottom right hand corner Actual latitude.

I hope you guys can get some good results.

EDIT:

It was 7209 tiles for the 17 zoom 1.23GB file. To offset the 13 zoom map to blend in I needed to increase the value of the fifth and sixth by 0.0037 and 0.0029 in the .pgw for this map.



chemkid
Posts: 1238
Joined: Sat Dec 15, 2012 2:02 pm

RE: GMAP and Custom Layers

Post by chemkid »

.
User avatar
brassem
Posts: 72
Joined: Wed Oct 02, 2013 3:38 am
Location: NE of YMML

RE: GMAP and Custom Layers

Post by brassem »

let us know if you have any issues. This is all a learning process.

I've got my account sorted thanks to Paulo so I will use the weekend to upload this in detail.

i7-3930K@3.2Ghz&H100liquid|ASUSP9X79Deluxe>X680/OC|32GBGSkillPC2400|2TBRaid0|Antec1200&1200WTruePower|ASUSGV278H-3D|SBX-FiT-Pro|TurtlebeachDPX21|Win7-64U
Post Reply

Return to “Tech Support”