Objects not rendering in front of other objects
|
|
HTFR Oh
Registered User
Join date: 6 Aug 2007
Posts: 7
|
08-30-2007 09:29
Im having problems with some of my objects. For example i have a rectangle and on top a smaller cube. From certain angles you can see both, but other angles make the bottom rectangle appear over the top of the cube, even though it is physically below it. How do i stop this from happening? If i select both objects together, SL knows the cube is on top of the rectangle but still only draws it as on top from certain angles.
Thanks
|
|
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
|
08-30-2007 09:48
Man, there have been a lot of questions on this lately. What you're seeing is called the alpha sorting glitch. It's common to all 3D graphics applications; it's just that the professional artists who build in other environments are aware of it and work around it, while 99% of SL is built by amateurs who are just learning these things.
The cause is unnecessary or improper use of 32-bit textures where 24-bit textures should be employed. When surfaces with 32-bit textures on them overlap in close proximity, the renderer has trouble determining which one should be drawn first. See the transparency guide at the top of the texturing forum for more information. There's a segment of the FAQ section dedicated to it.
_____________________
.
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.
|
|
Cristalle Karami
Lady of the House
Join date: 4 Dec 2006
Posts: 6,222
|
08-30-2007 10:41
Since PNG doesn't use alpha channels, would this eliminate the sorting problem? I'm sorry if this is a dumb question.
|
|
Annabelle Babii
Unholier than thou
Join date: 2 Jun 2007
Posts: 1,797
|
08-30-2007 10:42
I save any non-transparent textures in BMP to avoid this. Don't know about PNG, though.
|
|
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
|
08-30-2007 12:26
From: Cristalle Karami Since PNG doesn't use alpha channels, would this eliminate the sorting problem? I'm sorry if this is a dumb question. Three things: First, it's not accurate to say "PNG doesn't use alpha channels". It doesn't have to, but it can. PNG supports both alpha transparency and simple transparency. Second, the source image file format is not at issue. SL converts ALL images to JPEG2000 format at the time of upload, so nothing you see inside SL is actually TGA or PNG or anything else; it's all JPEG2000. See the sticky regarding file formats at the top of the texturing forum for more information on this. Third, to answer your question more directly, in other modeling applications in which the user can control the texture file format, like Maya, PNG and TGA textures behave identically where sorting is concerned. Even though the glitch is commonly called "the alpha sorting glitch", it doesn't really have to do with alpha channels directly. It's more accurately called "the transparency sorting glitch" but that title is not as often used for whatever reason. From: Annabelle Babii I save any non-transparent textures in BMP to avoid this. Don't know about PNG, though. Again, all image files in SL are JPEG2000. You're not gaining anything by saving your source image as BMP (especially considering that BMP's can have alpha channels too now, but not for SL). If selecting 24-bit TGA at the time of save is somehow harder to remember than selecting 24-bit BMP, then there's nothing wrong with it; BMP is just not a common choice for graphics work is all. TGA is pretty much the industry standard for texturing. I think the reason BMP didn't catch on for professional use was probably because it didn't have a 32-bit option for the first 20 years or so of its existence, or maybe just because it was created by Microsoft at a time when DOS and Windows machines were not considered to be good for artowrk. BMP does have a 32-bit option now, as I said (it was introduced with Windows XP), but it's hardly ever used. Regardless of the reason, BMP is primarily thought of as little more than "the desktop wallpaper format". Most people don't use it for much else.
_____________________
.
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.
|
|
Cristalle Karami
Lady of the House
Join date: 4 Dec 2006
Posts: 6,222
|
08-30-2007 13:18
From: Chosen Few Third, to answer your question more directly, in other modeling applications in which the user can control the texture file format, like Maya, PNG and TGA textures behave identically where sorting is concerned. Even though the glitch is commonly called "the alpha sorting glitch", it doesn't really have to do with alpha channels directly. It's more accurately called "the transparency sorting glitch" but that title is not as often used for whatever reason. Thanks. This was what I wanted to know.
|
|
Rooke Ayres
Likes Shiny Things
Join date: 30 Dec 2006
Posts: 293
|
08-30-2007 15:36
From: Chosen Few ... or maybe just because it was created by Microsoft at a time when DOS and Windows machines were not considered to be good for artowrk. I was programming at that time... FYI, it wasn't DOS or Windows that was the problem, it was the monitors and the graphics cards, if you could call them that; they were more like monitor interface cards. They both only supported 8bit & 16bit graphics. (ATI & nVidia didn't even exist yet.) The operating systems only had the support for the existing levels of hardware. Pac-Man was about as good as it got as far as graphics went back then. Big blocky and heavily pixelated. The original PC monitor was 320x240 - crude at best - 40 characters per row by 12 rows. Real graphics support: 24 & 32bit, and decent resolutions (800x600 & 1024x76  didn't show up in quantities in the PC world until the early 90's. Prior to that, only the highest of high end workstations (Cray, IBM, Honeywell) attached to Big Iron supported real graphics.
_____________________
  (Follow the beacon) Bold Jewelry, Glasses(scripted), Pendants, and assorted shiny things. My Stuff at Xstreet SL
|
|
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
|
08-30-2007 18:01
Thanks, Rooke. Very interesting. That doesn't really explain though why BMP didn't catch on as a professional graphics format of choice while other similar formats of the same age did. Any insight on that?
_____________________
.
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.
|
|
Rooke Ayres
Likes Shiny Things
Join date: 30 Dec 2006
Posts: 293
|
08-30-2007 19:06
From: Chosen Few ... That doesn't really explain though why BMP didn't catch on as a professional graphics format of choice while other similar formats of the same age did. Any insight on that? My best guess is since Microsoft has always been a follower, and never really an innovator. Microsoft Paint didn't support anything other than .bmp until after Win95 (maybe even as late as Win9  , when they added support for gif and jpeg. I think their development in graphics was driven by what *they* felt was the needs of the general user community. It seems like they just didn't add any additional graphics file formats until after Photoshop and the other real graphics programs started pushing the envelope.
_____________________
  (Follow the beacon) Bold Jewelry, Glasses(scripted), Pendants, and assorted shiny things. My Stuff at Xstreet SL
|