Home Technical Talk

workaround for "indexed colours" photoshop bug needed...

polygon
Offline / Send Message
Rapante polygon
Heya,

my company is working on a few DS games at the moment and I have that one bug when it comes to converting stuff to a 256 colour index palette.

for our sprites we use a transparent colour in the first index, which is always set manually but picking it from the background.

In many cases when I converted the image to index and took a look at the palette with "image > mode > color palette" I saw that colour somewhere in the middle in the index again.

I know many of you now think: " he didn't do his masking right and there are semi transparent pixels in the sprites and they tinted some background pixels!" but this is not the case (happens to manally pixeled sprites as well).

essentially the palette will contain the background colour in the first index and a colour that is the bg colour -1% saturation and -1% brightness somewhere in the area of the 17th to 64th index. (this is the bug colour)

at the moment what I do is convert files to index, convert them back to RGB and convert them to index again. in most cases this get's rid of this palette terrorist. But I had few incidents where it stayed in the palette.

this "workaround" is "ok", but honestly I don't want to waste colours when working with the DS as it's palette 5bits per channel, whereas PS has 8bits. So I will loose even more colours with the transition from PS to Nintendo's Nitro. So every colour I can save is precious to me and I would really appreciate if someone who has a workaround for this is able to share it with me :)

thanks a bunch!

Replies

  • Snowfly
    Options
    Offline / Send Message
    Snowfly polycounter lvl 18
    How about saving a color table with exactly the colors you want, and then loading that up whenever you convert an image to indexed? So you don't get a surprise palette every time...
  • Rapante
    Options
    Offline / Send Message
    Rapante polygon
    thing is those palettes are substancially different in each case, as we don't use fixed palettes for these sprites. so it'll limit the colours even more. the ones manually pixeled are never a problem because I usually never use more than 64 colours, but there are some graphics which have been done in illustrator (the publisher wanted a vector look, with vivid colours) and prepared to be imported into nitro with Photoshop.

    thanks for your suggestion though
  • Minos
    Options
    Offline / Send Message
    Minos polycounter lvl 16
    I'd recommend asking your employer to purchase Optipix for this kind of stuff. There's even an special NDS version that's fully integrated with the Nitro SDK, you can even tweak your images and preview them in real time on the DS! We got it here at the office. It's extremely easy and powerful, puts Photoshop to shame when it comes to palettizing stuff.

    But if you can't afford it you could do like I did and create a few generic actions to convert your palettes easily. Basically flatten your image, convert to indexed, choose "forced" as custom pallette and add your transparency color in the first slot. As long as you use the same background color for all your sprites (we use 255 0 255) it should work fine.

    3815949983c0b9a96116200636066aa1ffb9672.jpg
  • danr
    Options
    Offline / Send Message
    danr interpolator
    photshop remembers force colour, doesn't it? You shouldn't even need to action it. Could be wrong, it's not in front of me
  • Wheel
    Options
    Offline / Send Message
    Hey Minotaur0, you gotta linky to the DS version of Optipix. Reindeer Graphics Right ??? I can't see it on their site.
  • nullfed
    Options
    Offline / Send Message
    nullfed polycounter lvl 9
    yeah, Photoshop does remember forced colours:

    -Image> Mode> Indexed Color...
    -choose adaptive or whatever
    -Forced: Custom ( a palette will pop up which will be blank by default unless there are earlier settings in place)
    -Click the first entry and change it to, eg, 255,0,255 and Ok it.
    The chosen colour will always be in the first entry in the palette and should stay in the settings each time you do it.
  • Minos
    Options
    Offline / Send Message
    Minos polycounter lvl 16
    danr wrote: »
    photshop remembers force colour, doesn't it? You shouldn't even need to action it. Could be wrong, it's not in front of me

    It does but when you need to save multiple textures each one with a different palette (some will be 8, others 256 or even 32 if it's an alpha map) it's definitely easier to use actions. It's also unnecessary to force the first color of the palette if your texture isn't transparent.

    Those actions with the (transparent) suffix automatically place 255 0 255 in the first slot whereas the others don't, so I never had to care about this stuff. Those actions become obsolete as soon as we got Optipix though. As I said it's miles better and easier to manage palettes with this software. The conversion tools are far better and put photoshop's dithering to shame.

    Wheel - Here's the DS version, there's a trial version somewhere I believe... http://www.webtech.co.jp/eng/istudio/ds/index.html
  • EVIL
    Options
    Offline / Send Message
    EVIL polycounter lvl 18
    nullfed wrote: »
    yeah, Photoshop does remember forced colours:

    -Image> Mode> Indexed Color...
    -choose adaptive or whatever
    -Forced: Custom ( a palette will pop up which will be blank by default unless there are earlier settings in place)
    -Click the first entry and change it to, eg, 255,0,255 and Ok it.
    The chosen colour will always be in the first entry in the palette and should stay in the settings each time you do it.
    this is how we do it at work, beats loading up a sprite editing program to correct the pallet.
Sign In or Register to comment.