1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

On Prettiful, Nondistorted Flags (60 tall by 90 wide!)

Discussion in 'Civ4 - Modding Tutorials & Reference' started by Raize, Dec 27, 2005.

  1. Raize

    Raize Warlord

    Joined:
    Oct 26, 2005
    Messages:
    162
    The ideal image size for no distortion is 60 tall by 60 wide (pre-widening) and 60 tall by 90 wide (post-widening).

    The way I found out:
    - testflag.bmp is a square flag with a border every 4 pixels, starting at 84.
    - placed within-game (flagScreenie.jpg), you can see that the largest size that there is no distortion at slightly past the edge of the inner black border at 88 pixels.
    - also, (flagOverlay.jpg), the height seems to be mostly left alone while the width is shrunken to approximately 65% (from 88 pixels wide in testflag.bmp to 58 pixels wide in flagOverlay.jpg); this corresponds to taking a 58 pixel-wide image and multiplying it by ~1.5. (Note: I did the comparison via Photoshop with the image at 300% zoom.)

    This leads me to believe that a flag's image is ideally 60 tall by 60 wide, then the width is expanded by 1.5, so that the image is 60 tall by 90 wide.

    Since the flag images all must be 128 by 128, this means that the remaining 68 height-wise pixels and the remaining 38 width-wise pixels are meant to be border and trim (or at least distortable).

    I'm using even numbers 60 and 90 because 58 by 88 seems too arbitrary and is within the margin of error.


    I hope someone else finds this info useful.
     

    Attached Files:

  2. Raize

    Raize Warlord

    Joined:
    Oct 26, 2005
    Messages:
    162
    Addendum: After some messing around, it seems that 60 by 90 still generates some very slight distortions. 59 by 89 seems to do the trick.

    DC_raw.jpg is the original flag I used (undistorted).
    dc1.jpg is the game screenie w/ the flag resized so that the main circle is 60 by 90.
    dc2.jpg is the game screenie w/ the flag resized so that the main circle is 59 by 89.

    Of course, the difference is so miniscule that I might just be seeing things.
     

    Attached Files:

  3. Tyranausaurus

    Tyranausaurus Warlord

    Joined:
    Dec 26, 2005
    Messages:
    163
    Wow! Thanks, this will help me in my World Flags Project, I've tried double your values and I got even better results. One question however, will this affect the loading times? Anyhow, thanks for the info!
     
  4. Raize

    Raize Warlord

    Joined:
    Oct 26, 2005
    Messages:
    162
    I don't believe this will affect loading times.

    The sizes I suggest using are for the actual image dimensions, before you increment the canvas to the expected flag frame size (128 by 128).

    The DXT3 textures that Civ4 uses for the flags seem to all be about 21KB, no matter what the frame looks like, so it shouldn't affect loading times one way or another.

    For world flags I think you can just get away with 128 tall by (however many up to 128) wide images, since most of them are borderless and can stretch or skew and still look natural. The study here was an attempt to find a size where I could insert a specific emblem or logo without it getting all stretched out-of-whack.
     
  5. Tyranausaurus

    Tyranausaurus Warlord

    Joined:
    Dec 26, 2005
    Messages:
    163
    Raize,
    I'm making flags and converting them to DDS to get a 489 kb file, I'm not sure but do you think that would make the flag clearer? I'm asking for flags that contain writing or a logo.
     
  6. Raize

    Raize Warlord

    Joined:
    Oct 26, 2005
    Messages:
    162
    Actually I'm not sure I understand your question...
     
  7. Master_Pvic

    Master_Pvic Chieftain

    Joined:
    Apr 10, 2005
    Messages:
    15
    Location:
    Chandler, Arizona
    were do you put flags?
     

Share This Page