Hex Map Larger and a Different File Format?

2»

Comments

  • MonsenMonsen Administrator 🖼️ 81 images Cartographer
    edited January 2018
    Sure.

    - Close down all instances of CC3+
    - First, install a 64-bit version of ImageMagick on your computer. During installation, make sure to enable the checkbox to install legacy utilities.
    - Then, copy the entire contents of your imagemagick installation directory into c:\program files (x86)\ProFantasy\CC3Plus\ImageMagick (you may wish to take a backup of this directory first in case you wish to restore things without reinstalling CC3+)
    - Now, in your CC3+ data directory, edit the CC3Pluscfg.xml (remember this is an xml file, and it is very sensitive to mistakes. Don't make any)
    - Add the lines in red to this file. The lines in black are there already and are just there to help you position the lines in the file. This will remove the memory limits imposed on ImageMagick (and should only be done on a 64-bit version of it). Without memory limits, the export goes much faster.
    - You can also add the line in blue. This disables the Bartlett filter when processing the image, and sacrifices a bit of quality for a bit of speed. You can also use another filter of your choosing by typing -filter FILTERNAME in between the tags, but I don't have a list of these handy.

    <Software>
    <EvolutionComputing>
    <CampaignCartographer3Plus>
    <ImageMagickCmdLine>
    <memory></memory>
    <filter></filter>
    </ImageMagickCmdLine>
    <XP>
  • Wow, that was a big speedup for me. 10000x10000 exported in about 15 seconds.

    Thanks!!!
  • And how is the quality after that fast export?
  • for me I couldn't tell any difference in quality. I didn't change the filter, just changed to the 64 bit version without the memory limit. I did some further testing and did a 20000x20000 in just under 2 minutes.
  • MonsenMonsen Administrator 🖼️ 81 images Cartographer
    Did you use the Q8 or Q16 version of ImageMagick? I've been using the recommended Q16 version myself, but I dug a bit into it today, and it seems like the Q8 version is a fair bit faster, and the colorspace used in CC3+ exports is only 8 bit per pixel component anyway, so that isn't a problem.
  • I used the Q16 version.

    For the install, does it only use the convert.exe? I was wondering if the portable version download could work as well, just taking the convert.exe from that download.
  • MonsenMonsen Administrator 🖼️ 81 images Cartographer
    edited January 2018
    Depends. If you grab a static build, you only need to copy this file, but for a dynamic build, you would need convert.exe and all the .dlls.
    I noticed that there wasn't a portable Q8 version, so I'll just probably going to grab the installer for the static version, install it, and then just extract convert.exe
  • The I believe the portable one is static and doesn't touch the registry. I tried moving the convert.exe into an empty directory and it runs fine.
  • edited January 2018
    I just tried the Q8 static installer and it didnt give the option to produce the legacy utilities
  • MonsenMonsen Administrator 🖼️ 81 images Cartographer
    How boring. I see the dynamic installer does, but that means you need to copy all the .dll's too. The final file size should still be about the same though, just a couple more files to handle. I haven't done testing myself though, so I don't know if it is really worth the bother or not.
  • MonsenMonsen Administrator 🖼️ 81 images Cartographer
    So, I got curious about the performance of the different options here, so I did a more thorough test. What I did was test four different ImageMagic configurations (64-bit Q8 version, 64-bit Q16 version, 32-bit Q16 version (the one that ships with CC3+) using default memory limits, and the 32-bit Q16-version without memory limits. All tests were repeated multiple times to get the most accurate results, and using precision measuring tools.
    The test I gave it was identical to what CC3+ has it do, that is, take a .bmp image, reduce it (to provide antialiasing) and convert it to .png, using the exact same command line CC3+ itself uses. Do note that this is only a test of the ImageMagic part of the export process, the part which happens after CC3+ is done doing the passes and rendering each sheet, the part that happens after the 'Converting to final format' message appears in the export dialog.
    The image I used was a 10908x11111 bmp that was converted to a 9817x10000 png. I did not touch the filter option, so the quality of all these are exactly the same (Do note however that the quality difference by using a difference filter is not huge, it will be barely visible, if visible at all, but for this test, I stuck with the high quality filter used by CC3+ by default)

    Now, when you look at the results below, you may wonder why the version used by CC3+ is so slow, when it could be so much faster. The answer to that is two important facts
    - CC3+ is 32-bit, so it ships with a 32-bit version of ImageMagick. This makes sense, because the shipped ImageMagick must be able to run on the same computers that CC3+ itself runs, can't have some customers not being able to export files.
    - Without memory limits, ImageMagick fails on some images, and this is dependent on the complexity of the image, and not purely the pixel size. While speed is nice, in the end, it is more important that the export is always successful. ImageMagick (normally) prints progress to the export dialog, so even if it is a bit slow, it is normally quite clear that it is chugging along.

    So, here are the results
    VersionAverage time (seconds)Comments
    Q8 x6420.6364-bit version. The Q8 version only handles 8 bits per color component in the image, but png, bmp and jpg all use this, so this is NOT an issue when used with exporting maps from CC3.
    Q16 x6429.2964-bit version
    Q16 x86337.4832-bit version. This is the version that ships with CC3+, but with memory limits turned off in the config. While turning off memory limits speeds up processing, it also means that every now and then CC3+ will produce an export that cannot be handled correctly, causing ImageMagick to run out of memory, and thus the export to fail.
    Q16 x86 (With memory limits)659.15This is the default configuration shipped by CC3+. The memory limits slows down processing, but ensures that ImageMagick never runs out of memory and fails the export
  • This is interesting but I do have to say that when I tried to export a very large image a few times the export dialog did not move for two hours. Not so much as one number so I was unsure of what was going on. The next thing I knew it was done. The image size was 8000x8000. I was surprised to see that the export dialog was doing nothing but everything was still happening in the background.
  • Blackadder23Blackadder23 Traveler
    edited January 2018
    I installed the Q16 X64 version, and it seemed to eliminate all the extra time that Image Magick was adding to my exports. Quality was unchanged (although I didn't mess with the filter). I'm satisfied with this resolution of the issue, so thanks again.

    One question: will I need to edit the CC3Pluscfg.xml again every time I run an update, or will the changes remain in place?
  • MonsenMonsen Administrator 🖼️ 81 images Cartographer
    Normally not. That file contains all your user configuration, so unless there is a particularly good reason, that file shouldn't be overwritten by an update.
  • MonsenMonsen Administrator 🖼️ 81 images Cartographer
    Posted By: TonnichiwaThis is interesting but I do have to say that when I tried to export a very large image a few times the export dialog did not move for two hours.
    I don't know why, but there seem to be situations where ImageMagick doesn't report it's progress to the export dialog. I've never known this process to hang though, so it is usually just a matter of waiting. If it crashes, that also terminates the export dialog immediately.
  • Even though ImageMagick is working much faster since I applied the fix suggested in the thread, it still isn't reporting any progress beyond the first message. Just FYI.
  • 5 months later
  • Mateus090985Mateus090985 Traveler
    edited July 2018
    I did it. It took me +- 25min to render a 8000x6400 map with 50% antia. Just a question. It is to still apperas this mensagem in the end of the process or I Did something wrong?

    My Cfg
  • jslaytonjslayton Moderator, ProFantasy Mapmaker
    edited July 2018
    That message is the command line passed to ImageMagick for debugging purposes. It is completely normal to see this message.
  • MonsenMonsen Administrator 🖼️ 81 images Cartographer
    The message should appear, but the two memory limit parameters at the beginning should not after you made that change. Did you restart CC3+ after editing the file? (And made sure not to have CC3+ running when editing it, it writes out the file on shutdown, potentially overwriting your changes if it was open during editing)
  • Posted By: MonsenThe message should appear, but the two memory limit parameters at the beginning should not after you made that change. Did you restart CC3+ after editing the file? (And made sure not to have CC3+ running when editing it, it writes out the file on shutdown, potentially overwriting your changes if it was open during editing)
    I will check it again.
  • LoopysueLoopysue ProFantasy 🖼️ 40 images Cartographer
    Remy? Does doing the EXPORTSETMPPP still help if you do the Imagemagic thing?
  • MonsenMonsen Administrator 🖼️ 81 images Cartographer
    Those are two completely separate things. Changing max pixels per pass can speed the rendering phase of the process, while messing with imagemagick can speed the conversion phase. I always do both.
  • Ok. It seens that is not working here. Can I redo the steps or if I messed something in the process I have to (dont know) reinstall CC to do it again?
  • MonsenMonsen Administrator 🖼️ 81 images Cartographer
    Not sure. The changes to the file looks ok. You are sure that is the actual file CC3+ uses (CC3PlusCfg.xml)? You haven't accidentally saved your changes as a copy to CC3PlusCfg.txt or CC3PlusCfg.xml.txt or something?


    One way you can see if CC3+ actually used that file is to look at the <memory></memory> part. When CC3+ rewrites it at each exit, it uses the short form instead (<memory/>). So if you edit the file, using the long form as shown in both my post and your screenshot, then start CC3+ and close it again, and then reopen the config file, you should find that the long form you used was replaced the short form. If this didn't happen, then you are not editing the actul file CC3+ used (either editing a backup copy, or saved it under the wrong name, or similar)
  • Is normal to have a backup file here?
  • MonsenMonsen Administrator 🖼️ 81 images Cartographer
    Yes. I don't know exactly when it gets created, but I usually have a backup file too. It can be useful if the main file gets messed up somehow.
Sign In or Register to comment.