• 📚 A new project from the admin: Check out PictureBooks.io, an AI storyteller that lets you create personalized picture books for kids in seconds. Give it a try and let me know what you think!

Help Request: Create a high resolution image of the map

Leoreth

KEL
Retired Moderator
Joined
Aug 23, 2009
Messages
38,611
Location
Faraway Town
I have another request where you could help me out if you have the time and necessary skills.

I thought it would be cool to have one large, high resolution image of the world map. The idea is to take a series of screenshots in game covering all areas of the map (similar to the ones I have shared here) and then stitch it together with some editing software. The second step is probably time consuming, and I won't have time for it myself, but in case someone wants to take the time it would be very much appreciated. Having one large image for people to take a look at the map in detail would be very useful in the future.

Here's my guide on how to take the screenshots:
  • Edit Assets/XML/CIV4DetailManager.xml: find the DF_SKY key and change all 1.0 values under it to 0.0. This disables the cloud texture from showing up on higher zoom levels.
  • Open the 3000 BC scenario as e.g. Egypt
  • Toggle "Bare Map" to hide cities and units
  • Zoom out far enough that there is no tilt to the camera and its axis is directly perpendicular with the ground. Be careful not to zoom out too far, at some point the game blurs the textures instead. I could find exactly one zoom level where the camera is straight down but the textures are still high resolution.
  • Take a screenshot using the in game screenshot functionality by pressing the PrntScrn button
Here's an example screenshot I took with this approach:
Spoiler :
Civ4ScreenShot0673.JPG


All that is left to do is take sufficient screenshots to cover the entire world map and then stitch them together. Perhaps there are tools out there that help doing so automatically, but I don't know anything that I could recommend.

Thanks!
 
Last edited:
Good to know, thanks for taking this on! It looks great already, take your time.
 
And here it is:

There were a couple of artifacts I couldn't remove, but they're not too noticeable.

If anyone wants to reproduce the method:
1) CTRL+Z to reveal the map, CTRL+B to hide units, ALT+I to hide the interface,
2) I placed units every 4 tiles vertically (X2, X6...) and 3 tiles horizontally (Y1, Y4...). I went with Satellites since I wasn't sure if land units standing on peaks would affect the camera. ENTER to cycle through units north to south, FN+PRINT SCREEN for screenshot. I recommend doing it one column at a time since cycling through units gets funky with multiple columns. Some resources like Whale can be a bit annoying since they move.
3) Every time a column is completed, move it to a separate folder (I went Columns/001, Columns/002, etc) to make it easier to correct potential errors. Be sure to check if the screenshots go 00 to 19.
4) Run this code:
Python:
import os
from PIL import Image

path = "[your folder]"

#dimensions for cropping
target_width = 156
target_height = 206

columns = [folder for folder in os.listdir(path+"Columns")]
n_x = len(columns)
extra = 50 #do not crop as much the first screenshot in a column, to get the north border

result = Image.new("RGB", (target_width*n_x, (target_height*n_y)+extra))

for index_c, column in enumerate(columns):
    files = [file for file in os.listdir(path+"Columns/"+column) if file.endswith('.JPG')]
    n_y = len(files)
    for index_f, file in enumerate(files):
        path1 = os.path.expanduser(path+"Columns/"+column+"/"+file)
        img = Image.open(path1)
        left = (img.width-target_width)/2
        top = (img.height-target_height)/2
        right = left+target_width
        bottom = top+target_height
        if index_f == 0: #northern border
            top -= extra
            img = img.crop((left, top, right, bottom))
            x = index_c * target_width
            y = index_f * target_height
            w, h = img.size
            result.paste(img, (x, y, x + w, y + h))
        else:
            img = img.crop((left, top, right, bottom))
            x = index_c * target_width
            y = (index_f * target_height) + extra
            w, h = img.size
            result.paste(img, (x, y, x + w, y + h))
result.save(path+"result.JPG")
 
Really impressive outcome, and much faster than what I could have done. I like your systematic approach of taking the screenshots.

Just out of curiosity, did CFC downsample the image resolution? Would it make sense to host it somewhere else?

I also wonder if it was possible to create semi-transparent overlays for stability etc. maps in the same dimensions of this image to create some version of Rhye's atlas.
 
Really impressive outcome, and much faster than what I could have done. I like your systematic approach of taking the screenshots.

Just out of curiosity, did CFC downsample the image resolution? Would it make sense to host it somewhere else?

I also wonder if it was possible to create semi-transparent overlays for stability etc. maps in the same dimensions of this image to create some version of Rhye's atlas.

Yeah, once I realized that you would have to crop the screenshots pretty small to avoid the distortion that occurs at the edge of the screen, I decided there was no way I was doing this purely manually. Unit cycling is important too because moving with the mouse or arrows is too jerky.

The file is the same size on my end, and my original screenshots seem to have similar resolution. Changing the graphic settings from medium to high doesn't seem noticeable at that height either.
 
Back
Top Bottom