Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

prim transparency issues

Charlotte Morellet
Registered User
Join date: 14 Aug 2006
Posts: 64
10-03-2006 20:05
I thought i understood this whole transparency thing. i have no trouble with alpha channels when making clothing using UV templates and have been able to do some very nice things with it.

But whenever i try to use alpha channels on a texture to be placed on a prim. it all goes awry. and i am doing nothing differently. I get the dreaded white lines around the bottom edge of the prim. as shown in the attached picture. Whats the trick to avoid this? i am sure it is something completely silly i just havent thought of yet. I read through the alpha sticky and didnt really see anything that applied. maybe i missed it?

thanks




EDIT:

While i am at it. i have noticed another weird thing. I have a hollow prim, with a texture that has a little bit of transparency on the bottom, and yet the entire thing is see through from certain angles. in the picture below, i filled the inside of the prim in hot pink so you can see how the underside shows through. shouldnt it be solid? i am utterly confused.

Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
10-03-2006 20:37
From: Charlotte Morellet
whenever i try to use alpha channels on a texture to be placed on a prim. it all goes awry. and i am doing nothing differently. I get the dreaded white lines around the bottom edge of the prim. as shown in the attached picture. Whats the trick to avoid this? i am sure it is something completely silly i just havent thought of yet. I read through the alpha sticky and didnt really see anything that applied. maybe i missed it?

What you're seeing is due to a bug in the way SL wraps textures around prims. Sometimes the top edge of the texture gets repeated across the bottom of the prim (or vise versa, or side to side). To solve the problem, change the vertical repeats per face from 1.0 down to about 0.95 or so. That should be enough to hide the edge.


From: Charlotte Morellet
While i am at it. i have noticed another weird thing. I have a hollow prim, with a texture that has a little bit of transparency on the bottom, and yet the entire thing is see through from certain angles. in the picture below, i filled the inside of the prim in hot pink so you can see how the underside shows through. shouldnt it be solid? i am utterly confused.

What you're seeing there is the infamous alpha sorting glitch. It's an issue in nearly all OpenGL applications, including all video games and most 3D modeling programs. When two surfaces with 32-bit textures overlap in close proximity, the renderer has trouble determining which one to draw first, and the visual result is that part or all of both surfaces appear to change places with respect to their distance from the camera as the camera moves around.

The glitch is so common that certain objects like trees, fire, flowers, etc., are often deliberately built to take advantage of it. It makes those things easier to build in some ways, but it makes many other types of objects nearly impossible. The credo of most professional game artists in relation to dealing with alpha sorting is "we avoid it all costs".

To solve the skirt problem, I'd recommend using two prims instead of one to form the cone. The top one will constitute the bulk of the skirt, and will have a 24-bit texture on it. The bottom one will make up just the frilly part at the bottom, with the 32-bit frill texture on the outside, and a completely transparent texture on the inside. You won't have any frill visible on the inside that way, which is a slight drawback, but you also won't have to worry about the inside showing through at all.
_____________________
.

Land now available for rent in Indigo. Low rates. Quiet, low-lag mainland sim with good neighbors. IM me in-world if you're interested.
Charlotte Morellet
Registered User
Join date: 14 Aug 2006
Posts: 64
10-03-2006 20:41
thanks a bunch, chosen. good to know my issues arent completely due to my inability to texture things. hah!