Menu
GIMP is a cross-platform image editor available for GNU/Linux, OS X, Windows and more operating systems. It is free software, you can change its source code and distribute your changes. Whether you are a graphic designer, photographer, illustrator, or scientist, GIMP provides you with sophisticated tools to get your job done. How to enlarge details or objects in photos using Gimp Simple yet very useful Gimp tutorial where we make a detail or an object in a Photo bigger and more visible by resizing it and adding a white rounded square frame around it.
You don't paint directly on the alpha layer. You create a layer mask as the previous poster suggested, paint on that mask, then apply that mask to be the alpha channel.Here's an experiment. Create a brand new image. Select the Layer menu, go down to the Mask pulldown option and from that menu select Add Layer Mask. This shows a dialog to specify how you want the layer mask filled (filled with opaque, filled with transparent, etc.
For the experiment, fill it with opaque (white)) In the Layers window, you should now see your main layer as a thumbnail, and directly to the right of it a thumbnail of the layer mask. Click on the layer mask thumbnail, grab a paintbrush, select black, and start painting. A layer mask is a grayscale channel, so you can paint with color if you like but it will merely use the luminosity or brightness of the brush color to paint in shades of gray. As you paint with black in the layer mask, you will see the 'alpha checker' show through in the main image view. Now, if you apply the layer mask, it will set the alpha channel to be the layer mask, and you can then save to TGA or other alpha-supporting format. Thanks for your help! I followed your instructions and indeed I could modify the alpha channel.
But now I have a different problem.I want to make a terrain blendmap, where each color channel describes where a texture appears. RED defines where gras is, green where dirt is, Blue where stone is and Alpha where snow is. Thus my alpha channel isn't really used for alpha blending. It is used as a blend layer just like RGB.Thus most of my Alpha channel is 'empty'. This means in GIMP most of the Alpha layer is just the checkerboard and only in some parts I see black color. But now I can't see the RGB channels. The stuff I painted in the RGB channels is only visible on black parts in the Alpha layer.
Since most of my Alpha layer has this checkerboard thing I can't see my RGB channels.How can I make my RGB channels visible again (without modifying the alpha channel)? For example I want to click on the eye symbol on the RED channel and want to see just the Red channel. Thanks for your help! I followed your instructions and indeed I could modify the alpha channel. But now I have a different problem.I want to make a terrain blendmap, where each color channel describes where a texture appears. RED defines where gras is, green where dirt is, Blue where stone is and Alpha where snow is. Thus my alpha channel isn't really used for alpha blending.
It is used as a blend layer just like RGB.Thus most of my Alpha channel is 'empty'. This means in GIMP most of the Alpha layer is just the checkerboard and only in some parts I see black color. But now I can't see the RGB channels. The stuff I painted in the RGB channels is only visible on black parts in the Alpha layer. Since most of my Alpha layer has this checkerboard thing I can't see my RGB channels.How can I make my RGB channels visible again (without modifying the alpha channel)? For example I want to click on the eye symbol on the RED channel and want to see just the Red channel.Here's an other tip:When you have a alpha mask (two tumbnails), you can enable/disable the color or alpha mask by holding ctrl and/or alt and press the left mouse button on the mask thumbnail. A red or green border will appear around the alpha mask.
When it is red, the alpha channel is disabled and you see only the pure RGB color without looking through it, when it is green, you see only the alpha mask as grey-scale image.
Ouch.I thought it doesn't matter, because I have set their z value.Hmm. So if I want some tiles to be below the player, I have to draw them first, and if I want them to be on top of him, I have to draw them later?
Too bad, I was sure that opengl has kind of automatic z-ordering, that allows me to draw'em in any order. That makes me to reorganize whole Map class (I have some tiles below and some above the player).Ech, anyway, thanks, It's working now.spoiler GL::setcolor(1.0,0.0,0.0,0.5);GL::drawrect(0,0,400,400,25);player.draw; //. Z-buffering works great for solid geometry, but transparency has always played hell with it, since transparent pixels still output depth. You can use (and call glEnable(GLALPHATEST) )to actually snip out pixels whose alpha is 0, in which case they won't output a depth fragment. However, if the edges of your sprites are anti-aliased for a smoother blend, then this can result in a halo being drawn around your characters, since those partially-transparent pixels will still output depth and will still need to be properly blended with their background.
Generally speaking, whenever alpha transparency or alpha blending is involved, the objects need to be sorted and drawn back to front.