Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Halo at bottom of texture?

Jamina Halberd
Registered User
Join date: 2 Jun 2008
Posts: 8
03-26-2009 22:39
Hi. I've been searching around for ways to get rid of the halo on a cape I've been working on - so far, I've managed to eliminate the halo around the edges of the object, but I've remained plagued with a halo at the very bottom and to the sides where there isn't supposed to be anything visible.

Here is a screenshot example of what I mean: http://www.shatteredmoonlight.com/images/temporary/halocape.jpg

How can I get rid of this? I'm using transparent PNGs made via Photoshop CS2.
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
03-26-2009 22:54
Most likely what you're seeing is the top of the texture tiling onto the bottom. Unfortunately, SL does not clamp textures at all. It tries to tile everything.

To mask the problem, set the repeats per face to slightly less than one. Usually .995 will do the job.
_____________________
.

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.
Jamina Halberd
Registered User
Join date: 2 Jun 2008
Posts: 8
03-27-2009 00:00
Hmm.. That helped for the vertical repeats, but it seems to always vaguely remain no matter how low I set the horizontal...
Osprey Therian
I want capslocklock
Join date: 6 Jul 2004
Posts: 5,049
03-27-2009 00:03
The prim needs to first be covered in transparent texture to get all the little edges, then put your cape texture on the outside and inside.

If you are already doing that offset your texture to move it down a bit.
Jamina Halberd
Registered User
Join date: 2 Jun 2008
Posts: 8
03-27-2009 00:51
I did apply a transparent texture first. I tried toggling with the vertical repeats and the vertical offset but it still always remains slightly there from certain angles.
Osprey Therian
I want capslocklock
Join date: 6 Jul 2004
Posts: 5,049
03-27-2009 00:57
You may need to remake the texture giving more of a transparent area between the jagged part and the bottom if you can't move it down.
Jamina Halberd
Registered User
Join date: 2 Jun 2008
Posts: 8
03-27-2009 01:56
I tried that. It's still very vaguely there from certain angles...
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
03-27-2009 08:38
Did you apply the black texture to to just the front and back sides of the prim, or did you apply it to the edge sides as well? You want a fully transparent texture on the edge sides.
_____________________
.

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.
Jamina Halberd
Registered User
Join date: 2 Jun 2008
Posts: 8
03-27-2009 10:01
Just the front and back. The top, sides and bottom are all transparent.

Another screenshot: http://www.shatteredmoonlight.com/images/temporary/halocape2.jpg

It's subtle, but for me at least it becomes really eyecatching when the cape's in motion... It doesn't seem to matter how much I mess with the texture options or tweak the texture itself it always seems to remain there.
Rolig Loon
Not as dumb as I look
Join date: 22 Mar 2007
Posts: 2,482
03-27-2009 10:20
It may just be me, but when I look at the screen shot you just posted, I don't see the white halo you are concerned about. The methods that others have been suggesting (fiddle with the scale of the texture to beat the tiling issue, use offsets judiciously, and apply transparency to the prim edges) are the standard ones that we generally use to fight this sort of halo. Perhaps you have done as much as you can at this point. If the halo is this subtle, you may have to just stop looking at it. Not to be too facetious, this reminds me of the old vaudeville joke .... "'Doctor, my arm hurts when I do this!' ... 'Well, then, don't do that.'" ;)

That's a lovely design, BTW.
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
03-27-2009 10:22
If you're sure the edge faces are transparent, and you're sure it's not a tiling issue, then I'm stumped for now.

Here's one thing you might want to try, just to be certain it's not a tiling problem. Frame your texture with a thick transparent border, maybe 50-100 pixels wide, depending on the texture size, all the way around. Apply it to the prims, and then reduce the repeats to hide the border. That' way, you'll be cutting off way more than just the tile-bleed area. If the problem goes away, then you know it was tiling that was the issue. If it persists, then you know for certain it's something else. Either way, it's worth the few minutes it would take to do the experiment.


ETA: Just to make sure we're all talking about the same thing, the "halo" you're talking about is those black streaks, not anything white, right?
_____________________
.

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.
Rolig Loon
Not as dumb as I look
Join date: 22 Mar 2007
Posts: 2,482
03-27-2009 10:32
Ah! It's the couple of tiny vertical black hairlines? Sorry, I was on a different planet. I was looking for a white halo. :o Are you sure that your alpha channel image is completely clean? Take a look to be sure that the area that's supposed to be transparent doesn't have any stray artifacts in it. Maybe it's not the edge of a prim that you're seeing, but something in the middle.

