Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Stopping prims flickering thru other prims when you move away?

Piggie Paule
Registered User
Join date: 22 Jul 2008
Posts: 675
01-28-2009 14:15
Let me explain.

As for me, this kinda seems to have got worse, and am wondering if it's something I've done, or it's just that I notice it more now?

Say you have a nice thick big prim on the ground (let's say 10m x 10m x 1m thick) in exciting pine wood colour.

Then you make a carpet with a thickness of lets say 0.01m (no-one wants a CHUNKY carpet!)

You place the carpet on the base prim (bottom underside of carpet just touching the floor prim) and all looks great.

You fly up just a bit and.............

Oh, look. the carpet now shows flickering areas and I can see the floor thru it.

As I fly higher, it flickers more and I can see less and less of the carpet and more of the floow that's flickering thru it.

Seems that SL is having trouble remembering the carpet is ON TOP of the floor prim and starting to mix the two up.

The only sollution, make the carpet stupidly thick, or lift it away from the floor so as the raise the surface well away from the floor.



or................



Can I change a setting to improve the accuracy of rendering thin items close together as you move away?


Thanks :)
Rolig Loon
Not as dumb as I look
Join date: 22 Mar 2007
Posts: 2,482
01-28-2009 14:23
I responded to this question just a couple of days ago /8/97/304294/1.html. Rather than retype things, let me just paste the text in here again.....

From: Rolig Loon

This is probably the most common question in these forums, asked on average once a week it seems. You have rediscovered the alpha sorting problem that affects any environment based on OpenGL architecture. In simplest terms, when your graphics card has to deal with overlapping textures it follows a straightforward algorithm to determine which one is "in front" of the other one, and therefore which one occludes the other. When one texture is transparent and the other is opaque, the answer is trivial. When BOTH are transparent, the answer is impossible to determine. (In fact, in RL your own eyes would usually have a hard time figuring out which one of two sheets of glass is in front of the other one.)

Unfortunately, the problem extends to cases where both textures contain 32-bit pixels, even if the 8 bits that carry potential information about transparency aren't actually transparent. If two 32-bit textures are close together and overlapping, the system simply can't decide which one to display, so it flickers back and forth between them, depending on your viewing angle.

There is no cure. Avoid using 32-bit textures unless you really need them (they require 33% more memory than 24-bit textures anyway). If you need 32-bit textures for transparency, avoid overlapping them in close proximity.


For more information about alpha channels and transparency, read the sticky at the top of the Texture Tips forum. Good luck! :)
Ceera Murakami
Texture Artist / Builder
Join date: 9 Sep 2005
Posts: 7,750
01-28-2009 14:24
Rolig, even with 24-bit textures, the problem the OP is citing can happen. It's an LOD problem, not the alpha-sort glitch.

You have two obvious options. Make the rug thicker, or make the floor it is on thicker.

As you back off, the LOD for both prims changes. What was a sufficent difference in Z-height when you were at floor level may not be sufficent when you get 20 M above the floor.

There's also one non-obvious answer. Re-texture the floor prim, or replace a floor prim with the rug itself.

Instead of putting a 0.02 M thick rug on a 0.5 M thick floor, rearrange the floor prims to leave a rug-sized hole, and make the rug as thick as the floor. Texture the bottom of the rug to match the ceiling below, if needed.

Or make the floor prim(s) under the rug half as thick, and make the rug just a hair more than half the thickness of the floor prim, and set into the hole.
_____________________
Sorry, LL won't let me tell you where I sell my textures and where I offer my services as a sim builder. Ask me in-world.
Briana Dawson
Attach to Mouth
Join date: 23 Sep 2003
Posts: 5,855
01-28-2009 14:24
From: Piggie Paule


Can I change a setting to improve the accuracy of rendering thin items close together as you move away?


Thanks :)

But everyone else would still experience the flicker.

I noticed that Z-flicker really depends on the setting of each persons computer because i have had an item rezzed and 2 different people saw 2 different things - one saw z-flicker, the other saw none.
_____________________
WooT
------------------------------

http://www.secondcitizen.net/Forum/
Piggie Paule
Registered User
Join date: 22 Jul 2008
Posts: 675
01-28-2009 14:31
From: Rolig Loon
I responded to this question just a couple of days ago /8/97/304294/1.html. Rather than retype things, let me just paste the text in here again.....



For more information about alpha channels and transparency, read the sticky at the top of the Texture Tips forum. Good luck! :)


No No... I know about the HORRID Transparancy issue (which for me is the BIGGEST bug bear in SL bar none) The amount of times I'd had to remove something I want to put somewhere as I end up with half of it looking like it's inside the house and the other outside the house is so many.

Just the other day I bought a lovely scupltie chandelier (sp) and I can't use it as the windows behind it are often in front of it.

But, no. It's not THIS horrid problem.

It's solid thin prims flickering thru other prims as you move away.
Rolig Loon
Not as dumb as I look
Join date: 22 Mar 2007
Posts: 2,482
01-28-2009 14:35
Right, Ceera. That IS a good possibility. Thanks. ;)

