Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Overlapping Prims, Flickering Textures

Kyrah Rosewood
Carpe Noctem
Join date: 26 Feb 2006
Posts: 21
05-08-2006 13:34
Whenever I overlap prims, which is necessary for some designs, the texture starts to flicker in those spots... or occasionally the prim becomes totally disoriented, disappearing or seeming to be at a different angle than it really is. I've also had this problem with 2 prims that are merely close to one another sometimes -- like trying to put a curtain up against a wall, I'll see the wall flicker through parts of it even if there is a meter between them and nothing is set to transparent. I don't really see this happening often with other people's designs so I'm wondering if there's something I can do to prevent it. Would be greatful for any help since it's been driving me crazy and I haven't come across any solutions yet!
Solar Ixtab
Seawolf Marine
Join date: 30 Dec 2004
Posts: 94
05-08-2006 14:13
Its called Z-clipping, and its when the surfaces of two prims are coplainer, and the engine cannot decide which surface to draw first. Offset the prims by 0.001 and it should go away.
_____________________
Despite our best efforts, something unexpected has gone wrong.
ed44 Gupte
Explorer (Retired)
Join date: 7 Oct 2005
Posts: 638
05-08-2006 16:31
I haven't a clue about this, but i noticed a picture almost disappeared in my textured house but showed ok in my minimalist noticeboard.. Maybe a clue?
Nepenthes Ixchel
Broadly Offended.
Join date: 6 Dec 2005
Posts: 696
05-08-2006 16:52
All 3D Engines have this issue, and it's up to the builders to avoid it occuring. Even professionals can screw up; A few days back as I replayed Half Life 2 I noticed a patch flickering on a wall.

To avoid this ensure that no two surfaces occupy the exact same space; as Solar said, offsetting a little is usually all that's needed. Note that the further the object is viewed from the greater the offset needed, as the engine starts using less precise calculations for greater distances. What looks OK up close may start flickering when you zoom out.

It can be annoying, but it's just something you need to live with in a 3D word. Every build you see in SL is affected by this, and we all had to learn to deal with it.
Kyrah Rosewood
Carpe Noctem
Join date: 26 Feb 2006
Posts: 21
05-09-2006 14:05
Thanks for the information :) I will tinker with my projects a bit and see if I can figure something out with the alignments!
CoyoteAngel Dimsum
Registered User
Join date: 26 Mar 2006
Posts: 124
05-14-2006 14:46
Is there a way to guarantee that the flickering will occur? I'd like to use it for a special effect, but so far have been unable to cause the "problem" except with other people's textures and objects.
Cottonteil Muromachi
Abominable
Join date: 2 Mar 2005
Posts: 1,071
05-14-2006 16:04
There are two problems here. One is the z-fluttering which occurs when surfaces are coplanar, while the other one is the alpha texture ordering where it doesn't know which alpha texture to display in front, so it looks like its popping in and out.

To circumvent z-fluttering is easy, since you just offset the surface as mentioned. Its interesting though, if the texture or colour is some dull grey, you won't see this artefact happening.

To circumvent the alpha texture ordering, there are a few conditions to prevent it.

i) Obvious one being distance between the two alpha textures, but most of the time we don't have this luxury. It takes about half a meter or so to stop it.

ii) Whether the two prims are intersecting each other. This is not the same as offsetting the surface. The prims must not touch each other even if they are set to invisible.

iii) Transparency setting. If both the prims are not touching each other and it still gets confused, set one texture more transparent than the other. Only needs to be a few percent difference. This also works when alpha texturing the insides and outsides of hollow tubes, such as when you're making a steel truss lattice.