PDA

View Full Version : Question about maps: jpg vs jpg tiles vs fg assets



lousilver
August 16th, 2021, 03:35
Hi,

I've read a few forum threads on map sizes, pixels, etc. I now see that there is theoretically no size limitation to maps (in unity); which is nice, as i had been working off an old post that led me to believe to not exceed 1 MB. But some of my players do have clunkers, so i need to remain mindful.

I'm torn between methods. The first two maps i made i did with fantasy ground assets, building one wall section and floor tile at a time. One is ~110x80 (5ft) hexes, and the other is comparable. It took me forever to build, and edit mode becomes incredibly slow with hundreds of xml entities, so playing with lighting or changing the visibility of a layer for a secret tunnel (there's reasons for that on a "multi level" map) during a game session is not practical. however, locking the picture and it loads like a charm (tested with fake players... but then that's still just my own computer, hopefully ok with remote players). Meanwhile building maps using something like campaign cartographer is several magnitudes faster, comparable graphics with minimal effort (no point in using sheet effects with FG lighting now), but... file sizes are crazy. A mere 20x20 hex map is several megabytes at 50pixel hexes. I've been using windows paint to adjust file sizes, and adjusting hex sizes appropriately, but image quality takes a hit. however going to edit mode, for me, to play with lighting with jpgs is super faster compared to FG asset maps. I read one user who claimed that somehow breaking a jpg map into "tiles" and then recombining in FG picture edit greatly improves load times, but i'm not entirely clear on their process (isn't it still just the same total bandwidth/memory?)

So in 2021, what is the best practice for implementing larger maps (e.g. 100x100 hexes)?

LordEntrails
August 16th, 2021, 05:03
FGU is still having significant feature and performance improvements made regularly, so I don't think we know yet. Paint is probably not the best tool to optimize image size, there are various online tools I've used on occasion, but I just google them so can't recommend any.

Knowing what I do about graphics and computer performance though, there isn't going to be a simple answer, or one that always works. Here is some info for you to consider;
- A single large image (jpg/png/gif) file is going to be easy to calculate the memory and performance impacts. Though you can do various things to control file size (for transfer performance), the number of pixels and color depth are going to control the memory usage. Not much you can do about that, and it's going to in general be moderately large/poor.
- Using tiles in FGU is going to cut down on file size transfer (since if you use the same tile 10 times it only transfers once). Not sure if FGU is able to reduce memory usage by re-using the same element again and again (I doubt it).
- FX created in FGU, nothing you can do there except limit the number of occluder points and effects and fx mask points. More points and effects, the more FGU has to calculate.

In short, its all going to depend. If you use 1 tile ten times and add no effects, then that will be faster than one image of the same number of resulting pixels. But if you use tiles that are all unique and higher resolution than that of a single image, you will have poorer performance. I suspect LOS and effects will affect both types of maps the same.

jwatmough
August 16th, 2021, 20:49
What we have here is really a two-fold question: firstly, the image records tax on the systems, and secondly, how well it will be delivered from the host to all connected clients. There are many factors to consider outside of FGU, such as internet connections and speeds, the computer systems on both ends, and so on. That said, it is very dependant on the map or image in question for which would be the best way to approach its creation. To demonstrate this, we will walk through the theoretical creation of a dungeon map of 100x100 grid squares in a few different ways and discuss the pros and cons of each method (I will also assume for ease of math that the images are at 100 PPI and 5 players). However, the baseline constant between all methods is that the host's image/images and metadata are sent to each client but only once per image used. If an image is used multiple times in a map, it will not be sent multiple times but only once. That means it must be understood that the amount of relative information for each image "record" when shared should be multiplied by the number of players connected (this will become more relevant as we progress).

Outside image imported into FGU:
A single JPEG image of 10000 x 10000 with an average amount of compression would be estimated at the 70ish MB file size. This, of course, could be altered to a lower amount at the loss of image quality.
With 5 players connected, we would have an upload of 70 * 5 from the Host or 350 MBs.

Image created inside FGU with tiles:
Let's now look at creating the same size maps with tiles that are 10x10 grid squares and weigh in at 700kb. This will require 100 tiles to fill the space, and if 100 unique tiles are used will be in the same ballpark as a single large image. This is probably not the case, though, as many hallways and other elements will be used several times. Let's estimate that we use 30 different tiles to make this map which means we are now looking at about 20.5 MB in image resources sent to each player for a total of 102.5 MBs uploaded total.

Image created inside FGU with paint tools:
Painting is where we can truly maximize this system. We can use a single background image that is 25x25 and is 4.5 MBs. Placing it 16 times to fill the area. We then paint out all of our walls with a single wall brush which is 800 KBs. We have a completely functional map under 6 MBs that is 100 x 100 and has no loss in image quality.

Zacchaeus
August 16th, 2021, 21:29
I'd listen to what Josh says above.

Additionally you can export your maps as jpg or png files from Campaign Cartographer.

Go to Save As and then select jpg or png from the drop down and then click on options. Multiple the width and height of your map by 50 or 100 and add that into the width and height fields (I draw all my maps using a 5ft grid and multiple by 100 and I usually only draw smallish maps of about 120x80 ft.). Set antialias at about 50, select crop to aspect ratio and restrict to map border and then select the quality of the jpeg to 75% (or less). Then click ok.

lousilver
August 17th, 2021, 00:23
Additionally you can export your maps as jpg or png files from Campaign Cartographer.

Go to Save As and then select jpg or png from the drop down and then click on options. Multiple the width and height of your map by 50 or 100 and add that into the width and height fields (I draw all my maps using a 5ft grid and multiple by 100 and I usually only draw smallish maps of about 120x80 ft.). Set antialias at about 50, select crop to aspect ratio and restrict to map border and then select the quality of the jpeg to 75% (or less). Then click ok.

Yes my current approach is campaign cartographer. I'm multiplying by 50 for 5 feet. However, some of my maps are ~500x400 feet. The players may move around even those maps a bit, so breaking it into different images isn't practical when fog-of-war is reset. I was briefly excited when you said your maps were 120x80, but but then i saw the dimensions (feet vs hexes/grid), as that would mean in your experience the larger maps are manageable for transfer.

lousilver
August 17th, 2021, 00:29
Image created inside FGU with paint tools:
Painting is where we can truly maximize this system. We can use a single background image that is 25x25 and is 4.5 MBs. Placing it 16 times to fill the area. We then paint out all of our walls with a single wall brush which is 800 KBs. We have a completely functional map under 6 MBs that is 100 x 100 and has no loss in image quality.

i am interested in this approach, but if i understand correctly, isn't that basically the FGU built in approach if you're not building maps wholesale via photoshop or CC3? Painting the walls 5 feet at a time? I don't necessarily mind the labour, but I find edit mode slows down considerably when you have a few hundred wall/floor tiles in it, which would be a problem iff one needs to play with lighting or other settings during a game session. So it seems that map size is either a problem for transfer size (jpg), or edit mode (tiling). Did I summarize correctly?