It's also worth mentioning that if alpha sorting were the problem (and it still might be, so the OP really ought to check the textures on the floor AND the carpet to see), you couldn't assume that you could avoid it by using PNG textures instead of TGA ones. It isn't the presence of an alpha channel that makes the difference, it's the fact that the images are 32-bit rather than 24-bit. When you save a TGA file with an alpha channel, it is automatically 32-bit. You can also save a PNG file as 32-bit, however -- sometimes without meaning to.
Piggie Paule
Registered User
Join date: 22 Jul 2008
Posts: 675
01-28-2009 14:40
From: Rolig Loon
Right, Ceera. That IS a good possibility. Thanks. ;)

It's also worth mentioning that if alpha sorting were the problem (and it still might be, so the OP really ought to check the textures on the floor AND the carpet to see), you couldn't assume that you could avoid it by using PNG textures instead of TGA ones. It isn't the presence of an alpha channel that makes the difference, it's the fact that the images are 32-bit rather than 24-bit. When you save a TGA file with an alpha channel, it is automatically 32-bit. You can also save a PNG file as 32-bit, however -- sometimes without meaning to.


he he... No it's not the alpha problem

I upload TGA's in 24-bit, and have been using jpegs in the past and this also happens with bought items (just a plain rug from a shop)

the rug on the floor was just an example. Also say if you have a thin screen on a TV (you don't want it thick sticking out the front) but walk away and it starts to flicker and the what's behind start showing thru.

I know I adjusted a setting to make sculpties render better at distance. Is there and debug setting for this issue also?
Ceera Murakami
Texture Artist / Builder
Join date: 9 Sep 2005
Posts: 7,750
01-28-2009 14:40
I had this precise problem with the floor of the Rutgers Student Center, in the "Ruce 4" sim.

On the patio was a concrete texture. Inside the store was a wood floor texture, and the entry way is carpeted. All three textures are 24 bit, I am certain.

The only way to get the three textures so they never flickered was to reshape the floor prims so they didn't overlap at all, and so the tops of the prims could have the appropriate textures on them. The entry is one prim, topped wih carpet. The courtyard is several prims, topped wih concrete. And the odd-shaped floor inside is several prims, topped with wood floor texture. At no point to any of them overlap, though I could have saved many prims if the carpet in the entry could have overlapped the wood and stone floor sections.

With something like the TV example, you simply have to move it further from the wall.
_____________________
Sorry, LL won't let me tell you where I sell my textures and where I offer my services as a sim builder. Ask me in-world.
Yingzi Xue
Registered User
Join date: 11 Jun 2008
Posts: 144
01-28-2009 14:49
Just like a prim with a round edge will roughen when you move a few meters away, so also do all prims. The farther away you get the level of detail is reduced so that your computer can display things in the distance. If everything stayed the same detail it would bog down your computer. The only way to fix the problem is to make flickering faces of the prims a few thenths farther from each other, either by making one thicker or moving it farther away.
Piggie Paule
Registered User
Join date: 22 Jul 2008
Posts: 675
01-28-2009 14:51
From: Ceera Murakami
I had this precise problem with the floor of the Rutgers Student Center, in the "Ruce 4" sim.

On the patio was a concrete texture. Inside the store was a wood floor texture, and the entry way is carpeted. All three textures are 24 bit, I am certain.

The only way to get the three textures so they never flickered was to reshape the floor prims so they didn't overlap at all, and so the tops of the prims could have the appropriate textures on them. The entry is one prim, topped wih carpet. The courtyard is several prims, topped wih concrete. And the odd-shaped floor inside is several prims, topped with wood floor texture. At no point to any of them overlap, though I could have saved many prims if the carpet in the entry could have overlapped the wood and stone floor sections.

With something like the TV example, you simply have to move it further from the wall.


Interesting sollution but a dramatic one... :)

I'm kinda hoping there might be a tweak.

Sometimes what you suggest would be fine, othertimes less so.
Piggie Paule
Registered User
Join date: 22 Jul 2008
Posts: 675
01-28-2009 14:52
From: Yingzi Xue
Just like a prim with a round edge will roughen when you move a few meters away, so also do all prims. The farther away you get the level of detail is reduced so that your computer can display things in the distance. If everything stayed the same detail it would bog down your computer. The only way to fix the problem is to make flickering faces of the prims a few thenths farther from each other, either by making one thicker or moving it farther away.


Yes, but sometimes it's just not practical to do this.

Hence my question.......

:)
Rolig Loon
Not as dumb as I look
Join date: 22 Mar 2007
Posts: 2,482
01-28-2009 14:57
Ah! That's nice, Ceera. I haven't had that problem myself (I think), but now that you describe your solution it strikes me that I have often made fat rugs and sunk them into the floor. Dumb luck.

Thanks. I learned something today. ;)
Aminom Marvin
Registered User
Join date: 31 Dec 2006
Posts: 520
01-28-2009 22:06
Keep in mind that this "Z-flutter" problem gets worse with altitude. The problem is that the higher you get, the more imprecise SL is about positions of things. At 4000 meters this is extremely noticeable. So, if you have a skybox, have it as close to the ground as is practical.