Post Reply 

Alpha Channels and exporting transparency

Nov 25, 2012, 23:05
Post: #1
Alpha Channels and exporting transparency
Hi all,

I'm new to GIMP--trying to learn some basic skills to create game models.

I was following a tutorial based in photoshop but I cannot seem to find out how to get the same result in GIMP.

Basically, I am trying to use an alpha layer/channel to export a picture that is transparent except for a grass clump that is colored green over the alpha layer. So the picture looks like a solid green rectangle, but is actually a green blade of grass.

Problem is, I cannot get the alpha layer to work. I can't follow the tutorial as it is in photoshop, and random videos on-line haven't helped.

What can I do to achieve this effect in GIMP?

(Here is the tutorial: http://www.youtube.com/watch?v=q7IZStYmImY , from 08:40 - 09:30)
(I have also attached my practice file as a TGA)
Find all posts by this user
Quote this message in a reply
Nov 26, 2012, 00:29
Post: #2
RE: Alpha Channels and exporting transparency
"Alpha" is a channel (the A in RGBA) and not a "layer" so I don't quite understand what you want to do... The alpha channel of a layer can be edited using a "layer mask". It is possible to save a channel to file.

But I don't understand what your output should look like...

Now answering your questions on
https://Gimp-Forum.net
Visit this user's website Find all posts by this user
Quote this message in a reply
Nov 26, 2012, 00:40 (This post was last modified: Nov 26, 2012 00:45 by BlenderTime5.)
Post: #3
RE: Alpha Channels and exporting transparency
(Nov 26, 2012 00:29)ofnuts Wrote:  "Alpha" is a channel (the A in RGBA) and not a "layer" so I don't quite understand what you want to do... The alpha channel of a layer can be edited using a "layer mask". It is possible to save a channel to file.

But I don't understand what your output should look like...

Hi,

Thanks for the reply.

What I'm trying to create is a 2D blade of grass as in this tutorial (http://www.youtube.com/watch?v=q7IZStYmImY , from 08:40 - 09:30 only). The output will be white blades of grass with black background (then a green layer over it) so that when I import into a 3D modeling program, only green blades of grass show.

I understand that in an alpha channel, black is transparent and white is opaque. Thus my image's background is black and the grass blades are white. Problem is, I cannot seem to use alpha channels to achieve this in GIMP.


Attached File(s) Thumbnail(s)
       
Find all posts by this user
Quote this message in a reply
Nov 26, 2012, 10:59 (This post was last modified: Nov 26, 2012 11:01 by rich2005.)
Post: #4
RE: Alpha Channels and exporting transparency
I did look at (some of) that video, the saving bit was sort of glossed over.

But should be possible in Gimp

Make your green layer as a separate image.
Add a white layer mask to this image, make sure that this is 'active' - click in the layer mask, active has a white border not active has a black border, not obvious when it is all white.

Using the "grass image", copy to the clipboard.

Move back to the green image and paste into the image (ie layer mask). Initially it is as a floating layer, anchor this to fix it into the layer mask.

Now you want it as a targa file, go to export, put in the filename including the .tga suffix.

Everything in one screenshot. The targa file is shown in Imagemagick display, transparency is ok.
http://i.imgur.com/pTvCw.jpg

** https://www.gimp-forum.net/ now answering questions**
Find all posts by this user
Quote this message in a reply
Nov 26, 2012, 11:14
Post: #5
RE: Alpha Channels and exporting transparency
Thanks for the detailed response Rich,

I was able to save the file with transparency exactly how I wanted. Even if the workflow was a lot different from photoshop, GIMP did the trick Smile
Find all posts by this user
Quote this message in a reply
Nov 26, 2012, 13:05
Post: #6
RE: Alpha Channels and exporting transparency
Another method:

- make the B&W mask visible
- open the Channels dialog, and duplicate one the RGB channels (any will do)
- make the B&W mask invisible
- create a new Layer, fill with required color or gradient
- "Layer/Mask/Add layer mask" and initialize to the duplicated channel
- "Layer/Mask/Apply layer mask"

Now answering your questions on
https://Gimp-Forum.net
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Color alpha function and its current errors Fuse809 0 269 Oct 11, 2014 03:53
Last Post: Fuse809
  Exporting Multiple Layers Into Images (PNG, JPG, etc) SavingMultipleImages 22 10,906 Oct 6, 2014 10:59
Last Post: rich2005
  Transparency sanvi 1 247 Sep 25, 2014 21:08
Last Post: iForStyle007
Question Alpha broken?? Zrahurgh 13 753 Sep 6, 2014 09:38
Last Post: Zrahurgh
  Gimp Crashes when: Opening A File, Creating A New File, Saving The File and exporting tomayopan 2 469 Sep 1, 2014 21:34
Last Post: tomayopan

Forum Jump:


GIMP ForumPortalArchiveContactTermsRSS