These forums are CLOSED. Please visit the new forums HERE
Transparent textures and reducing Alpha Ordering clitches. |
|
|
Mortus Allen
Registered User
Join date: 28 Apr 2007
Posts: 528
|
05-05-2008 12:03
I am having issues with alpha sorting with one of my textures and her hair that obviously uses an alpha texture as well, however I have another texture that is transparent/lucent that does not cause this problem. The texture format I am uploading is a TGA texture as well. The texture in question makes up the cieling, walls and floor of a boat I am building where the lower deck is made up of a hollowed cube shape. What format should I be using for this, and if TGA Textures are the best for this application, how can I correct the sorting issue?
|
|
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
|
05-05-2008 13:52
The source format is irrelevant, for two reasons:
1. When you upload an image to SL, it is copied to JPEG2000 format. Only the copy is uploaded. Your original source file never leaves your own hard drive. All in-world textures are JPEG2000, regardless of what format they were first created in. 2. Setting point 1 aside for a second, the image format still doesn't make any difference. File format is a function of storage, not of live performance. The graphics card is going to sort the transparency as it renders the scene, in accordance with the actual pixels of the imagery. It has no idea what a file format even is. You could set up 10 versions of an otherwise identical scene with 10 different texture file formats, and all 10 would behave exactly the same way. So use TGA or PNG, whichever you prefer. It won't make any difference to the sorting. As for how to minimize the effect of the glitch, there are only two things you can do as a user. Either don't overlap transparent/translucent-textured surfaces, or if you do, put something opaque in between them. That's really all you can do. For something like hair, that often means getting creative with your building methodology. For example, instead of using one prim for each lock, use two. Put a 24-bit version of the texture for the bulk of the length, and then put the 32-bit version just on the very tip. That way the locks won't fight with each other any more than they absolutely have to. For your boat, I'd need to know more about how you're building it to offer any meaningful advice. _____________________
.
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. |
|
Lee Ponzu
What Would Steve Do?
Join date: 28 Jun 2006
Posts: 1,770
|
Follow-up question, for two points...
05-05-2008 14:18
I was looking at low-level nvidia technical specs, and I notice that the card itself can hold different formats. Does that play into this issue in anyway?
_____________________
So many monkeys, so little Shakespeare.
|
|
Imnotgoing Sideways
Can't outlaw cute! =^-^=
Join date: 17 Nov 2007
Posts: 4,694
|
05-05-2008 14:33
I was looking at low-level nvidia technical specs, and I notice that the card itself can hold different formats. Does that play into this issue in anyway? ...All in-world textures are JPEG2000, regardless of what format they were first created in.... _____________________
Somewhere in this world; there is someone having some good clean fun doing the one thing you hate the most. (^_^)y
![]() http://slurl.com/secondlife/Ferguson/54/237/94 |
|
Mortus Allen
Registered User
Join date: 28 Apr 2007
Posts: 528
|
05-05-2008 16:25
Here is a picture of the interior. The wall with the oval window is the texture I am having trouble with, this is actually a single texture that wraps around the entire inner surface of the prim. It is a hollow cube so it has only one texturable surface. However that part is errelevent to the problem at hand, which is my partners hair conflicting with this texture. Not the front pay window to the left of the attached image is translucent and does not conflict with her hair, this is a freebie "Glass Block" texture I found somewhere and works wonderfully for most of the window surfaces in the boat.
What I am wondering is how did they make the one texture less likely to conflict with other textures? The only thing I can see is that the "Glass Block" texture is not uniformly transparent/lucent and my side windows are. |
|
Imnotgoing Sideways
Can't outlaw cute! =^-^=
Join date: 17 Nov 2007
Posts: 4,694
|
05-05-2008 16:30
Basically, once you have a transparent texture in front of another, there will be a battle-to-the-death as for which texture will be in front. The winner will be determined by object and viewing angle, distance won't really matter. The simple solution is that at least one texture MUST be non-alpha non-transparency. The hard part is having a window and keeping your prim-count down. (^_^)y
_____________________
Somewhere in this world; there is someone having some good clean fun doing the one thing you hate the most. (^_^)y
![]() http://slurl.com/secondlife/Ferguson/54/237/94 |
|
Mortus Allen
Registered User
Join date: 28 Apr 2007
Posts: 528
|
05-05-2008 18:55
Imnotgoing, I have to call bullshit on your statements sorry. I have evidence of not 2 but 3 transparent/lucent textures cooperating with each other.
My partners hair against the window and the railing in the mack ground, all textures with transparency. See the attachment. |
|
Rolig Loon
Not as dumb as I look
Join date: 22 Mar 2007
Posts: 2,482
|
05-05-2008 20:54
It is a hollow cube so it has only one texturable surface. However that part is errelevent to the problem at hand, which is my partners hair conflicting with this texture. I'm not quite sure I understand. Do you mean that the wall is an inside wall of a hollow cube? And your partner is standing inside the hollow cube? If so, is the texture on the outer surface of the cube also a 32-bit texture? Just trying to understand. The alpha sorting glitch doesn't always create problems. Just at certain angles and only if the video card can't figure out which 32-bit texture is in front. I have successfully built things that ought to have sorting problems, but don't, just because of the way most people view them. You can get lucky sometimes. |
|
Mortus Allen
Registered User
Join date: 28 Apr 2007
Posts: 528
|
05-05-2008 21:36
Yes, the inside wall is the inside of a hollow, and she is inside. the outer texture is not transparent to my knowledge.
|
|
Imnotgoing Sideways
Can't outlaw cute! =^-^=
Join date: 17 Nov 2007
Posts: 4,694
|
05-06-2008 05:08
...My partners hair against the window and the railing in the mack ground, all textures with transparency... Also, there's a hair shop that I won't name. They're popular, but I'll never buy from them. Because whoever the builder is, it's a person who knows NOTHING on how to handle the glitch properly. From what I see, almost every hair there has alpha shuffling in the hair itself, and it's greatly distracting. I'm soooo glad they offer demos. If I bought from pictures alone, I would have wasted my monies. (>_< ![]() I never described anything as impossible. Just easy and hard. I don't believe in the impossible. (^_^)y _____________________
Somewhere in this world; there is someone having some good clean fun doing the one thing you hate the most. (^_^)y
![]() http://slurl.com/secondlife/Ferguson/54/237/94 |
|
Mortus Allen
Registered User
Join date: 28 Apr 2007
Posts: 528
|
05-06-2008 07:25
Well at a closer look of her hair, and I do mean close, it does clip in it's self, but at no angle does it clip against any other transparent texture that is professionally used.
So I am still looking for help and guidence, not continually beating at a bug I know is there. Sorry if I seem to be getting cranky, but I know others know how to make textures that are less suseptable to this bug, and I would like to know how they accomplished it. |
|
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
|
05-06-2008 07:46
Here's my best guess at what's going on, Mortus. The difference in behavior you're seeing between the interior of the hollow cube and that other free-standing wall have nothing to do with the textures being used (because it can't). What it does have to do with is the way the room is built. Specifically, the difference lies in where the center points of the various surfaces are located.
The system decides which surface is "in front" based on which one's center is closest to the camera. This does not always coincide with what you as a human observer think of as "front" and "back", or even with what you think of as "location". To the computer, it's all about the center points. Nothing else matters. With that in mind, it makes perfect sense that your partner's hair would be more likely to conflict with the hollow-surface walls than with the free-standing one. I'll explain. When you hollow a cube to make a room, the center of the cube is the center of the room. Anywhere you stand inside a hollow cube, there's always at least a 50% chance that the center of the cube will be "in front" of you, relative to the camera. If you're standing up against the hollow-surface wall, then the chance is 100%. Sorting issues will abound in that situation. But for the other cube, the free-standing fifth wall, the center point is inside the wall itself, not anywhere in the room. The chance that that would be "in front" of any of the hair-prim centers is relatively low. Try this experiment. Build the same room without the hollowed cube. Use four separate cubes in its place. You'll see that all four of them behave similarly to that original free-standing wall. Next, try building another version of the room, this time using all hollow cubes. To make the fifth wall, hollow a cube, cut it by 75%, so 3 of its 4 sides are gone, and position it so its (bounding) center is the center of the room, just like the other hollow cube. You'll see that that fifth wall now behaves similarly to the original "four". Now, as a third experiment, just to prove the point that the hair will conflict with any other transparent/translucent texture, have your partner stand on a posing stand, so her head can't move. Then rez a cube, size it to something like .01x1x1 so it's flat, and position it so its center is inside the center of her head, almost as if it's giving her a square mohawk. (You might need to set the cube to phantom to keep it from kicking her off the posing stand.) Put any translucent texture you want on the cube, and you'll see sorting issues between the cube and the hair. _____________________
.
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. |
|
Johan Durant
Registered User
Join date: 7 Aug 2006
Posts: 1,657
|
05-06-2008 09:37
Imnotgoing, I have to call bullshit on your statements sorry. I have evidence of not 2 but 3 transparent/lucent textures cooperating with each other. My partners hair against the window and the railing in the mack ground, all textures with transparency. See the attachment. Those railings are far away. The alpha sorting problem is only for prims that are very close or overlapping, not for objects that are far apart. Getting technical, the reason for the problem is that with alpha textures the videocard can no longer sort which individual pixels to draw in front of each other, and can only sort in terms of entire objects (ie. which entire object is closer to the camera.) As for the window, that tint is so slight that your image indicates nothing. EDIT: What Chosen said. The computer places alpha polygons on top of each other based on which object it judges to be closest, and it uses object center-points when determining which object is closest. _____________________
(Aelin 184,194,22)The Motion Merchant - an animation store specializing in two-person interactions |
|
Keira Wells
Blender Sculptor
Join date: 16 Mar 2008
Posts: 2,371
|
05-06-2008 09:44
Those railings are far away. The alpha sorting problem is only for prims that are very close or overlapping, not for objects that are far apart. Getting technical, the reason for the problem is that with alpha textures the videocard can no longer sort which individual pixels to draw in front of each other, and can only sort in terms of entire objects (ie. which entire object is closer to the camera.) As for the window, that tint is so slight that your image indicates nothing. EDIT: What Chosen said. The computer places alpha polygons on top of each other based on which object it judges to be closest, and it uses object center-points when determining which object is closest. One thing I wish to add is that occasionally things with a bit of visible distance between them will sort wrong. As Chosen stated, though, it's almost always due to hollows and such. I have seen, however, two occasions where two separate walls, about 15 meters apart, not hollowed, anything like that, had a horrid time with the sorting, so occasionally it does happen where Chosen's explanation seems to make less sense. _____________________
Tutorials for Sculpties using Blender!
Http://www.youtube.com/user/BlenderSL |