Late this week, I was experimenting with figuring out alpha sorting on Sculpted Prims, when I happened across a very strange phenomenon. The product looks something like Lenticular printing, where the image changes depending on the angle that you view it at.
The effect is more intriguing in world. You can see a nice big wall-size display at my mall space in Midgar (click here to teleport). My spot is directly up the stairs on the left. Just alt cam or walk back and forth and you’ll see what it does.
So how did this happen? It has to do with alpha sorting and how it applies to sculpted prims.
When two surfaces with alpha channels overlap, Second Life (or any other game platform) has to determine which surface belongs on top. The builder usually hopes that whichever surface is physically closer to the camera will always be on top, but for Second Life and other gaming programs, determining what’s on top isn’t always straight forward. When SL can’t figure it out, we get the phenomenon often called “Alpha Clipping.”
So it happens that I was trying to figure out more about alpha sorting and how it relates to sculpted prims, because unlike most other prim types, sculpted prims can overlap themselves, so I was wondering how SL sorted an alpha channel on a single sculpted prim. From previous experience with sculpted prims, I hypothesized that faces on a sculptie that were defined by pixels at the top of a sculpt map would be alpha sorted in front of faces defined by the bottom of the sculpt map. So:

To test this, I created a plane sculptie, folded accordion style from back to front, then in SL, I placed an alphabet grid texture on the prim and set the transparency to 5. As predicted, the faces at the top of the sculptie (letters a-d) were always sorted before those at the bottom (m-p).

So I got that one right. Top pixels always show up in front of the bottom pixels on a sculpt map. Now what I didn’t know was which pixels, from left to right, does SL put on top. So I rotated the sculpt map by 90 degrees (I rotated the image in Photoshop, NOT the mesh in Blender. Rotating the mesh in Blender would do nothing, as it’s the position of the pixels on the image that matters. The position of the vertices in 3D space makes no difference.)

I had predicted, purely from logic, that SL would sort the pixels on the left above the pixels on the right. But I was wrong. Instead of cleanly sorting the surfaces of the accordion, SL did something weird. As you can see on the image above, on the left side of the sculptie, the front of the sculptie is sorted on front, but on the right side, the BACK is sorted in front, and in the middle there are these lines like a set of blinds. When you cam from left to right, the lines in the middle move, so if you are looking at it from one side or the other, either the back or front image will be completely visible.

The effect reminded me of those pictures that change depending on what angle you view them at, so I figured I’d make something like that. I made an M shape sculptie, which allows for images on both sides of the prim, and I also made an N, which only has the effect on one side, but allows for higher-quality images.
I’m not sure if there’s any practical application for this other than the “Ooo SHINY” factor, but its kinda cool anyway. I was thinking of selling some sort of kit with the sculpties and a texture with guides so people could make their own trippy signage, but like.. Idunno. I’m really not sure how many people would WANT that. xD



