Alpha textures question - SLUniverse Forums
sluniverse logo SLUNIVERSE


Go Back   SLUniverse Forums > Development Discussion and Support > Content Creation

Content Creation Discuss building, scripting, and other forms of content creation for SL.

Reply
Old 10-06-2008, 11:40 AM   #1 (permalink)
neko boy
 
Matty Luminos's Avatar
will strip for fish
 
Join Date: May 2008
Location: UK
Posts: 219
SL Join Date: Oct 5, 2006
Business: Chaos Cat
Blog Entries: 1

My Mood:

Alpha textures question

Question for Paintshop pro or Photoshop users.

When I make something with an alpha texture (ie a tattoo) I end up with a hazy white halo round it. Its not actually white, it's various shades of grey from where the foreground merged with the background. How do I get rid of this halo without cutting out all the detail? I tried cropping it out with a higher tolerance but that made all the tips of the pattern disappear.
__________________
meow.
Matty Luminos is offline   Reply With Quote
Old 10-06-2008, 11:48 AM   #2 (permalink)
exp(ln(Gearhead))
 
Aodhan McDunnough's Avatar
lim as x->0 of Geek/x
 
Join Date: Jun 2007
Location: Philippines
Posts: 3,732
SL Join Date: March 28, 2006
Business: Aodhan's Forge
SLShopper Ads: 2

My Mood:

Not sure if this fixes it, but ordinarily when I make something that has an alpha channel, I bleed the design (manually) to extend beyond the alpha's edges.

The safest way to do this is to put a blank layer under your design then paint the "bleed" on that. This way the design won't get messed up even if you mess up. Starting over is as simple as blanking out that layer.
__________________

We can't get rid of Landbots but we can stop the damage.
VOTE this proposal on the Jira.
Current votes: 71

http://jira.secondlife.com/browse/VWR-2905

Kontours Classic 1-prim chair. Sculpted, menu controlled
http://www.sluniverse.com/php/shop/s...ct=786&cat=500
Aodhan McDunnough is offline   Reply With Quote
Old 10-06-2008, 11:55 AM   #3 (permalink)
Mad Artist
 
Miriel Enfield's Avatar
 
Join Date: Sep 2007
Posts: 1,083
Business: Miriel
SLShopper Ads: 2

The while halo is caused (typically) by antialiasing. When the pixels on the edge of your design don't entirely cover the white (or whatever) background, they end up a grayish (or whatever) color. If you base your alpha channel straight on your design, these pixels won't be left entirely opaque, but they will be visible. Hence the halo.

The solution is to, as Aodhan said, extend your design beyond the edges of the opaque region. For many things, you can do this manually. For more complicated things, there's a free plugin called Solidify that will extend it for you.
__________________
Miriel: Jewelry, eyes, shapes, and a couple of hairstyles. Oh, and a pretty forest. And a treasure hunt.
3.5 on the Internationally Recognized Trout Recreant Scale of Slutwatoosi.

"Blender is the Pai Mae of 3d programs. It hates newbies, despises windows users, and has nothing but contempt for English speakers. It will let you learn, but mostly because doing so will give Blender a chance to amuse itself by making you suffer."
- Twenty Sided
Miriel Enfield is offline   Reply With Quote
Old 10-06-2008, 11:59 AM   #4 (permalink)
Invisibly Delicious
 
MoxZ Mokeev's Avatar
Wewtie! I has Two Ghosties
 
Join Date: Jun 2008
Location: Arkansas USA
Posts: 387
SL Join Date: 8/25/07

My Mood:

I plucked this from over at the official forums - by Chosen Few
I bolded the method I use at the bottom of this answer. Also for the complete rundown about transparencies, see this post at the O Forums.

SL Forums

Why do I see a white halo around my partially transparent images in SL?


This is a very common problem caused by what’s know as anti-aliasing, which is the computer’s way of smoothing the appearance jagged edges by combining colors along diagonals or curves lines. Just like with any other image element, the pixels where black meets white in alpha channels get anti-aliased so that they appear to blend smoothly together. This anti-aliasing results in gray pixels, which end up translating to a semi-transparent outline around the opaque parts of the image.

How this results in a white halo is pretty simple. If there’s white space (or blank space) surrounding the opaque parts of your image, those anti-aliased, semi-transparent edge pixels end up combining their coloring with the white around them. They become so lightened by the process that they appear to be a halo.

The way to avoid the halo ranges from very, very simple to slightly complicated. The simplest thing to do is just to give your images a dark background. Technically this gives you a dark halo instead of a light one, but dark halos are usually undetectable in SL. Most of my tutorials include this method, since it’s the easiest to explain, and the most universally applicable for all situations.

