Results 1 to 7 of 7

Thread: What's the best method for resizing map files?

  1. #1

    Default What's the best method for resizing map files?

    My question is this. What's the best way to resize your map files so everything matches as it should?

    For example, when building my map_heights.tga from my map_regions.tga, how do you suggest I resize the map_regions.tga so that I can (correctly) build new coastlines and such onto the new map_heights file I'm creating?

    I'm using Photoshop CS2 to do this. The method I currently use is, for example, I take my 510x300 map_regions.tga and resize that image to 1021x601 (to make my map_heights.tga file) using the Image > Image Size function in Photoshop. My settings are in pixels, with Constrain Proportions checked and Resample Image set to Nearest Neighbor.

    Any and all help would be greatly appreciated. If I need to better clarify my question, let me know.

    I've just got a campaign map I've been working on and while I'm 99.999% sure all my text files are correct, I'm still getting CTD's and crashing back to the main menu screen.
    Last edited by Bella; April 20, 2007 at 12:11 AM.
    /* Under the Patronage of the Honorable Garbarsardar */
    Graphic Designer, Husband, & Dad

  2. #2

    Default Re: What's the best method for resizing map files?

    Usually for me, if I try to start a campaign and it returns to the main screen, there is an error in one of the text files. Most often it will be a misspelled name, unit creation problem or something similar. Check your error log and it should give a hint.

    As far as resizing the maps, I have found that going from small to large results in coastlines that look blocky. I like to make my heights map first and resize a version of that down in order to make the regions map. It works ok for me, and I'm still using Photoshop 4 that I bought almost 10 years ago as a student (I'm too cheap to upgrade).
    Last edited by Gundug; April 20, 2007 at 07:01 AM.

  3. #3

    Default Re: What's the best method for resizing map files?

    Hmm. I haven't tried going from large to small yet in my map file making. Thanks man. I"ll give that a shot tonight.

    As for the text files maybe having an error in them, I'm not sure because when I'm spit out to the desktop or the main menu (mostly to the main menu), I don't get any error or errors in my log file. Perhaps I'm using the wrong log code line in my .cfg? This is the one I use:

    Code:
    [log]
    to = logs/system.log.txt level = * trace level = * error
    /* Under the Patronage of the Honorable Garbarsardar */
    Graphic Designer, Husband, & Dad

  4. #4

    Default Re: What's the best method for resizing map files?

    This is the error "finder" I use, Bella:

    [log]
    to = logs/system.log.txt
    level = * error

    I, too, have always resized my regions to fit my heights, but I'm currently testing it. Good luck!
    Goatbuster3000

  5. #5

    Default Re: What's the best method for resizing map files?

    Thanks to both of you

    Well, I 'did' find out there was a small misspelling in one of my text files, so I cleared that up. But now I'm getting the dreaded unspecified error with no explanation as to its cause.

    Code:
    15:15:34.310 [system.rpt] [always] CPU: SSE2
    15:15:34.310 [system.rpt] [always] ==== system log start, build date: Mar 30 2007 version bld-medieval2-update2-80 (36762) ===
    15:15:34.326 [system.io] [always] mounted pack packs/data_0.pack
    15:15:34.326 [system.io] [always] mounted pack packs/data_1.pack
    15:15:34.326 [system.io] [always] mounted pack packs/data_2.pack
    15:15:34.326 [system.io] [always] mounted pack packs/data_3.pack
    15:15:34.326 [system.io] [always] mounted pack packs/data_4.pack
    15:15:34.326 [system.io] [always] mounted pack packs/localized.pack
    15:15:57.229 [system.rpt] [error] Medieval 2: Total War encountered an unspecified error and will now exit.
    /* Under the Patronage of the Honorable Garbarsardar */
    Graphic Designer, Husband, & Dad

  6. #6
    Muizer's Avatar member 3519
    Patrician Artifex

    Join Date
    Apr 2005
    Location
    Netherlands
    Posts
    11,115

    Default Re: What's the best method for resizing map files?

    Quote Originally Posted by Bella View Post
    I'm using Photoshop CS2 to do this. The method I currently use is, for example, I take my 510x300 map_regions.tga and resize that image to 1021x601 (to make my map_heights.tga file) using the Image > Image Size function in Photoshop. My settings are in pixels, with Constrain Proportions checked and Resample Image set to Nearest Neighbor.

    I don't think matching the region map coast to the height coastline is critical. Anyway, fwiw to understand how the small maps (regions, features) relate to the big ones (heights, ground types):
    - The real world size of the region pixels is exactly twice that of the height and ground types pixel.
    - the fact that heightmapdimension= 2*regionsmapdimension+1 is caused by the fact that when you overlay the regions on the height map, the former will stick out on all sides by half a height map pixel.



    So ideally, no. You shouldn't use nearest neighbour resampling to establish the coastline (or the position of rivers btw).

    You could try this:
    - convert your regions map to greyscale 0 (land) and 100(sea)
    - resize the image by a factor 4
    - add a rim of one pixel around the whole pic
    - resize back to height map dimension. Don't use nearest neighbour, but averageing out.
    - In the resulting image, the greyscale value is the percentage of the tile that is "sea" on the regions map.


    I'd make sure that any height pixel that has any "sea" on it on the regions map is also "sea" on the height map.

    Note: Personally I go about it in the opposite manner, generating region map coastlines from the height map. The height map has the higher resolution and especially if you use existing digital terrain models, you preserve more geographical detail taking heights or ground_types as the starting point.
    Last edited by Muizer; April 21, 2007 at 03:58 AM.
    "Lay these words to heart, Lucilius, that you may scorn the pleasure which comes from the applause of the majority. Many men praise you; but have you any reason for being pleased with yourself, if you are a person whom the many can understand?" - Lucius Annaeus Seneca -

  7. #7
    wilddog's Avatar Paintedwolves run free
    Join Date
    Jan 2005
    Location
    UK
    Posts
    2,337

    Default Re: What's the best method for resizing map files?

    Just to confirm what Muizer said. I find it always best to start from the map_Heights and resize donwards to get to map_regions.

    Before resizing down set the hights all to one colour and the see to another and then resize down using nearest neighbour. That will give a true map_regions size with the land all in the right places which you can then fill in with your regions.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •