Jump to content

Alpha glitch when only part of an object is fully transparent


You are about to reply to a thread that has been inactive for 4606 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

I'm having an issue texturing a mesh rotor I've made and I was hoping someone here could help :)

Part of the object is supposed to be fully opaque, the other part fully transparent. For some reason however, transparency starts "bleeding" from certain angles, angles where you're only supposed to see the fully opaque part of the object.

 

This is the mesh object with a default plywood texture applied. (Don't mind the odd shape. I need to rotate this object and due to SL's method of calculating object centers, this was the only reliable way.)

AlphaGlitch-1.jpg

 

When I apply my texture everything seems fine at first. The hexagonal part of the object is supposed to become completely transparent, the rest stays solid. For this particular test I used a TGA file with an alpha channel. Notice that, in the object's attributes, Transparency is set to 0. (So this can't account for the glitch you'll be noticing.)

AlphaGlitch-2.jpg

 

The problems start when I turn my camera. When looking at the object from the side, I see small "glitchy" areas, where transparency appears to be leaking through. Mind you, this area of the object (the three blades) is supposed to be fully opaque. The corresponding part in the TGA file's alpha channel is solidly white. I would perhaps understand glitching if I was viewing several (semi-)transparent objects placed in a row, but that is not the case here. (Also important to note: the background wall is completely opaque as well.)

AlphaGlitch-3.jpg

 

Is this a known glitch or am I doing something terribly wrong here? I've tried with both PNG files and 32-bit TGA files, but the results are the same with either. I've used transparency on several projects in the past and I can't recall seeing this issue before.

Any help would be greatly appreciated :D

Link to comment
Share on other sites

When any part of a texture is transparent, the whole texture has an alpha channel and is subject to the alpha sorting problem. The solution is to use two separate materials, one for the visible parts and another for the transparent ones. These will become two faces in world and can be texturedindependently with a 24-bit (no alpha) texture for the visible parts, and with a completely transparent texture (e.g. default transparent) for the invisible parts.

  • Like 1
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 4606 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...