Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Gimp help needed - erasing selections.

Trout Recreant
Public Enemy No. 1
Join date: 24 Jul 2007
Posts: 4,873
08-28-2007 09:40
I’ve been messing around in Gimp making tattoos. The problem is converting my image to a transparency. I can do it pretty easily, thanks to the tutorials here, but the problem is that when I go to erase away the portions I don’t want, I get these little white lines around the design that are just slightly off color as the black of the design fades to grey a little. Then it’s a picky process of zoom in, select, zoom out, erase, erase, erase, zoom in, select, zoom out, etc. Is there a way to erase the selection without using the eraser? Maybe a hotkey or something that just erases the selection? Ctrl-alt-Magicbutton? That would speed up the process immensely. I’m just trying to get really clean, sharp lines without spending hours picking at the edges pixel by pixel. If there isn't a way to do that, can the eraser be made extremely large so I don't have to scribble all over the design to try and get each little pixel? The biggest one I have is 19x19.

Finally, anyone have a line on a little vendor space, around 15-20 prims – maybe a beachfront mall (or some other place where people are looking to show some skin) with decent traffic? I’m almost close to making something worth selling, but starting small seems to be a good idea.
_____________________
From: Jerboa Haystack

A Trout Rating (tm) is something to cherish. To flaunt and be proud of. It is something all women should aspire to obtain!
Lee Ponzu
What Would Steve Do?
Join date: 28 Jun 2006
Posts: 1,770
08-28-2007 10:32
i am no expert...

When I have a selection, menu/edit/clear makes it transparent.

Also, you might need to turn off anti-aliasing while you clear or erase or whatever. You can also select by color, so select all the black of the tattoo, then invert the selection to select everything else.

Spend some time reading the help files, or Grokking the GIMP.

Lastly, for the brush size, you can create your own brushes any size you like. There is also a way which I don't remember at the moment to set the mouse roller button so it resizes the brush.
Al Sonic
Builder Furiend
Join date: 13 Jun 2006
Posts: 162
Move it to the mask.
08-28-2007 11:59
If you have a single-layer solid black image against white that needs to be turned into solid black against clear, you should take an approach that ensures nothing remains in any way white (or gray). So first grab a copy of the layer by hitting Ctrl-C inside the image window with nothing selected. Then, fill the whole image with black (so there's no more worries about a hint of white anymore!).

In your Layers window, right click on that layer you just filled with black, and add a layer mask. It will ask you what the mask should start like, but it doesn't matter which as long as you proceed to cover it up with the copied image, as you can do right afterward with Ctrl-V (because once you've created the mask, it becomes selected, rather than the layer you are on). As a black-on-white mask creates the reverse of the effect you need, invert it, with Layer-Colors-Invert.

So there you'll have it, a black shape against a clear background. Edit the mask if you want to edit the shape further, but edit the layer itself if you want to change the color.


But is there a magic tool that just takes a single color of your choice and converts it neatly to clear? Actually, yes there seems to be :D. I haven't had a good look over how reliable it is, but it's in Filters - Colors - Color to Alpha. Surely for basic tasks like this, it works great, except that the completely clear part is still assigned the white color, which could still cause a slight halo in SL's texture rendering. So make sure to fill the whole image with the black color afterwards; this is easy to do if you first check Keep Transparency in the top-right corner of the Layers window.
_____________________
If I said a thing ya don't understand, lemme know. I too love it when info is easy to read :D.
Trout Recreant
Public Enemy No. 1
Join date: 24 Jul 2007
Posts: 4,873
08-28-2007 14:01
Thanks both Al and Lee. That's the info I need. Al - I'm not sure how that gets you to clear, though without using an alpha channel. I'll follow your directions exactly, though, because that sounds way easier than what I've been doing.

My basic technique has been this: Load the image I want in .jpg format - they are almost all black on white background, although some have colors. Then go to Transparency/add alpha channel. Then select by color and click on the white background. Grab the eraser tool and erase everything possible. This leaves a clear background, black design, but a lot of whitish/grey crud around the design. Then I zoom in to 400% and select by color again. Shift-Select lets me pick multiple colors, but you never really get them all. Then zoom out, erase everything, zoom in, repeat until I have a nice clean image, save as .tga, grab template, resize, move around, etc, delete the template, Done. It's fast except for the erasing part which is tedious and time consuming.
_____________________
From: Jerboa Haystack

