• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Sprite Creation with Windows Paint

T

Tom Nally

Guest
Hello. I'm new here, and a little embarrassed to ask a newbie question.

I'm using the standard Windows Paint application to create sprites. My intention is that the white paint color should manifest itself as transparent when the sprite is assigned to an object, and then the object is imported into a room. But Gamemaker is treating white as if it's just another color. (And why shouldn't it? How would Gamemaker know that I intend for white to be transparent?)

Is there a way to remedy this? By the way, I'm currently saving sprites using the .bmp format, which I realize isn't an efficient format.

Thanks!

---Tom Nally
 
I

icuurd12b42

Guest
Use the Included image editor it's 1000 times better

Use the Magic wand tool, click on the white area you want to make transparent and hit Delete on the keyboard to make the pixels tranparent
 

TsukaYuriko

☄️
Forum Staff
Moderator
An alternative to icuurd12b42's method that works for all subimages in a sprite at once is using the Images -> Erase a Color function in the GM:S-internal sprite editor.
 
T

Tom Nally

Guest
Use the Included image editor it's 1000 times better

Use the Magic wand tool, click on the white area you want to make transparent and hit Delete on the keyboard to make the pixels tranparent

Thank you very much!
 
T

Tom Nally

Guest
An alternative to icuurd12b42's method that works for all subimages in a sprite at once is using the Images -> Erase a Color function in the GM:S-internal sprite editor.
Thanks! A testament to the Gamemaker that operations like that are so easy.
 
I

icuurd12b42

Guest
An alternative to icuurd12b42's method that works for all subimages in a sprite at once is using the Images -> Erase a Color function in the GM:S-internal sprite editor.
That sets the alpha to 0 for that color... The wand + delete removes it and defaults the pixel to black...

It may not seem like much an issue but it may affect interpolation in the weirdest tiny ways.
 

TsukaYuriko

☄️
Forum Staff
Moderator
That's... indeed an issue, and one I was not aware of until now. I'll forward this to the bug tracker.
 
T

Tom Nally

Guest
Thanks very much for the responses, gents (and/or ladies, if that happens to be the case)!

Here's a followup question...

Presumably, establishing transparent regions within one's sprite has no effect on the default collision outline. Would that be correct?

Thanks again!
 

TsukaYuriko

☄️
Forum Staff
Moderator
A sprite's collision mask can be defined by opening the sprite's properties and clicking the "Modify Mask" button. In that settings window, there is a slider for alpha (transparency) tolerance which takes effect if the "Precise" shape is selected (this is not the default).

If the "Automatic" setting in the "Bounding Box" group of the mask settings is checked (this is the default) and a sprite (or subimage, if the "Separate collision masks" checkbox in the sprite properties is checked) has transparency around the edges that could be cropped, its collision mask will also be cropped accordingly, so that only the regions of the sprite (subimage) which have pixels with an alpha value of 1 or more are included in it.

Outside of these cases, transparency has no effect on a sprite's collision mask, and you have full control over whether you want it to affect anything.
 
I

icuurd12b42

Guest
That's... indeed an issue, and one I was not aware of until now. I'll forward this to the bug tracker.
It's not really a bug, it's a difference of render that may make you scratch your head... In a "why is this image slightly different in the game than all the other ones?" sortof way.

This behaviour may be wanted
 
T

Tom Nally

Guest
Thank you very much!

A sprite's collision mask can be defined by opening the sprite's properties and clicking the "Modify Mask" button. In that settings window, there is a slider for alpha (transparency) tolerance which takes effect if the "Precise" shape is selected (this is not the default).

If the "Automatic" setting in the "Bounding Box" group of the mask settings is checked (this is the default) and a sprite (or subimage, if the "Separate collision masks" checkbox in the sprite properties is checked) has transparency around the edges that could be cropped, its collision mask will also be cropped accordingly, so that only the regions of the sprite (subimage) which have pixels with an alpha value of 1 or more are included in it.

Outside of these cases, transparency has no effect on a sprite's collision mask, and you have full control over whether you want it to affect anything.
 
M

Meowmere

Guest
I personally use Paint.net as apposed to Photoshop (I still don't understand why *Anyone* uses this)
 
A

Andy

Guest
We've been over that function and its issues already... scroll up a bit ;)
Oh thank you! This explains why sometimes my sprites render with a slight pink outline (when I use smoothing). It's just making the pink have 0 alpha, and not fully removing the color.
 

SCR

Member
You learn something new everyday. Thanks for the insight o the "Erase a Color" functionality and it's downside. And thanks Tom Nally for the "Newbie" question, as it has helped more than just you!
 
Top