Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Problem with layers of prims

Malachi Conover
Registered User
Join date: 6 Jun 2006
Posts: 4
09-16-2006 17:55
I'm trying to make an object with multiple 2d layers that are .01 thin. When layered on top of eachother, different layers of the stack diseappear behind others when views at different angles.

How can I fix this problem, or is it just a failure in the SL engine?
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
09-16-2006 18:29
Sounds like you're experiencing alpha sorting issues. This phenomenon is common to most OpenGL applications, including all video games, and most 3D modeling programs. When two or more surfaces with 32-bit textures overlap eachother in close proximity, the renderer has trouble determining which one to draw first. As a result, surfaces appear to change position relative to eachother as the camera moves, to cancel eachother out, or to display a whole host of other seemingly strange behavior. (I say "seemingly strange" because while to the untrained eye, it all seems pretty bizarre at first, it actually is quite predictable once you understand the mechanics of what's happening.)

Anyway, the only way to avoid the problem is to avoid the cause. Most proffessional game artists will tell you that as a rule the way they deal with alpha sorting is simply to steer clear of it by deliberately not building objects like the kind you're talking about. Never use 32-bit textures unless you actually need transparency, and when you do use them, make sure they don't overlap.

For more information on alpha sorting, see the transparency guide, stickied at the top of the texturing forum.
_____________________
.

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.
Mia Winthorpe
Pirttihirmu
Join date: 2 Apr 2006
Posts: 128
09-21-2006 05:53
I have noticed the same happen with non-alpha textures as well. It's one of our new pets (bugs), caused by texture overlapping. I hope they'll fix it, tho I wouldn't be counting on it :rolleyes:
_____________________
*~Mia~*

That which doesn't kill you, makes you stronger.
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
09-21-2006 07:09
Applying transparency via the texture tab inworld has the same effect as putting an alpha channel in the texture itself. Is that what you're seeing, Mia?
_____________________
.

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.
Psyra Extraordinaire
Corra Nacunda Chieftain
Join date: 24 Jul 2004
Posts: 1,533
09-21-2006 07:54
Make sure there's a bit of space between the surfaces, and they shouldn't flicker as badly.
_____________________
E-Mail Psyra at psyralbakor_at_yahoo_dot_com, Visit my Webpage at www.psyra.ca :)

Visit me in-world at the Avaria sims, in Grendel's Children! ^^
Ceera Murakami
Texture Artist / Builder
Join date: 9 Sep 2005
Posts: 7,750
09-21-2006 08:46
Some textures that appear not to have an alpha-channel are still saved as 32-bit TGA, and still suffer alpha sort issues. I read in another thread that there is one Linden rock texture that does this.

The best solution is to composite the textures in Photoshop, making your layers there, and then save a single 32-bit TGA for the object (or 24-bit, if the final result has no remaining transparent areas.

In short, virtually all 3D rendering apps that work in real-time suffer from this glitch, so it's best to just avoid layered alpha textures whee possible.

Placing textures at a slight angle to each other seems to at least make it consistent, depending on viewing angle. But the glitch is still there.
_____________________
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.
Mia Winthorpe
Pirttihirmu
Join date: 2 Apr 2006
Posts: 128
09-22-2006 01:14
From: Chosen Few
Applying transparency via the texture tab inworld has the same effect as putting an alpha channel in the texture itself. Is that what you're seeing, Mia?


Texturing building blocks with any texture... fabric, wood... (the age-old marble bug aside) produces a flickering between the seams, when you turn your camera angles. At some angles, it doesn't look transparent at all, all is well...then at certain angles... the transparency is not smooth, but flickering...once you see that texture, then you see the other texture. It's almost like disturbance on a tv feed.. Hard to explain if you haven't seen it...lol. I wish I had a picture to show.

Very simpliefied example: building a chair... make the base a box, then copy it to cylinder to make the seat...texture with fabric or wood, embedd it a little into the box... you can see the textures flickering where the cylinder is embedded into the box. With a path cut to cut out the part embedded into the box, no more flickering.

I hope that made some sense :p But like you said, I don't know if the textures have an alpha channel..they weren't made by me. If they do, that could indeed, be the problem.
_____________________
*~Mia~*

That which doesn't kill you, makes you stronger.
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
09-22-2006 08:43
Mia, I'm not sure I'm following your description (like you said, it's hard to know what you mean without seeing it), but if you do want to find out if the textures have alpha channels, there are two ways to do it:
  1. You could turn on Highlight Transparent. Press ctrl-alt-T, and all textures in view with alpha channels will turn red.

    OR

  2. You can call up the texture's properties. Select an object (or just a face of an object by using the Select Texture option on the editor) and then press ctrl-alt-shft-T. You'll see some green text pop up in your chat field, describing the object name, the texture dimensions, alpha if it has one, and the face number the texture is on. If you don't see it say alpha, then it's 24-bit.
_____________________
.

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.