A Trout Rating (tm) is something to cherish. To flaunt and be proud of. It is something all women should aspire to obtain!
Al Sonic
Builder Furiend
Join date: 13 Jun 2006
Posts: 162
A few notes...
08-28-2007 15:11
-For anything that isn't black-on-white or white-on-black, I'd definitely try working with the Color to Alpha tool first.

-JPG isn't perfect (AKA "lossless";). PNG is. (TGA and BMP are too, but the latter is huge and the former isn't (pre-)viewable outside of the compatible programs e.g. GIMP.) If possible, use lossless formats throughout the process of making texture files, to avoid messy little imperfections. And yes, thanks to a somewhat recent viewer improvement, you can now upload using PNG.

-Indeed, if you have a mask, you don't really even need an alpha channel. Well at least, not until the image is saved as an actual PNG (or TGA or whatever uploadable) file, in which case it will automatically add one in the flattening process.
_____________________
If I said a thing ya don't understand, lemme know. I too love it when info is easy to read :D.
Trout Recreant
Public Enemy No. 1
Join date: 24 Jul 2007
Posts: 4,873
08-28-2007 17:30
Excellent, thanks again, Al!! The learning curve on Gimp is incredibly steep, so your help here means a lot!
_____________________
From: Jerboa Haystack

A Trout Rating (tm) is something to cherish. To flaunt and be proud of. It is something all women should aspire to obtain!
Peggy Paperdoll
A Brat
Join date: 15 Apr 2006
Posts: 4,383
08-28-2007 17:46
If I were doing a tattoo that was black on a white background I wouldn't mess with the adding an alpha channel after loading my image. Simply start off with a completely transparent layer as your background. "Open as layer" your image you want to use for your tattoo and place it on top of your background transparent layer. Then use the select by color tool setting the thresold low (like maybe 5 or 10) and select on the part you want to use then on the selection tab "invert" the selection.......edit/cut. you now have your image on top of your transparent layer. Edit further if you want......then merge the two layers. It couldn't be easier that way.

I've had trouble using masks too.........the threshold is sort or high and the "cleaning" up can be a pain. But my way for something as simple as what I think you are doing does not have that problem. Clean, crisp edges everytime. :)

A hint: If you find my way easy and usefull do as I did. Make a transparent layer and save it with any templates you have. Then you just have to navigate to that "template" anytime you want a transparent layer to use as I just mentioned or to use to drawn on. I have two saved........one at 512 and one at 1024 resolutions.

Hope I helped a little. :)
Trout Recreant
Public Enemy No. 1
Join date: 24 Jul 2007
Posts: 4,873
08-29-2007 08:40
Thanks. I used the invert selection trick and it worked like a charm. I don't know how much time I saved, but it was WONDERFUL!! You all saved me a big headache. Now I get to play with the fun stuff a little more and avoid a lot of the really tedious nit-picky stuff.

I also figured out how to make a gigantic brush in the brush editor, so for erasing very large sections, all I have to do is center the mouse over the page and just click. The brush is larger than the design, so one click and it covers everything.
_____________________
From: Jerboa Haystack

A Trout Rating (tm) is something to cherish. To flaunt and be proud of. It is something all women should aspire to obtain!
Domino Marama
Domino Designs
Join date: 22 Sep 2006
Posts: 1,126
08-31-2007 09:22
With black on white ones, there's an even easier way. Load the image in The Gimp, select Layer - Mask - Add Layer Mask. Pick "Greyscale copy of layer" and check "Invert" then click "Add"

You can get to the layer menu by right clicking in the Layers dialog too.

If there's white halos, just edit the layer ( you can choose between the layer and it's mask in the Layers dialog or in the menu Layer - Mask - Edit Layer Mask ) and fill the entire thing with black.

You can blur the mask to get a tattoo that's faded at the edges.

When you've done, just do "Layer - Mask - Apply Layer Mask" to convert it to the alpha channel.