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

Cut'n pasting resources - those darned pink pixels...

Discussion in 'Civ3 - Creation & Customization' started by Wolfhart, Apr 19, 2007.

  1. Wolfhart

    Wolfhart The Last in Line

    Joined:
    Dec 30, 2001
    Messages:
    974
    Location:
    Capita, Sweden
    Whenever I've been modding I've always used some given resources.pcx, like Casus Belli's or some other. But now when I for the first time try to compose my own resources.pcx by cut'n pasting I discover how seriously crappy I am at handling palettes: I keep getting those pesky pink pixels in my resources in game.
    What do I have to do to get rid of them?
    I'm using an old Photoshop on my trusty old game PC, and basically what I'm trying to do is to merge Casus Belli's 2.0 collection with Arnes fantasy resources and the resources.pcx of Warhammer 2.5.
     
  2. NavyDawg

    NavyDawg Audentes Fortuna Iuvat

    Joined:
    Jun 6, 2005
    Messages:
    869
    Location:
    The Gathering Place
    The pink pixels are shades of magenta, which act as a shadow around the object. Looks good in your paint program, but not in the game. To get rid of them, I get a paintbrush (in Paint Shop Pro) and paint over them with colors from the palette of the pcx. Kind of a pain, but it works. Maybe someone else knows another workaround...
     
  3. SWalker

    SWalker Warlord

    Joined:
    Dec 19, 2005
    Messages:
    252
    Location:
    New Zealand
    (I use Corel Photo-Paint but it should be similar in PSP)

    Once you have pasted the object into the pic, set the threshold level for the matting on that object (in Photo-Paint Object-Matting-Threshold...). This makes all pixels in the object with an alpha value of less that the threshold fully transparent, and all pixels with an alpha value equal to or greater than the threshold fully opaqe. (And means that you no longer blend the object with the background.)
    Some experimentation may be needed to find the appropriate threshold level for a given object.
     
  4. Vuldacon

    Vuldacon Dedicated to Excellence Supporter

    Joined:
    Nov 14, 2001
    Messages:
    6,750
    Gender:
    Male
    Location:
    USA
    IF this is for a New Game, you could make a new palette from all the Resources you first place on the File Sheet set with 16 million colors then after adding your resources, you can reduce the colors for the palette.

    If you are keeping an original game palette or one that is already being used, you could remove all of the magenta Shades from the palette and save it as a separate palette that you use first to place your new resources...then after placing all the new Resources, you simply load the Original Palette to Nearest Color Matching.
    The little time you spend making the first palette will speed up everything else. Keep in mind that occasionally, there are some of the magenta color shades that are needed but I am sure you would see when. IF after you make the palette with No Magenta Shades in it and you have loaded the Original Palette again to your work...IF you find that a particular resource could use any of the Magenta Shades, you could try adding the resource again but use the Original Palette then edit any color that you do not want out by changing the color manually to what ever suits you.
     
  5. mrtn

    mrtn Shaven not stirred

    Joined:
    Mar 26, 2002
    Messages:
    8,635
    Location:
    Stockholm
    Good, Photoshop works very well for handling palettes. Check out the last link in my sig.

    You have to learn how to check the palette (called Color Table in Photoshop), you do this by going to Image\Mode\Color Table.
    First you should check which image has the faulty palette (i e every one but the WH one :smug: ), and make sure that that palette doesn't end up in your final file.
     
  6. Wolfhart

    Wolfhart The Last in Line

    Joined:
    Dec 30, 2001
    Messages:
    974
    Location:
    Capita, Sweden
    Thanks guys, I sorted it out at last :)
    I started all over again by using the WH2.5 resources.pcx (a compact palette, kudos to mrtn :goodjob:), doubling it in size and increasing colour depth to 16 million (thanks Vuldacon :worship:), cut'n pasting the resource icons I wanted from Arne and Casus Belli's collection, decreasing colour depth to 256, editing the palette by shifting transparent colour to its proper position, saving the palette, reverting to 16 million colour file, redoing colour decrease, loading saved palette and vojla! Beautiful new resources to hunt for, including those pretty little animals my loved one had on her wishlist.
     
  7. Vuldacon

    Vuldacon Dedicated to Excellence Supporter

    Joined:
    Nov 14, 2001
    Messages:
    6,750
    Gender:
    Male
    Location:
    USA
    Glad you had success Wolfhart... There are many Techniques that can be used to accomplish the same things concerning computer work in general and the same applies to Graphics Work. It is helpful to think through what we want to accomplish, then make "tools" that are really just procedures that will help speed the process. The Techniques will vary depending on the task so whether we are making a New Resource Palette or simply wanting to add images to one without the new images picking up the magenta shades, our approach will vary.

    Did you also make the Shadows for the Resources? Shadows really help resources look more realistic on the map and especially help to ground them. A resource can appear to be floating above the ground without shadows.

    I have found it easier, faster and more accurate to make the shadows directly on the resources.pcx file then transfer them by copying the entire Frame to the resources_shadows.pcx file.

    Start by Making Copies of the resources.pcx and resources_shadows.pcx files so your work will not affect the Originals.

    Open both new resources.pcx and resources_shadows.pcx files in your Graphics Editing Program.
    Flood Fill the Frame Lines on the resources.pcx file with Black so you can see them easily.
    Change the resources.pcx to 16 million colors then copy each of the Four Shadow Colors that are used in the resources_shadows.pcx palette and apply them to a blank areas within the frame on the resource you are making shadows for on the resources.pcx file.

    The Colors that are used in the resources_shadows.pcx palette are changed to transparent shadows by the game and they are graduated levels of darkness with the lightest color being the lightest shadow color and the dark green color being the darkest shadow color used.
    You can look at any game resource to see how the colors were applied and the direction for the shadows to gain the correct perspective and blend for any new shadows you are making. Generally it is the W/NW direction for shadows and you can look at how Original Resource Shadows were Blended with the palette colors.

    After making your New Shadows for a Resource, simply erase the Resource by painting over it with the Magenta Background Color, leaving only the Shadows in the frame. Enlarge the frame so you can see exact edges. Copy the entire Frame with the Shadows and Paste it on the Same Frame for the resources_shadows.pcx file. Note that it is also helpful to Flood Fill the Frame Lines on the resources_shadows.pcx file with a nice Bright Color from the palette so you can see clearly when you are pasting the Frame and Shadows to it.
    The Frames are what you use to make sure the Shadow Images are exactly aligned on the file. Be sure to paste to the Same Frame order on the resources_shadows.pcx file so the shadow will be applied to the correct resource.

    After pasting the Frame and Shadows, replace the frame color or colors with the Original Frame Color used for the File. You can save and check the Resource Shadows on the game map to see how they look.

    Place your New resources.pcx and resources_shadows.pcx files so they replace the Original files in Art. Naturally you will save the Originals in a separate Folder somewhere.

    You can test resources and shadows in an instant. Make a copy of a Scenario Biq file and save the Original. Open the copy in the Editor and place your Resources on the map where you want to see them. Set the Resources to have no requirements before they appear and save the Biq. You can play the Scenario and immediately see your Resources with Shadows on the map where you placed them.
     
  8. flamescreen

    flamescreen Ancient Mariner

    Joined:
    Mar 1, 2002
    Messages:
    856
    Location:
    Europe
    ^ I don't use much shadows for resources(due to my incompetence to make them realistic), but I leave them with the resource file and don't transfer them to the shadows one. Does it affect the way they look much? They look more or less ok in my map.
     
  9. Vuldacon

    Vuldacon Dedicated to Excellence Supporter

    Joined:
    Nov 14, 2001
    Messages:
    6,750
    Gender:
    Male
    Location:
    USA
    flamescreen... If your Resources look ok to you without shadows, then they probably do not have to have them. Generally is makes a difference with larger Resources that stand higher off the ground. If the Resources appear to be on the Ground, then they are ok. The Original Game Iron, Gold, Salt Peter, Oil, Uranium, Spice and Gems Resourses do not use Shadows for example.
    Shadows will add a more 3D effect to some Resources on the map but if you are happy without shadows, that is your decision. :)
     

Share This Page