Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

How do I mapping a color range to transparent?

Shanelle LaFollette
Female Butterfly
Join date: 5 May 2004
Posts: 9
02-22-2005 15:08
Hi,

I have a shirt texture that is worn by some dummy. The shirt is red, the dummy white, so that my texture is red with white areas. What I want to do is make the white parts transparent so they show through in SL. I've experimented with both Photoshop and Gimp, unfortunately I haven't found a way to make it work. So, does anyone know how to achieve this? I'm sure there must be an easy way, maybe with color range mapping or some filter ... I'd really appreciate your ideas :)

My current ideas are like this: Use an alpha channel and a B&W copy where the areas that I want to mask are black or greyish and the rest that should remain opaque is white. I'm just not sure how to produce the layer :(

As a second question, how do you transform a texture so that the perspective fits? Until now I split the texture into distinct areas that I transform with free transform and perspective transform. Is this the best way or are there better methods? I think Winmorph and the liquify filter could be useful. Any experiences?

Greetings,
Shanelle.
Zuzi Martinez
goth dachshund
Join date: 4 Sep 2004
Posts: 1,860
02-22-2005 16:02
first question: to produce alpha channels in Photoshop go to the Layers palette. at the top of it there are three tabs for Layers / Channels / Paths. think of Layers as art layers, Channels as alpha layers and Paths as path layers.

click that Channels tab and you can see the various color channels in the image. at the bottom you can make new layers just like in the Layers palette. just paint away (greyscale only) and anything white will show up opaque, black will be transparent and greys will be partly transparent. most of the regular tools work in there.

another thing you can do is make selections in the Layers palette then switch to the Channels palette where you'll still have the same selections. if you can select all of your shirt art in Layers then switch to Channels there will be a button at the bottom like a box with a circle in it. click that and it will make a channel out of your selection. nice and easy.

second question: the liquify tool is pretty good but you can also use the clone tool, various selection transforms (select something then control-t) or even plain old cut and paste. it's hard to say "this is how to do it" cause there are a million methods for different situations. sounds like you got the basic idea tho.

hope this helps.
Shanelle LaFollette
Female Butterfly
Join date: 5 May 2004
Posts: 9
02-22-2005 16:40
Thanks for the quick reply. I think I've kind of understood most things already. My main concern is how I can make a layer mask or alpha channel so that it makes a certain color range transparent. If I could make all colors around white transparent it would be really nice. Any way to make a layer mask that hides certain color ranges of a texture?

Thanks,
Shanelle.
Zuzi Martinez
goth dachshund
Join date: 4 Sep 2004
Posts: 1,860
02-22-2005 20:29
ah ha i think i see what you're asking. ok to do that in Photoshop get your image how you like it and make sure the layer with the things you want to become transparent is selected. then go to Select > Color Range and play around with it to get what you want selected. might take some trial and error. once you have your selection go to the Channels palette and hit that button at the bottom that looks like a box with a circle in it. there's your transparent color range.

if you have the things you want to be transparent spread out over several layers then it might help to flatten the image first. then when you have the alpha channel made just copy it all, Undo your way back to before you flattened and paste it into a new Channel.
Shanelle LaFollette
Female Butterfly
Join date: 5 May 2004
Posts: 9
02-23-2005 08:00
Thanks for your explanations :) They were really helpfull, especially since I knew all things but didn't connect them to a working method :(

I have a followup question: If I use the color range selection tool, some pixels are not selected completely, but maybe 20%. This doesn't show as selection and gives a warning message if all of the selection is less than 100%. So, is there a way to select everything to 100% which is selected, but not fully selected? The pixcels which are not selected entirely are showing as semi-transparent if you copy the selection to a new area.

Thanks,
Shanelle.
Zuzi Martinez
goth dachshund
Join date: 4 Sep 2004
Posts: 1,860
02-23-2005 14:23
i'm not completely sure what you're asking in the last post but if you mean is there a way to make the whole color range have the same transparency instead of being for example in the red color range light pink is transparent and dark red is opaque.....we can do that.

try playing with the Fuzziness slider in the Color Range selection window and see if that does what you want. if not then go ahead and select the color range like before, make it an alpha channel like before but don't get rid of the selection at that point. click on the Channel you just made and then in the tools palette select white as your background color. hit delete until the partly transparent areas are as solid as you want.

that actually makes the selected area white for opaque so if you want it transparent you'll have to unselect and then invert the channel (control-I). or you can start with a new channel instead of clicking the square with a circle in it, fill it with white then make black your background color and hit delete until everything in the selection is black.

i'm kinda at the end of what i can do without knowing exactly what you're trying so if this doesn't answer your questions it might help if you post a pic of your image.
Chip Midnight
ate my baby!
Join date: 1 May 2003
Posts: 10,231
02-23-2005 15:52
From: Shanelle LaFollette
I have a followup question: If I use the color range selection tool, some pixels are not selected completely, but maybe 20%. This doesn't show as selection and gives a warning message if all of the selection is less than 100%. So, is there a way to select everything to 100% which is selected, but not fully selected? The pixcels which are not selected entirely are showing as semi-transparent if you copy the selection to a new area.


