0 Favourites

How do I change thr backgroud of a sprite

  • Here is a anim. I download.

    How do I make the background of a sprite transparent? I know in some of the other game engines you could

    make any color transparent by typing the color code in R0,G0,B0, that is black.

    Can you do something like that in con 2 ?

    Thank you

    renny

  • Hey sadsack,

    In a graphic editor that can save png files, you'll want to select all pixels that match the background color, and delete them.

    Below are instructions for doing this in both Photoshop, and in Pixlr (a free online Photoshop-like editor).

    The instructions are almost identical for both programs.

    Photoshop

    In Photoshop, you can do this with the "Magic Wand" tool:

    • With the image open in Photoshop, double-click the image's layer in the layer panel to convert it from a background layer to a normal layer. (Background layers can't have transparency.)
    • Choose the Magic Wand tool, and in the options bar (top of screen), disable "contiguous" and "Anti-alias", and set "Tolerance" to "0".
    • On the image, click the background color to select all pixels matching that color.
    • Press delete to remove them. This leaves a transparent hole where they were.
    • Save the modified image as a png to preserve the transparency.

    Pixlr

    In Pixlr, you can do this with the "Wand" tool:

    • Choose the Wand tool, and in the options bar (top of screen), disable "contiguous" and "Anti-alias", and set "Tolerance" to "0".
    • On the image, click the background color to select all pixels matching that color.
    • Press delete to remove them. This leaves a transparent hole where they were.
    • Save the modified image as a png to preserve the transparency.

    Result

    Since I walked through the process in both programs to make sure I wasn't forgetting anything important, I ended up with the resulting image, which I figured I might as well include.

    [attachment=0:23rp6ggf][/attachment:23rp6ggf]

  • You should learn the basic of image editing first before jumping into game development.

    Let me explain it to you by this simple animated GIF

    Open your image on Photoshop, then:

  • even you could do it in C2 as well

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • Yeah, in the C2 Image-Editor you can set the "Alpha" of an color to "0" and it will be "transparent".

    Now you can erase the colors you don't want, like in the animation jourdan posted.

  • Thank you all,

    I did it in paint shop pro 9. I found a copy of paint shop pro 9 and about a 3 inch thick book on how to use it

    at a garage sale last summer.

    Well the book went some place. I been looking for it for a week now and still have not found it.

    But with you help I got it done.

    Thanks

    renny

  • Great!

    I love PSP!

    I use it since version 4 or so.

    Now i use X5

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)