/me is grasping at straws......
Osprey Therian
I want capslocklock
Join date: 6 Jul 2004
Posts: 5,049
03-27-2009 12:41
Short of looking at the texture or file there's nothing I can do. Let me just say that it's an easily achievable thing, so I'm not sure what's wrong here.
Jamina Halberd
Registered User
Join date: 2 Jun 2008
Posts: 8
03-27-2009 14:25
Those black streaks, yes. I guess I'm not using the right term for them? ^^; And I'm not using TGA or manipulating alpha channels... It's just transparent PNG I've made in Photoshop CS2.

Anyway, I'm not sure what I was doing wrong with the texture options (I'm still very new at this, this is my first time making an avatar), but the transparent border seems to have, generally, worked. There's still a very faint line, but it's only noticeable when really close up - light enough that it's no longer a bother.

However, I've now run into a new problem upon putting it on: http://www.shatteredmoonlight.com/images/temporary/capemess.jpg

The yellow stripes seem to be blending through the body and showing through the back of the cape (Not due to gaps in the prims - I made sure of that). This only seems to be a problem when I'm actually wearing it and not when it's rezzed onto the ground...
Argent Stonecutter
Emergency Mustelid
Join date: 20 Sep 2005
Posts: 20,263
03-27-2009 14:39
Alpha layering problems. These are caused by the z-buffering algorithm used by SL. For some reason (hotly debated) it became much worse when Windlight was introduced.

