History | Log In     View a printable version of the current page.  
  • All submissions to this site are governed by Second Life Project Contribution Agreement. By submitting patches and other information using this site, you acknowledge that you've read, understood, and agreed to those terms.
Issue Details (XML | Word | Printable)

Key: VWR-27
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Unassigned
Reporter: Crash Pointe
Votes: 193
Watchers: 55
Operations

If you were logged in you would be able to see more operations.
1. Second Life Viewer - VWR

Prim textures overlap strangely when transparent textures applied

Created: 13/Jan/07 06:52 AM   Updated: 29/Apr/08 03:29 AM
Component/s: Graphics
Affects Version/s: 1.13.1.5, 1.18.0, 1.18.1.2, 1.18.2.0, 1.18.3 Release Candidate, 1.18.3.5, 1.18.4 Release Candidate, 1.18.5.3, 1.19.0 Release Candidate, 1.19.0.5
Fix Version/s: None

File Attachments: 1. File 2007_11_03_002.bmp (2.25 Mb)
2. File BugSnap_001.bmp (5.49 Mb)

Image Attachments:

1. Issue - Transparency-render-1.jpg
(311 kb)

2. Issue - Transparency-render-2.jpg
(393 kb)

3. screenshot-1.jpg
(242 kb)

4. screenshot-2.jpg
(29 kb)

5. Skirt + Door = pants.jpg
(366 kb)

6. Snapshot1_001.jpg
(267 kb)

7. Snapshot1_002.jpg
(180 kb)

8. Snapshot1_003.jpg
(175 kb)

9. transparency-rendering-bug.jpg
(111 kb)

10. Z-Order bug example - view from dining room.jpg
(530 kb)
Issue Links:
Duplicate
 
Relates

Linden Lab Issue ID: SL-35044


 Description  « Hide
Simple example:

1. Create a flat cube prim.

2. Shift+drag a duplicate of this prim. Control+Z to center it with previous prim.

3. Rotate the new prim 90-degrees. Thus, creating a crossed (X-shaped) flat prim design. Typical design for creating basic trees, plants, etc.

4. Apply a full transparent texture onto both prims.

5. Select the front and back sides of each prim and apply a texture that is both opaque and transparent. Like a large leaf for example with transparent edges.

6. Rotate the camera around the creation and notice how the texture of one prim overlaps the texture of another prim in a undesirable way.

 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Lex Neva - 17/Jan/07 02:51 PM
I'm fairly certain that this is an issue with many 3d games. This problem has never been solved in a manner that is compatible with real-time rendering, and I believe that such a solution is generally considered impossible. There may be exceptions, such as the current First Look viewer with a new rendering pipeline that seems to at least solve this problem for the case where a hollow prim has a transparent texture on its hollow and outside faces. However, I don't think we'll see an actual universal solution for this problem for a long time, if ever.

Thygrrr Talaj - 18/Jan/07 03:32 AM
There are solutions, but they require additional subdivisions of geometry happening on the fly, client-side.

It is a "tough" problem, but not a "hard" problem. Give it some time and someone who has a clue about real time graphics and re-tessellation of prims and it can be fixed.

I think this should rather be high priority, though. It's a biggie with regards to graphics integrity.

Joshua Linden - 23/Jan/07 11:05 AM
Have you checked out the First Look viewer? Does it repro for you there?

Crash Pointe - 24/Jan/07 05:05 PM
Joshua, just tried it and it repros in First Look viewer as well.

Torley Linden - 13/Feb/07 09:56 AM
^ Great example of an issue which could benefit from an attached screenshot to help illustrate the point.

