Help with Gimp Transparency/Alpha Channel
This discussion is connected to the gimp-user-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.
This is a read-only list on gimpusers.com so this discussion thread is read-only, too.
Help with Gimp Transparency/Alpha Channel | frustrated1 | 27 Aug 03:28 |
Help with Gimp Transparency/Alpha Channel | jolie | 27 Aug 17:16 |
Help with Gimp Transparency/Alpha Channel | Michael J. Hammel | 27 Aug 17:48 |
Help with Gimp Transparency/Alpha Channel | frustrated1 | 27 Aug 23:42 |
Help with Gimp Transparency/Alpha Channel | frustrated1 | 27 Aug 23:54 |
Help with Gimp Transparency/Alpha Channel | Michael J. Hammel | 28 Aug 00:30 |
Help with Gimp Transparency/Alpha Channel | Jason van Gumster | 28 Aug 05:34 |
- postings
- 3
Help with Gimp Transparency/Alpha Channel
I am using Gimp 2.67
I am modifying textures for a video game. The video game applies a special
effect to the areas of the texture that are not 100% transparent or 100%
opaque.
I am trying to make certain parts of the texture 100% transparent so that it is invisible in-game and not subject to the special effect.
I have used the eraser, rectangular select, and free select tools, and they all have the same problems.
Basically, what happens is that the area outside of my selections or erasing also seems to be affected. I have antialiasing off for the free select tool. I have hard-edge on for the eraser, and all the brush dynamics turned off for it. The eraser is at Circle (05) which is a square, at the scale of 1.00 I have tried using Select>Sharpen
The rectangular select tool has antialiasing checked and greyed out, so that I cannot uncheck it.
I believe this was introduced in one of the most recent versions (I recently "upgraded' to gimp 2.67) as I don't remember seeing that in a version I used to use, I think it was 2.1 or 2.2. I also don't remember having this problem with those versions.
The areas outside of my selections and erasing are being affected, so that in-game the special effects are applied to areas I don't want them to be. I have looked in the alpha channel, and there appears to be no actual transparency in those areas, it seems to be solid black.
Is there anyway to ensure that the areas outside of my selections will not be affected?
Also, I would like to know how to copy the exact alpha channel from one image to another image, without the original alpha channel being changed. I have tried doing this before but the alpha channel always looks different when pasted into the second image.
Thanks!
- postings
- 22
Help with Gimp Transparency/Alpha Channel
Hi,
I'm trying to figure out what the problem is but you mention too many things so I'm afraid I'm getting confused.
Could you please give a step by step example of what you are doing and what happens when you are doing it, so I or someone else here can help find out what is going wrong?
Thanks,
Jolie
I am using Gimp 2.67
I am modifying textures for a video game. The video game applies a special effect to the areas of the texture that are not 100% transparent or 100% opaque.I am trying to make certain parts of the texture 100% transparent so that
it
is invisible in-game and not subject to the special effect.
I have used the eraser, rectangular select, and free select tools, and they all have the same problems.
Basically, what happens is that the area outside of my selections or
erasing
also seems to be affected. I have antialiasing off for the free select tool.
I
have hard-edge on for the eraser, and all the brush dynamics turned off for it. The eraser is at Circle (05) which is a square, at the scale of 1.00 I have tried using Select>Sharpen
The rectangular select tool has antialiasing checked and greyed out, so
that
I cannot uncheck it.
I believe this was introduced in one of the most recent versions (I
recently
"upgraded' to gimp 2.67) as I don't remember seeing that in a version I
used
to use, I think it was 2.1 or 2.2. I also don't remember having this
problem
with those versions.
The areas outside of my selections and erasing are being affected, so that in-game the special effects are applied to areas I don't want them to be. I have looked in the alpha channel, and there appears to be no actual transparency in those areas, it seems to be solid black.
Is there anyway to ensure that the areas outside of my selections will not
be
affected?
Also, I would like to know how to copy the exact alpha channel from one
image
to another image, without the original alpha channel being changed. I have tried doing this before but the alpha channel always looks different when pasted into the second image.
Thanks!
Help with Gimp Transparency/Alpha Channel
On Thu, 2009-08-27 at 17:16 +0200, jolie S wrote:
I'm trying to figure out what the problem is but you mention too many things so I'm afraid I'm getting confused.
I didn't see the original question, but let me see if I can help that user.
Basically, what happens is that the area outside of my selections or
erasing
also seems to be affected. I have antialiasing off for the free select tool.
I
have hard-edge on for the eraser, and all the brush dynamics turned off for it. The eraser is at Circle (05) which is a square, at the scale of 1.00 I have tried using Select>Sharpen
I assume you're trying to apply transparency directly to the layer content. Don't do that. Make your texture in an image layer and then apply transparency through the use of a layer mask. White areas in the mask will have no transparency when you save the file.
The areas outside of my selections and erasing are being affected, so that in-game the special effects are applied to areas I don't want them to be.
Does the game operate on alpha channels values >0 or does it operate if sees *any* alpha channel? If the latter, then you have to make separate textures for the areas that will and won't be affected by game play. If the former then the layer masks should work for you.
I
have looked in the alpha channel, and there appears to be no actual transparency in those areas, it seems to be solid black.
You know, after all these years I can't remember if 0 is transparent or 255 is transparent in the alpha channel. I thought 255 was fully opaque. But my brain is full. I think that bit of info slipped out on the last refill of the tank.
Also, I would like to know how to copy the exact alpha channel from one
image
to another image, without the original alpha channel being changed.
If you use a layer mask you can make a selection of the mask, add a new mask to the other image and then copy in the old mask over the new mask.
- postings
- 3
Help with Gimp Transparency/Alpha Channel
Hi,
I'm trying to figure out what the problem is but you mention too many
things
so I'm afraid I'm getting confused.
Could you please give a step by step example of what you are doing and what happens when you are doing it, so I or someone else here can help find out what is going wrong?
Thanks,
Jolie
Sorry about that. I figured that I wasn't explaining it very well, but I wasn't sure how to rephrase it better. Michael was right that I was trying to apply transparency on the layer directly, by using the delete button on selected areas.
I assume you're trying to apply transparency >directly to the layer content. Don't do that. Make your texture in an >image layer and then apply transparency through the use of a layer >mask. White areas in the mask will have no transparency when you save the >file.
Thanks that really helps.
Does the game operate on alpha channels values >0 >or does it operate if sees *any* alpha channel?
If it's anything more than 0 but less than 255, it applies the special effect. If it is completely black 0,0,0, it becomes invisible/completely transparent. If it's completely white 255,255,255 than it's opaque and no special effects are applied.
If you use a layer mask you can make a selection >of the mask, add a new mask to the other image and then copy in the old >mask over the new mask.
Thank you Michael, your tips are very useful. That makes editing alpha channels a lot easier. I can still see the special effects where they aren't supposed to be, but that's only if I change the settings so that the model (that uses the texture) is scaled to become larger. So that special effect is still there, but fainter.
Maybe there's something I'm not doing to remove this completely, but you've been a great help.
- postings
- 3
Help with Gimp Transparency/Alpha Channel
I'm not sure, but it seems like rather than the areas outside of selection being affected, not all of the selected area is becoming transparent. I used the paint bucket (which is set to 100% opacity) to fill the selection in the layer mask (which is acting as the alpha channel) with white. However, the left-most column of the square selection was not completely transparent in-game. It might just be something wrong with the game, because I looked at the color values of the area I wanted to make completely transparent and they are all 0,0,0.
Thanks again for the alpha channel tips, I really appreciate it.
Also, I'm using .tga files. Maybe RLE compression has something to do with this, but I always have it unchecked.
Help with Gimp Transparency/Alpha Channel
On Thu, 2009-08-27 at 23:54 +0200, frustrated1 wrote:
I used
the paint bucket (which is set to 100% opacity) to fill the selection in the layer mask (which is acting as the alpha channel) with white.
Create a white layer mask initially. Make your selection in the image window (make sure the layer mask is active in the Layers dialog by clicking on the mask thumbnail). Reset the FG/BG colors by typing D in the image window (resets to default colors). Then drag the foreground color (black) into the selection. That adds black to the selected area in the layer mask. The black area is the area that will be transparent in your saved image.
If the selection is not feathered then the edge of the selection should (I believe) not be anti-aliased and should either be completely transparent or completely opaque.
However, the
left-most column of the square selection was not completely transparent in-game. It might just be something wrong with the game, because I looked at the color values of the area I wanted to make completely transparent and they are all 0,0,0.
Might be a bug in the game. Expand your selection by 1 pixel and do it again.
Also, I'm using .tga files. Maybe RLE compression has something to do with this, but I always have it unchecked.
No idea. It's possible, but that would probably be a game issue, not a GIMP issue.
Help with Gimp Transparency/Alpha Channel
Just out of curiosity, do you know if the game engine you're using is expecting a premultiplied or non-premultiplied alpha channel? My assumption would be the former, but I figured I'd ask to be sure.
Jason
"frustrated1" wrote:
I'm not sure, but it seems like rather than the areas outside of selection being affected, not all of the selected area is becoming transparent. I used the paint bucket (which is set to 100% opacity) to fill the selection in the layer mask (which is acting as the alpha channel) with white. However, the left-most column of the square selection was not completely transparent in-game. It might just be something wrong with the game, because I looked at the color values of the area I wanted to make completely transparent and they are all 0,0,0.
Thanks again for the alpha channel tips, I really appreciate it.
Also, I'm using .tga files. Maybe RLE compression has something to do with this, but I always have it unchecked.