Other methods include bleeding the coloring of the opaque areas into the transparent areas. This is visually superior to the dark background method, but a little more complicated to do. Photoshop users may wish to view Robin Sojourner’s wonderful video tutorial at Using Photoshop CS2 to Make Alpha Transparency Maps for Second Life © Copyright Robin Wood 2005 , showing how she eliminates the halo by using a Gaussian blur filter. There are also 3rd party plug-ins for Photoshop that can be useful for this, my favorite of which is a filter from Flaming Pear called Solidify. At the time of this publication, Solidify is available for free on Flaming Pear’s website in their Free Plugins pachage. Flaming Pearownload
__________________
MoxZ Mokeev is offline   Reply With Quote
Old 10-06-2008, 12:05 PM   #5 (permalink)
neko boy
 
Matty Luminos's Avatar
will strip for fish
 
Join Date: May 2008
Location: UK
Posts: 219
SL Join Date: Oct 5, 2006
Business: Chaos Cat
Blog Entries: 1

My Mood:

Quote:
Originally Posted by MoxZ Mokeev View Post
Photoshop users may wish to view Robin Sojourner’s wonderful video tutorial at Using Photoshop CS2 to Make Alpha Transparency Maps for Second Life © Copyright Robin Wood 2005 , showing how she eliminates the halo by using a Gaussian blur filter. There are also 3rd party plug-ins for Photoshop that can be useful for this, my favorite of which is a filter from Flaming Pear called Solidify. At the time of this publication, Solidify is available for free on Flaming Pear’s website in their Free Plugins pachage. Flaming Pearownload
I'm using Paintshop Pro so I'm presuming these Photoshop plugins won't work on it. Is there anything similar for Paintshop Pro?

And, I really don't understand the "bleeding" thing at all. If I'm extending the edge of the design how do I get my alpha channel to be where it should be?
Matty Luminos is offline   Reply With Quote
1 User Disagreed:
Old 10-06-2008, 12:08 PM   #6 (permalink)
exp(ln(Gearhead))
 
Aodhan McDunnough's Avatar
lim as x->0 of Geek/x
 
Join Date: Jun 2007
Location: Philippines
Posts: 3,732
SL Join Date: March 28, 2006
Business: Aodhan's Forge
SLShopper Ads: 2

My Mood:

Quote:
Originally Posted by Matty Luminos View Post
I'm using Paintshop Pro so I'm presuming these Photoshop plugins won't work on it. Is there anything similar for Paintshop Pro?

And, I really don't understand the "bleeding" thing at all. If I'm extending the edge of the design how do I get my alpha channel to be where it should be?
In other words.

Let's say you made a green circle. You make an alpha channel from that so you now have a white circle on a black background as the channel.

To bleed, you paint more green either on the green circle layer or on another layer below it. The end result is a green patch that's larger than the white (alpha) circle.

When you merge the two green layers you now have your pattern with additional bleed. The bleed will cover gaps between your design and its alpha channel.
Aodhan McDunnough is offline   Reply With Quote
Old 10-06-2008, 12:10 PM   #7 (permalink)
Punk Girl in Space
 
Penny Patton's Avatar
 
Join Date: Dec 2007
Posts: 305
SL Join Date: 11/30/2005

My Mood:

Are you using an actual alpha channel, or are you leaving parts of the image "transparent"?

If the latter, that's your problem right there. There's no real way to get around the halo effect if you rely on that sort of image transparency. I haven't used Paint Shop Pro in years, so I don't know if you're able to simply edit the alpha channel itself. In Photoshop, the alpha channel is completely separate from the actual image layers, so you can extend the image beyond where it becomes transparent, so it fades from opaque to transparent in the intended colour.
Penny Patton is offline   Reply With Quote
Old 10-06-2008, 12:21 PM   #8 (permalink)
Beachcomber
 
Karl Herber's Avatar
Blue
 
Join Date: Sep 2007
Location: Manchester, UK
Posts: 370
Blog Entries: 1

My Mood:

Quote:
Originally Posted by Matty Luminos View Post
And, I really don't understand the "bleeding" thing at all. If I'm extending the edge of the design how do I get my alpha channel to be where it should be?
Simple way - ideal for tattoos and other images which are dark round the edges.

1) Make your design and the alpha channel as normal.
2) Make another layer underneath your design and fill it with black.
3) Ensure both these layers are visible when you save the file.