There is no solution. :(
_____________________
Argent Stonecutter - http://globalcausalityviolation.blogspot.com/

"And now I'm going to show you something really cool."

Skyhook Station - http://xrl.us/skyhook23
Coonspiracy Store - http://xrl.us/coonstore
Rolig Loon
Not as dumb as I look
Join date: 22 Mar 2007
Posts: 2,482
03-27-2009 14:48
Congratulations. I'm glad to hear that the halo problem is minimized.

Your new problem is commonly referred to as the "alpha glitch." Basically, the problem is that when you have two 32-bit textures close to each other and in your line of sight, your video card can't figure out which one is supposed to be in front and therefore occluding the other one. "Alpha glitch" is an unfortunate term, because it's not necessarily an alpha channel that creates the problem per se. You are using PNG, for example, so it's not necessarily obvious that you might run into a problem with an alpha channel. So...... If you are using a 24-bit texture, you have three 8-bit channels that carry color information: R,G,B. If you use a 32-bit texture, SL interprets the information in the "extra" 8 bits as transparency data, whether you actually have transparency in your texture or not. It's the existence of data in those 8 bits that confuses your video card and creates the glitch.

In your case, you actually DO have transparency information there, because you needed it to shape the bottom edge of your cape. If that were not the case, I'd suggest simply saving your PNG texture as a 24-bit image. That would avoid the problem altogether. Since you need the transparency, that's not an option. Instead, you'll have to put a 24-bit texture between the two 32-bit textures that are causing the problem. Use a texture without transparency on the inside of the cape, for example, or wear a double layered cape.

As you wander around SL, keep an eye open for women wearing prim skirts that flicker or seem diaphanously transparent. It's a common issue. Sometimes it's a real pain that designers curse at but can't avoid, and sometimes it is used to advantage -- when the designer actually wants a shimmery effect. Either way, it's part of the design landscape we deal with. Welcome aboard. :rolleyes:
Jamina Halberd
Registered User
Join date: 2 Jun 2008
Posts: 8
03-28-2009 11:53
Oof, certainly not the answer I had hoped to hear... Is there anything being done to try to fix this glitch?

In any case, thank you all for your help, I very much appreciate it!
Osprey Therian
I want capslocklock
Join date: 6 Jul 2004
Posts: 5,049
03-28-2009 11:58
From: Jamina Halberd
Oof, certainly not the answer I had hoped to hear... Is there anything being done to try to fix this glitch?

In any case, thank you all for your help, I very much appreciate it!


It isn't a Second Life thing per se.
Argent Stonecutter
Emergency Mustelid
Join date: 20 Sep 2005
Posts: 20,263
03-28-2009 12:17
From: Jamina Halberd
Oof, certainly not the answer I had hoped to hear... Is there anything being done to try to fix this glitch?
No, the last major change to the rendering engine actually made it worse.

It's *not* just a second life thing, but it's not *not* a second life thing, since the old rendering engine handled it better there must be things they can do to improve it.
_____________________
Argent Stonecutter - http://globalcausalityviolation.blogspot.com/

"And now I'm going to show you something really cool."

Skyhook Station - http://xrl.us/skyhook23
Coonspiracy Store - http://xrl.us/coonstore
Rolig Loon
Not as dumb as I look
Join date: 22 Mar 2007
Posts: 2,482
03-28-2009 13:18
It's a feature of OpenGL architecture, which is used by SL and many other applications that do real-time rendering of images. Just for the heck of it, try Googling "alpha glitch" sometime. You'll see that many of the links that come up have nothing to do with SL.

The term "glitch" is a bit unfortunate in this context, because it isn't a "mistake," a flaw in the routine. Your brain has trouble with exactly the same problem that the graphics card using OpenGL does. Try placing two panes of glass in your line of sight. It's difficult to tell which one is in front because you can see both at the same time. You can move a little and gather more visual information to make up your mind, but sometimes the optical challenge is just too daunting. In a way, that's what your graphics card is doing when images flicker back and forth, placing first one and then the other in front. Without access to a lot more information and without a lot more computing power to handle it, your graphics card gets "fooled" by the optical illusion the same way your brain does.

Evidently there are some things that the LL wizards can do to minimize the challenge (or make it worse, obviously), but it's not going to disappear.
Argent Stonecutter
Emergency Mustelid
Join date: 20 Sep 2005
Posts: 20,263
03-28-2009 15:21
From: Rolig Loon
It's a feature of OpenGL architecture, which is used by SL and many other applications that do real-time rendering of images. Just for the heck of it, try Googling "alpha glitch" sometime. You'll see that many of the links that come up have nothing to do with SL.
I didn't say it was limited to Second Life. I said that it is a bigger problem in Second Life than it needs to be.

It's not "a feature of OpenGL" any more than it's "a feature of Second Life": it's a feature of ANY traditional rasterizer, whether the API in front of it is OpenGL, DirectX, Quickdraw 3d, or Joes Magic Rendering Tool. The only way to completely eliminate it is through ray-tracing... either through a fully ray-traced rendering process, or by using a raytracing pass to compute a perfect subdivision of the scene mesh before rendering it.
_____________________
Argent Stonecutter - http://globalcausalityviolation.blogspot.com/

"And now I'm going to show you something really cool."

Skyhook Station - http://xrl.us/skyhook23
Coonspiracy Store - http://xrl.us/coonstore
Rolig Loon
Not as dumb as I look
Join date: 22 Mar 2007
Posts: 2,482
03-28-2009 15:49
From: Argent Stonecutter
I didn't say it was limited to Second Life. I said that it is a bigger problem in Second Life than it needs to be.

It's not "a feature of OpenGL" any more than it's "a feature of Second Life": it's a feature of ANY traditional rasterizer, whether the API in front of it is OpenGL, DirectX, Quickdraw 3d, or Joes Magic Rendering Tool. The only way to completely eliminate it is through ray-tracing... either through a fully ray-traced rendering process, or by using a raytracing pass to compute a perfect subdivision of the scene mesh before rendering it.


True enough. And I didn't say it was a feature ONLY of OpenGL, either. :) My comment was simply meant to offer the OP a broader understanding of why it's not fair to think of the alpha glitch as something unique to SL. Your explanation adds a nice layer to mine. Until our computers develop the speed and memory to do ray tracing in real time, we're stuck with some form of the problem. That's not to say that SL couldn't do a better job of it.... ;)
Osprey Therian
I want capslocklock
Join date: 6 Jul 2004
Posts: 5,049
03-28-2009 15:51
We see it here more than in other places because all our things are made by us, not optimised by a company for their viewers. It isn't a terribly big deal. Once someone knows how it works they can harness its weirdness when appropriate and avoid it at other times.

I sort of like all the funny things we need to learn about. It makes life more interesting.
Argent Stonecutter
Emergency Mustelid
Join date: 20 Sep 2005
Posts: 20,263
03-28-2009 15:57
From: Rolig Loon
Until our computers develop the speed and memory to do ray tracing in real time, we're stuck with some form of the problem. That's not to say that SL couldn't do a better job of it.... ;)
Apparently modern graphic cards are fast enough that they could build dedicated "ray tracing units" like "GPU"s and do raytracing in real time, and have been for several years. But you'd need quite a different API to describe a scene effectively for raytracers, OpenGL and DirectX couldn't do it, so there's no demand, so nVidia and ATI don't build RTUs in their cards. The only company pushing raytracing for games is Intel, because they want everyone to have 8-core laptops with expensive Intel CPUs and liquid-metal cooling systems.

Edit: OK, I'm kidding about the liquid-metal cooling systems. I think.
_____________________
Argent Stonecutter - http://globalcausalityviolation.blogspot.com/

"And now I'm going to show you something really cool."

Skyhook Station - http://xrl.us/skyhook23
Coonspiracy Store - http://xrl.us/coonstore
Jamina Halberd
Registered User
Join date: 2 Jun 2008
Posts: 8
03-29-2009 01:14
Out of curiosity... how come the glitch only seems to occur when my avatar is actually wearing the cape? It's perfectly fine when I have it rezzed on the ground. Forgive me if it seems like a silly question, as I don't have any technical understanding of how computers actually work, but it doesn't really make sense to me.
1 2