This sounds like Z-fighting? (If so, I see it @ my place in Grasmere because I'm very fond of transparencies.

Simon Nolan - 24/May/07 09:08 PM
I've linked in as related several other issues, that to me appear to be duplicates. VWR-203 has a different internal JIRA ID from this. Are these really different issues? VWR-455 appears to be an almost exact duplicate, so I've resolved that one. It does have screen shots of the problem, though.

Daedalus Young - 16/Jul/07 07:28 AM
Torley, it's not really Z-fighting, that occurs when 2 surfaces are on the same spot in 3D space (see http://en.wikipedia.org/wiki/Z-fighting).
This happens because the Z-buffer (which you can see if you go to Snapshot > Capture > Depth) doesn't allow transparent texturing. You can make it work in a lot of situations, but it breaks when several objects are both behind -and- in front of eachother (like a ring around a pole, the ring is behind the pole, but the pole is behind the ring). As Thygrrr said, it requires geometry subdivisions, divide the ring in 2 pieces, one piece behind the pole and one piece in front of it.

beq janus - 19/Jul/07 12:04 PM
VWR 824 was identified as a major issue, and resolved as a dupe of this. I have increased this to a major to reflect that.
My own justification for the uplift is that a complex textured build is ruined by this bug e.g. I have a door texture that has a transparency for the glass, the door leads onto a balcony which has a wrought iron textured railing (with transparency. The Z-ordering bug means that passers by do not get to see a balcony with a door but a jumble of prims fighting on their screen.

beq janus - 19/Jul/07 12:18 PM
I've added a snapshot of how I see this bug. I use transparencies all over the place and this bug hurts a lot.

The screenshot "Z-Order bug example" shows what at first glance may seem to be a normal screenshot. It is a view from my dining room through the partition doors across the Salon to the rear doors. As the screenshot shows, the rear door texture which is actaully on the back wall of my house appears to be in front of the partition doors and "in" my dining room. A representation worthy of M.C. Escher I think. The Salon is at least 5metres square, the textures both have transparencies and despite their disitnt separation in coordinate space all recent viewers have this problem. The only solution I have found is to waste precious prims on constructing prim doors and windows to avoid transparency, and that assumes you are happy not to have glazingin your doors and windows. Any workarounds that do not involve additional prim usage are most welcome.

Elaine Bennett - 30/Jul/07 11:53 PM
I am having the same problem and it drives be bonkers. I did notice that the only time *I* seem to see it is when I am on my own property. Perhaps I am interested in other things at other properties and just don't notice but maybge there is some truth to this and another clue provided. I hate what it does to my land as i look it over after I have worked so hard on it. I am sure others feel the same way.

bob wellman - 02/Aug/07 05:06 AM
I have noticed that this also occurs with 2 textures that do not appear transparent at all.
  
I had a book case with afreebie books texture and a wallpaper texture. Placed the book case in front of the wall with the wallpaper on and then changed the angle of view and the wallpaper was see instead of the books.

I chanege one of the textures and it stopped happening. So I Iooked at the textures in Gimp and they both have alpha channels even though it isnt neccessary for them to have. So I dont think its due to transparency itself but due to the alpha channel data overriding the other channels data in some way.

I dont know how occlusion works technicallly so I am stuck at this point but I hope this information helps in some way for those who do know.

[ Show » ] bob wellman - 02/Aug/07 05:01 AM I have noticed that this also occurs with 2 textures that do not appear transparent at all. I had a book case with afreebie books texture and a wallpaper texture. Placed the book case in front of the wall with the wallpaper on and then changed the angle of view and the wallpaper was see instead of the books. I chanege one of the textures and it stopped happening. So I Iooked at the textures in Gimp and they both have alpha channels even though it isnt neccessary for them to have. So I dont think its due to transparency itself but due to the alpha channel data overriding the other channels data in some way. I dont know how occlusion works technicallly so I am stuck at this point but I hope this information helps in some way for those who do know.

Metal Wombat - 05/Aug/07 10:34 PM
OK, this shows the issue - perhaps a bit more obviously. The "rug" below the furniture that is obviously rendered improperly (loveseat has no transparency in it at all) has some edges that have transparent alpha - to remove an unwanted tassled edge.

Daedalus Young - 17/Aug/07 06:54 AM
Bob: "So I Iooked at the textures in Gimp and they both have alpha channels even though it isnt neccessary for them to have. So I dont think its due to transparency itself but due to the alpha channel data overriding the other channels data in some way."

Correct, the renderer sees a texture has an alpha channel and from then the object is treated differently. When a texture has no need for an alpha, people should know how to not use it, it only takes up disk space and causes such problems.

psistorm ikura - 20/Aug/07 06:49 AM
voted for this issue, Im also experiencing this problem.
the issue clearly isnt limited to intersecting objects, like the screens show. Im getting similar issues, in some rare cases I get the windows of the neighbour´s house clipping in front of my walls when Im standing inside my house. this happens despite the two houses being about 20 meters apart at the "offending" place!

I acknowledge that intersecting objects require complex solutions, but objects which are obviously seperated should work fine. Ive yet to see a game with similar issues, to be honest.

Ann Otoole - 25/Aug/07 02:40 PM
the view angle seems to be a major factor. seems like the z order only works correctly in a 2D sense and only when viewed straight on. thus the alpha rendering appears to not exactly be 3D graphics programming. would love to see a fix for this. i don't like walls in my hair. bit by bit sl is returning to a no alpha no flexi world. soon everything will have to be default to render properly. including avatars.

Ayam Merlin - 27/Aug/07 10:21 AM
Additional screenshot that illustrates the problem well. The rug is on the floor BEHIND the window.

Ayam Merlin - 27/Aug/07 10:23 AM
Another screen shot that illustrated the problem well. The bamboo should appear in front of the railing and the water in the pond below should appear behind the railing.

mihai antwerp - 30/Aug/07 11:59 PM
This bug has been bothering me since the beginning of secondlife.. its impossible to have a plant in front of a textured window

Kevin Susenko - 13/Sep/07 02:45 AM
Updated version info to reflect this still happening in latest viewer.

Shoshana Epsilon - 13/Sep/07 03:12 PM
In this picture, I have a tree in the foreground that is semi-transparent. I have a window behind it, which is also semi-transparent. The tree appears BEHIND the windows, even though it is not.

Patrice Fierrens - 27/Sep/07 03:33 PM
I believe the same issue in hair using lots of alpha textures? As noted elsewhere, the issue does not appear when the avatar is facing south (here facing north).

beq janus - 19/Oct/07 05:16 PM
Updated version info to include latest pre-release and previous versions

Ilyara Tardis - 28/Oct/07 01:06 AM
This problem has been persistent since atleast v1.7. Though it's impact has become lessened in recent versions there are still moments where it can lead to atrocious graphic faults.

Haravikk Mistral - 01/Nov/07 04:37 AM
This problem is solvable, but as already noted it is a difficult one to do without hogging performance. It may be a good one to provide as an advanced graphics option; put the slider up and the rendering engine will use greater sub-divisions to solve transparency issues. At some point in the future computers may be fast enough to be able to keep this slider right up. Have it affected by LOD as well and lower-end users may be able to at least enjoy the advantage in non-laggy periods, but have it scale back to normal if things get too tough.

Alternatively just an on/off option, either you play without alpha sorting issues and take the performance hit, or you play with them at greater speeds. Could be a good option for snapshots as well, meaning snapshots will always come out perfect even if the game itself looks a bit iffy.

Ilyara Tardis - 01/Nov/07 07:42 AM
3D environments seven years ago had no problem with this bug and yet they ran stable on the midrange computers of that day. It's all about bugsquashing and optimizing the code.

Gigs Taggart - 01/Nov/07 09:51 PM
llyara:

7 years ago people used mask transparency usually, not partial alpha transparency. It's a crapload simpler to sort mask transparency right.

Ilyara Tardis - 01/Nov/07 10:44 PM
Can you name one 3D environment you have seen the last seven years that use alpha transparency that has experienced this type of z-ordering bug?

Haravikk Mistral - 02/Nov/07 01:58 AM
I've seen it in games using the Quake 3 engine, it's actually really easy to do. When you make a map just turn the compilation onto basic, all it will do is create the geometry and other essentials, but not do any pre-rendering. The alpha can actually screw up worse than SL's does.

The key thing to note is that most games from the last 7 years use pre-rendered scenes, and as a result are able to identify areas where these bugs may happen, and generates information which allows the game-engine to reduce or eliminate the issue when you come to play the game.

In SL the load from trying to do this would be HUGE, either on the simulator side or on the client side. All it takes is a single object to switch from opaque, to 50% transparency and your performance is fucked.

Xugu Madison - 03/Dec/07 07:13 AM
Wouldn't this be significantly improved by splitting prims into simpler parts as a matter of course, on the client side, before they're rendered? Break cubes into 6 planes, cylinders into 4 equal curves + top & bottom, etc.

Thinking specifically of "Issue - Transparency-render-1.jpg", if the cylinder was turned into 4 equal curves, I'm fairly certain that from every angle alpha sorting should work correctly.

It's not a complete solution, but should work well until we can get real time raytracing clients!

Daedalus Young - 03/Dec/07 05:56 PM
Yes, Xugu, that's basically also what Thygrrr Talaj is saying in the 2nd comment here. ;)
Afaik, as simple cube in SL already consists of 56 vertices (rather than the minimum 8) (each cube face has 18 mesh faces) (at least that's what wireframe mode shows), so maybe a crude subdivision per face could help, but I'm worried this will cost far too much (often already too low) framerate.

katastrafee darkstone - 05/Dec/07 11:28 PM
I'm having the same issue.. i'd love to see it resolved..

JetZep Zabelin - 06/Dec/07 11:23 AM
This old bug makes a lot of design ideas impossible.

Xugu Madison - 08/Dec/07 02:31 AM
Sorry, my first thought on how to solve this was based on detecting this problem, and then solving it. Hadn't occurred until later that just subdividing as a matter of course would help.

So, best algorithm idea I've had so far:

1. Find furthest and nearest point of all on screen semi-transparent objects (fairly expensive, but shouldn't be too bad as long as there aren't too many semi-transparent objects on screen).
2. Look for objects which are between the near/far point of those objects. Any objects found are a problem case.
3. For each problem case create a plane orthogonal to the camera, centered on the mid-point of each contained object.
4. Break down the containing objects such that they do not intersect any plane from an object within them.

First 3 steps are fairly well straight forward, AFAIK. Last one's still not terribly easy, alas, but I think shouldn't be impossible for someone with a better grasp on geometry than me...

Or am I talking nonsense?

Beezle Warburton - 16/Dec/07 01:43 AM
I intentionally created a fan with alpha to demonstrate this, if I could drop a copy on one of the Lindens, I'd be more than happy to.

Moon Fargis - 27/Dec/07 04:14 AM
Added Snapshot1_001 wich shows how i arranged two transparent textures. One is far infront of the other.