More complex way - this is the "bleeding" thing.

2) make another layer underneath the design and paste in it a duplicate of your design. You'll need to push the design out only a couple of pixels all round which can usually be done fairly easily with the push tool in PSP. (you CAN do this on the main layer but its always better not to, in case you need to go back and change anything)

Making sure that background layer is visible when you save the file is really important, otherwise it'll assume "white" again.

If you get stuck I'll show you when I'm not at work
__________________
Horse Tales - and - Free For Men
Karl Herber is offline   Reply With Quote
1 User Agreed:
Old 10-06-2008, 12:29 PM   #9 (permalink)
Senior Member
 
io Kukulcan's Avatar
copa cabana
 
Join Date: Sep 2007
Location: SLC, UT
Posts: 924

My Mood:

Easiest way:

flatten your design against a black background, instead of a white background. that way the halo will be black, and look fine.
especially if you're making some sort of tribal or solid black tattoo, just have an all black image, or red, or purple, or whatever, and let the alpha channel do the design work.

Last edited by io Kukulcan; 10-06-2008 at 12:30 PM.. Reason: spelling
io Kukulcan is online now   Reply With Quote
Old 10-06-2008, 12:34 PM   #10 (permalink)
neko boy
 
Matty Luminos's Avatar
will strip for fish
 
Join Date: May 2008
Location: UK
Posts: 219
SL Join Date: Oct 5, 2006
Business: Chaos Cat
Blog Entries: 1

My Mood:

Quote:
Originally Posted by Karl Herber View Post
1) Make your design and the alpha channel as normal.
2) Make another layer underneath your design and fill it with black.
3) Ensure both these layers are visible when you save the file.
Karl I love you! That worked! Thankyou!

Matty Luminos is offline   Reply With Quote
Old 10-06-2008, 12:54 PM   #11 (permalink)
N. Señora de la Sangre
 
Mourna Biziou's Avatar
/reserved
 
Join Date: Jun 2007
Posts: 4,014
SLShopper Ads: 2

My Mood:

Just FYI, all of the Flaming Pear filters work with Paint Shop Pro, and Solidify is a godsend.

Save your alpha channel, then apply the filter. It's a godsend when you're working with something that doesn't look good bordered with just a solid black, as it picks up your image and smears it out to the edges.
__________________
Mourna Biziou is offline   Reply With Quote
1 User Said Thanks:
2 Users Agreed:
Old 10-06-2008, 01:24 PM   #12 (permalink)
Punk Girl in Space
 
Penny Patton's Avatar
 
Join Date: Dec 2007
Posts: 305
SL Join Date: 11/30/2005

My Mood:

Quote:
Originally Posted by io Kukulcan View Post
Easiest way:

flatten your design against a black background, instead of a white background. that way the halo will be black, and look fine.
especially if you're making some sort of tribal or solid black tattoo, just have an all black image, or red, or purple, or whatever, and let the alpha channel do the design work.
A black halo can be visible, especially when it appears over light colours, such as pale skin, though it's usually not quite as noticeable as the white halo. I tend to choose a colour that best blends with the alpha design as a whole for a quick and easy "falloff" colour.

Of course, I usually design the texture first, then add the alpha channel afterwards. So parts of the design tend to bleed off the edge of the visible area anyways.

If this is for something like a tribal tattoo, here's a bit of a design tip addressing a pet peeve of mine. Completely black tattoos (or shirts, gloves, etcetera) never look right. The reason for this is that in our day to day lives we generally never see anything that is pure black. It's always dark shades of grey, often with the slightest bit of colour of their own.

Wear a black shirt, you'll still see the wrinkles in the shirt. Get a black tattoo, you'll still see muscle tone and shading. For clothing, even something like black straps or something, I'd use a dark grey and be sure to include some texture shading. For a tattoo, I'd probably still make it a really dark grey, but also would make it slightly translucent.
Penny Patton is offline   Reply With Quote
Old 10-06-2008, 01:39 PM   #13 (permalink)
Senior Member
 
io Kukulcan's Avatar
copa cabana
 
Join Date: Sep 2007
Location: SLC, UT
Posts: 924

My Mood:

Quote:
Originally Posted by Penny Patton View Post
A black halo can be visible, especially when it appears over light colours, such as pale skin, though it's usually not quite as noticeable as the white halo. I tend to choose a colour that best blends with the alpha design as a whole for a quick and easy "falloff" colour.

Of course, I usually design the texture first, then add the alpha channel afterwards. So parts of the design tend to bleed off the edge of the visible area anyways.

