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

Looking for guidance - 2D Graphics/GIMP

Discussion in 'Civ5 - Creation & Customization' started by SamBC, Oct 3, 2010.

  1. SamBC

    SamBC Emperor

    Joined:
    Feb 2, 2010
    Messages:
    1,052
    Location:
    Lancaster
    Hi all, just looking for some guidance to get past some extreme frustration...

    I've successfully written a mod that adds a new strategic resource. It doesn't get scattered on the map yet, but that's a separate problem. The real problem is giving it icons.

    I've read Kael's guide, and tried to reason from it to using GIMP, but I've had no success. I use the template files that come with the SDK, add my graphic to the relevant bit of the low 'all-black' layer, and export as a DDS. This even seems to be correctly referenced in the game. However, the image that end up in the game is a big black block with a white circle, rather than the areas that are black in the top layer being transparent and the areas that are white in the top layer being the bottom layer.

    I've tried tweaking layer modes, adding and applying masks, and so on, in the GIMP, even such that the GIMP view of the file shows an image that's what I'd expect it to end up as in the game (within the circles are the image I supply, outside are transparent). I end up either with a big black block, or a big black block with a white circle in.

    Has anyone done this with the GIMP (using the usual DDS export), and if so, can they give me any guidance? If not, can someone who knows about this sort of stuff try and figure it out for/with me?
     
  2. SamBC

    SamBC Emperor

    Joined:
    Feb 2, 2010
    Messages:
    1,052
    Location:
    Lancaster
    Just to note, as something that people who have successfully produced any such graphics for CivV can help with whatever the software they've used is, what format is the working DDS file output as, how many layers does it have, in what order, and what is in each layer? When I try to do it assuming nothing aside from what's in Kael's guide, I'm not sure what format I end up with (the default for the GIMP DDS plugin), I have two layers, a 'layer1' on top with the white circles on black field and a 'background' layer underneath with my graphics in.

    If anyone can tell me what's wrong with that, that might be something that helps me figure it out myself.
     
  3. StittsvilleJame

    StittsvilleJame Warlord

    Joined:
    Apr 1, 2010
    Messages:
    252
    Location:
    Ottawa
    I used GIMP to add icons for a custom civ, and it seemd to work ok for me.
    I didn't put them in the background layer, but in the layer with the white circles.

    Then I merged the background with the circle layer, and my icon shows up in the game where it should. The only problem I have is my circle icon is surrounded by a black square which covers up part of the heading etc in the civilopedia entry.

    I thought the template meant that it would only use what was inside the white circle, and nothing else? :confused:

    I'm lost. Gotta say though, GIMP is a super cool program, I can't believe it's free! Gotta love open source. :)
     
  4. SamBC

    SamBC Emperor

    Joined:
    Feb 2, 2010
    Messages:
    1,052
    Location:
    Lancaster
    Nice to know that other people are having confusion...

    Karl's guide suggests that the game uses the top layer, somehow, to know which pixels are picked from the bottom layer. I suspect that it's actually PaintShop that does this, and that one has to find another way to do it with the GIMP, manually, as I've looked at his files from "Queen of the Iceni" and the final .dds files are single layer with transparency... looking at what the file format is, I can't seem to get GIMP to tell me what the pixel format is (it clearly has transparency), nor the compression. Anyone know how to get these details out of a .dds with purely free (at least as in beer) software?
     
  5. SamBC

    SamBC Emperor

    Joined:
    Feb 2, 2010
    Messages:
    1,052
    Location:
    Lancaster
    Well, those details aside, I now seem to have sorted this out. I figured out exactly what to do to the .psd files inside the GIMP to get a template that produces results like Kael's.

    As a summary, you need to replace the background with a white wash, then add a layer mask to the background layer, with the mask copied from the foreground layer. Then remove the foreground layer. You can add graphics to the background layer itself, and adjust the mask by editing the mask itself. If you then export to a DDS, it will apply the mask and produce a working file that behaves as expected (according to my test so far).

    I have converted the provided icon atlas templates in this way myself, and I have a zip file I can upload to help other people in the same boat. Are there instructions somewhere here on how to upload thus?
     
  6. StittsvilleJame

    StittsvilleJame Warlord

    Joined:
    Apr 1, 2010
    Messages:
    252
    Location:
    Ottawa
    Thank you!

    Got it working. The only thing I had to do to alter your instructions was to create the mask from the alpha channel.

    Let me know when you figure out how to make 3d leaderheads. :)
     
  7. SamBC

    SamBC Emperor

    Joined:
    Feb 2, 2010
    Messages:
    1,052
    Location:
    Lancaster
    In case anyone's interested, I have uploaded the fixed-up GIMPified templates and they're queueing for moderation. I believe the link is here in the file DB.

    Edit: FileDB entry still awaiting moderation... avialable at MediaFire as a substitute...
     
  8. salaminizer

    salaminizer Colorado Internacional

    Joined:
    Aug 12, 2006
    Messages:
    221
    Location:
    Porto Alegre, Brasil
    thanks for the tips about the mask thing and the template (it was still in the queue when I was working on it so I didn't use it), I was having trouble with it too. :goodjob:

    now to find out the reasons for the other problems...
     
  9. SamBC

    SamBC Emperor

    Joined:
    Feb 2, 2010
    Messages:
    1,052
    Location:
    Lancaster
    Which other problems? Of course, if they're not related to this, maybe a new thread would be more sensible...
     
  10. salaminizer

    salaminizer Colorado Internacional

    Joined:
    Aug 12, 2006
    Messages:
    221
    Location:
    Porto Alegre, Brasil
    yeah, it would belong to a new thread. I'm just ranting, I didn't think that I would have so much trouble adding a new civ even following the guide:p
     
  11. Kyoss

    Kyoss Chieftain

    Joined:
    Jun 21, 2008
    Messages:
    50
    Location:
    Germany
    Wow thanks.. will try that tomorrow
     
  12. SamBC

    SamBC Emperor

    Joined:
    Feb 2, 2010
    Messages:
    1,052
    Location:
    Lancaster
    My templates are apparently still in the moderation queue, but they'll hopefully be passed sometime... and then they can be useful to someone other than me.
     
  13. SamBC

    SamBC Emperor

    Joined:
    Feb 2, 2010
    Messages:
    1,052
    Location:
    Lancaster
    How long do things tend to stay in the moderation queue, anyway?
     
  14. Kyoss

    Kyoss Chieftain

    Joined:
    Jun 21, 2008
    Messages:
    50
    Location:
    Germany
    Forevaa it seems ;P

    Maybe you want to upload it on some other service as an alternative?
     
  15. SamBC

    SamBC Emperor

    Joined:
    Feb 2, 2010
    Messages:
    1,052
    Location:
    Lancaster
    Still in the moderation queue. Can anyone who's been around longer give me any guidance on what's going on?
     
  16. Supercheese

    Supercheese Zeppelin Commander

    Joined:
    Aug 2, 2009
    Messages:
    378
    Location:
    Idaho
    In the meantime, can you upload it elsewhere, say, Mediafire?
     
  17. SamBC

    SamBC Emperor

    Joined:
    Feb 2, 2010
    Messages:
    1,052
    Location:
    Lancaster
    It seems that it's only moderated because I'd had fewer than 30 posts and 30 days when I uploaded it... not sure that's true anymore... *sigh*

    Not used any other file upload services. I could just stick it on my own little server, but don't want to encourage all and sundry to prod it... I'll find somewhere for it soon.
     
  18. SamBC

    SamBC Emperor

    Joined:
    Feb 2, 2010
    Messages:
    1,052
    Location:
    Lancaster
  19. Boster

    Boster Chieftain

    Joined:
    Feb 3, 2011
    Messages:
    33
    Location:
    USA
    So I downloaded your file, but I am still having trouble. A possible cause is when I try to save it as .dds, it says that it can't save a layer mask. I do, however, export the layer mask.

    I still, unfortunately, still get the, "Can't load texture <filename>" error.

    Any help is appreciated :)
     
  20. Shiggs713

    Shiggs713 Immortal

    Joined:
    Mar 11, 2007
    Messages:
    2,361
    Location:
    Indianapolis
    yup, usually when i upload to here it takes about 3 seconds.... no moderation at all.... being here awhile i guess does have at least 1 perk
     

Share This Page