An easy way to fix partial transparency problems like that is to do a contrast adjustment on the alpha channel. Go to the channels palette. Select your alpha channel. God to Image/Adjustments/Levels. On the slider underneath the histogram take the whitepoint marker (the little triangle on the right) and move it left a bit so that gray areas that weren't quite white become white. Hope that makes sense :)
_____________________

My other hobby:
www.live365.com/stations/chip_midnight
Shanelle LaFollette
Female Butterfly
Join date: 5 May 2004
Posts: 9
02-23-2005 17:38
From: Chip Midnight
An easy way to fix partial transparency problems like that is to do a contrast adjustment on the alpha channel. Go to the channels palette. Select your alpha channel. God to Image/Adjustments/Levels. On the slider underneath the histogram take the whitepoint marker (the little triangle on the right) and move it left a bit so that gray areas that weren't quite white become white. Hope that makes sense :)


Thanks! That absolutely did the trick *jump happily*. Basically I'm working with a layer mask (I dislike the alpha channel somhow, I like the layer mask better :) They are pretty much the same, or do I miss something important here?) Then I selected by color, made a mask of it and selected this mask before I did the levels thing. I then could modify the mask as I liked. Unfortunately I didn't see what changed except in this tiny little image in the layers dialog. So ... last question (I hope ^-^): Is there a way to display the layer mask in the main window? In Gimp this is possible I think ...

Thanks to you two! :)
Shanelle.
Chip Midnight
ate my baby!
Join date: 1 May 2003
Posts: 10,231
02-23-2005 21:16
From: Shanelle LaFollette
Thanks! That absolutely did the trick *jump happily*. Basically I'm working with a layer mask (I dislike the alpha channel somhow, I like the layer mask better :) They are pretty much the same, or do I miss something important here?)


Nope :) You're not missing a thing. An alpha channel and a layer mask are exactly the same thing. You only get one alpha channel but you can use as many layer masks as you have layers. When you save out to a 32bit TGA your masks will all get combined to make the final alpha. Using layer masks gives you much more flexibility.

From: someone
Is there a way to display the layer mask in the main window? In Gimp this is possible I think ...


You can display any channel in the main window and paint directly on it. In order to do this with a layer mask, go to the channels palette. For each layer mask you'll have a channel. It'll be named "layer 2 mask" and so on, depending on the layer name. Turn off visibility of all the other channels (turn off the eye icon for the RGB channel, and for any saved selections). You now have just the layer mask in the main window and can use any of the paint tools on it :)
_____________________

My other hobby:
www.live365.com/stations/chip_midnight
Zuzi Martinez
goth dachshund
Join date: 4 Sep 2004
Posts: 1,860
02-24-2005 03:54
i learned something too. thanks Chip. :D

on a related note how could human beings have made photoshop? it's so stinking complicated and features combine in a million different ways. i've been using it professionally for 10 damn years and i still learn amazing new things about it at least once a week. i think it was made by really artistic aliens.
Shanelle LaFollette
Female Butterfly
Join date: 5 May 2004
Posts: 9
02-24-2005 05:24
From: Zuzi Martinez
i learned something too. thanks Chip. :D

on a related note how could human beings have made photoshop? it's so stinking complicated and features combine in a million different ways. i've been using it professionally for 10 damn years and i still learn amazing new things about it at least once a week. i think it was made by really artistic aliens.

That's my feeling too. Fortunately Chip obviously knows his way around and since he's a slacker (at least his profile says so ^-^) he has time to explain all the nifty features ;) (Thanks Chip!)

A happy
Shanelle.
Zuzi Martinez
goth dachshund
Join date: 4 Sep 2004
Posts: 1,860
02-24-2005 05:55
there's only one explanation......Chip's an alien. :eek:
Chip Midnight
ate my baby!
Join date: 1 May 2003
Posts: 10,231
02-24-2005 06:23
From: Zuzi Martinez
there's only one explanation......Chip's an alien. :eek:


hehehe, it's true! Actually Photoshop is really simple compared to 3ds max which is the other graphics app I make my living with. If I ever learn all of that one I think my brain will explode.
_____________________

My other hobby:
www.live365.com/stations/chip_midnight
Shanelle LaFollette
Female Butterfly
Join date: 5 May 2004
Posts: 9
02-24-2005 07:26
From: Chip Midnight
hehehe, it's true! Actually Photoshop is really simple compared to 3ds max which is the other graphics app I make my living with. If I ever learn all of that one I think my brain will explode.

I used it too, but whenever I want to create something I already forgot again how it is done :-) I could repeat the tutorials infinitely like that :(