If this is for something like a tribal tattoo, here's a bit of a design tip addressing a pet peeve of mine. Completely black tattoos (or shirts, gloves, etcetera) never look right. The reason for this is that in our day to day lives we generally never see anything that is pure black. It's always dark shades of grey, often with the slightest bit of colour of their own.

Wear a black shirt, you'll still see the wrinkles in the shirt. Get a black tattoo, you'll still see muscle tone and shading. For clothing, even something like black straps or something, I'd use a dark grey and be sure to include some texture shading. For a tattoo, I'd probably still make it a really dark grey, but also would make it slightly translucent.
I agree, I'm just so sick of solid 0,0,0 black tribal tattoos. That color doesn't exist in nature, well maybe in a black hole. But these tribal tatts, they're everywhere and I consider them a plague.

I flatten all my tattoos against a "skin" tone of some kind, usually I try to match the overall shade of the skin they're wearing and merge the tatt with that. And then I don't use a completely solid alpha white, let some of that skin shading show through your tatt. It makes all the difference.
io Kukulcan is online now   Reply With Quote
1 User Agreed:
Old 10-06-2008, 05:24 PM   #14 (permalink)
exp(ln(Gearhead))
 
Aodhan McDunnough's Avatar
lim as x->0 of Geek/x
 
Join Date: Jun 2007
Location: Philippines
Posts: 3,732
SL Join Date: March 28, 2006
Business: Aodhan's Forge
SLShopper Ads: 2

My Mood:

Quote:
Originally Posted by io Kukulcan View Post
I agree, I'm just so sick of solid 0,0,0 black tribal tattoos. That color doesn't exist in nature, well maybe in a black hole. But these tribal tatts, they're everywhere and I consider them a plague.
Henna tattoos come pretty close to 0,0,0 black. So you can laugh a bit because these tribal tat guys are wearing temporaries.

I may be picky about aesthetics of an av shape, but with colors I'm more lax. I wouldn't mind fluorescent tattoos.
Aodhan McDunnough is offline   Reply With Quote
Old 10-07-2008, 02:36 PM   #15 (permalink)
Doing stuff
 
WarKirby Magojiro's Avatar
Made new armor ^^
 
Join Date: Sep 2007
Location: Glasgow, Scotland
Posts: 2,608
SL Join Date: 14/10/2006
Business: MagoTek Industries
SLShopper Ads: 1

My Mood:

Simplest way I do this

1. Make a copy of the layer your image is on, and put it below.
2. Select the lower layer, and apply a gaussian blur to it. 5 pixels or so usually does the trick
3. Re-merge it with the upper layer, and your alpha channel should cut off the excess
__________________
Quote:
"Beware he who would deny you access to information, for in his heart he dreams
himself your master."
Quote:
Originally Posted by Winter Ventura View Post
If the person is too stupid to figure out that they should wear the burger, then you know what? Maybe they're too stupid to have one.
WarKirby Magojiro is offline   Reply With Quote
Old 10-09-2008, 09:07 AM   #16 (permalink)
neko boy
 
Matty Luminos's Avatar
will strip for fish
 
Join Date: May 2008
Location: UK
Posts: 219
SL Join Date: Oct 5, 2006
Business: Chaos Cat
Blog Entries: 1

My Mood:

Quote:
Originally Posted by WarKirby Magojiro View Post
Simplest way I do this

1. Make a copy of the layer your image is on, and put it below.
2. Select the lower layer, and apply a gaussian blur to it. 5 pixels or so usually does the trick
3. Re-merge it with the upper layer, and your alpha channel should cut off the excess
Ahah! I tried this technique and it works really well. Thank you!
Matty Luminos is offline   Reply With Quote
Old 10-09-2008, 04:34 PM   #17 (permalink)
Senior Member
 
io Kukulcan's Avatar
copa cabana
 
Join Date: Sep 2007
Location: SLC, UT
Posts: 924

My Mood:

Or you could duplicate the layer your design is on, put the Color Overlay filter on it, choose solid white, merge that with a solid black layer, and voila, alpha is done, and the anti-aliased pixels match perfectly.

I've been doing that since I started SL, and it works perfectly. Check out my tatts if you don't believe me.
io Kukulcan is online now   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


All times are GMT -5. The time now is 02:33 AM.
Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC7
vB.Sponsors Copyright 2008 SLUniverse.com / Hurricane Interactive.
All rights reserved.

Second Life(TM) and Linden Lab(TM) are trademarks or registered trademarks of Linden Research, Inc.
No infringement is intended.