Jump to content


Photo

Tutorial: Using Gimp To Make An Alpha Channel Mask


  • Please log in to reply
5 replies to this topic

#1 gamer freak

gamer freak

    Voice of Logic

  • New Member
  • 402 posts

Posted 25 July 2008 - 08:42 AM

Most people wish that game maker had better transparency. What they don't realize is that gm already has alpha channel support with the sprite_set_alpha_from_sprite command.

The hard part is getting the alpha channel to a layer mask Game maker can recognize.
If you have photoshop, you can use this tutorial: http://www.64digits....m...ame&id=1858

But, not everyone has photoshop, so I'm going to show you how to use gimp.

EDIT: Updated easier method!

Step one: Fire up gimp and open the file you want to use.
I used this image from w3 schools in this example: http://www.w3.org/Gr...G/alphatest.png

Step two: Right click the layer and click "Add layer mask." Choose the "Transfer layer's alpha channel" option
Posted Image

Step three: Right click the layer and click "Show layer mask."
Posted Image

Step four: Click on the small picture of the alpha mask on the layer (refer to the picture if you don't understand.)
Posted Image

Step five: Go to file>save as and save it. You should see a window popup that says:
You are about to save a layer mask as a *file format here*.
This will not save the visible layers.

Click "Confirm"

In the next popup window, click "Ignore"

Thats it!

The final result: http://i76.photobuck...finalresult.jpg

If you need help getting this in game maker, see this topic: http://gmc.yoyogames...opic=252411&hl=

Edited by gamer freak, 04 August 2008 - 05:19 AM.

  • 0

#2 foshizzle

foshizzle

    GMC Member

  • New Member
  • 121 posts

Posted 25 July 2008 - 02:22 PM

u can just add an alpha mask to the layer, make the mask visible, and take a screenshot and edit the screenshot..
  • 0

#3 gamer freak

gamer freak

    Voice of Logic

  • New Member
  • 402 posts

Posted 25 July 2008 - 04:01 PM

u can just add an alpha mask to the layer, make the mask visible, and take a screenshot and edit the screenshot..

This won't work for images you can't fit inside the window. I was playing around with the masking last night, but I figured this is a better way, because you can do this with images larger then your window, and you don't need to zoom in and crop.
  • 0

#4 Chinchilla

Chinchilla

    Fluffy Pest

  • New Member
  • 415 posts

Posted 25 July 2008 - 06:41 PM

Is an alpha mask 3D or Sprite?
  • 0

Squidz, want one? PM me! Or check out my topic!

#5 foshizzle

foshizzle

    GMC Member

  • New Member
  • 121 posts

Posted 25 July 2008 - 07:45 PM

sprite.. 3d models dont have masks
  • 0

#6 gamer freak

gamer freak

    Voice of Logic

  • New Member
  • 402 posts

Posted 25 July 2008 - 07:53 PM

Is an alpha mask 3D or Sprite?

The alpha mask can be used to make better smooth edges, or make certain areas of a sprite more transparent then others.
  • 0