How do I change thr backgroud of a sprite

Get help using Construct 2

Post » Tue Feb 17, 2015 10:13 pm

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
You do not have the required permissions to view the files attached to this post.
B
7
S
1
Posts: 53
Reputation: 535

Post » Wed Feb 18, 2015 2:23 am

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:
  1. 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.)
  2. Choose the Magic Wand tool, and in the options bar (top of screen), disable "contiguous" and "Anti-alias", and set "Tolerance" to "0".
  3. On the image, click the background color to select all pixels matching that color.
  4. Press delete to remove them. This leaves a transparent hole where they were.
  5. Save the modified image as a png to preserve the transparency.

Pixlr
In Pixlr, you can do this with the "Wand" tool:
  1. Choose the Wand tool, and in the options bar (top of screen), disable "contiguous" and "Anti-alias", and set "Tolerance" to "0".
  2. On the image, click the background color to select all pixels matching that color.
  3. Press delete to remove them. This leaves a transparent hole where they were.
  4. 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. :)
try - alphaBG.png
You do not have the required permissions to view the files attached to this post.
B
27
S
18
G
8
Posts: 328
Reputation: 6,158

Post » Wed Feb 18, 2015 9:19 am

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:

Image
B
18
S
3
G
3
Posts: 109
Reputation: 2,784

Post » Wed Feb 18, 2015 10:29 am

even you could do it in C2 as well
B
252
S
39
G
15
Posts: 1,964
Reputation: 40,763

Post » Wed Feb 18, 2015 7:12 pm

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.
B
22
S
6
G
2
Posts: 185
Reputation: 3,632

Post » Wed Feb 18, 2015 8:39 pm

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
B
7
S
1
Posts: 53
Reputation: 535

Post » Thu Feb 19, 2015 8:19 am

Great!
I love PSP!
I use it since version 4 or so.
Now i use X5 ;)
B
22
S
6
G
2
Posts: 185
Reputation: 3,632


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 28 guests