.comment-link {margin-left:.6em;}
Moriash Moreau: My Second Life
Thursday, August 10, 2006
 
Invisiprim
Worked out something kind of interesting a couple days ago. The old "invisiprim" (which can be found here or here) interacts rather interestingly with the (relatively) new object-object occlusion filter. Apparently, the texture used for the invisiprim trick is treated as opaque for purposes of occlusion calculations. The net result is the objects that are fully occluded behind an invisiprim are not rendered, just as if they were behind a solid wall. So, under a limited set of circumstances, the invisiprim will hide solid, opaque objects, as well as objects with transparency/alpha masks.

(If that doesn't make sense, I'd recommend following one of the links above and playing with an invisiprim yourself. It's kind of neat.)

I'd noticed this effect before, when placing my camera very close to an avatar that incorporated a large invisiprim. Large, fully opaque objects behind the avatar suddenly disappeared! But the reasons behind it only clicked in my mind a couple nights ago. Last night, I made a simple test case using a large (10x10x0.1) invisiprim.


Here is an overhead view of the setup. The occluded field of view is just a sample. I observed the same results from multiple locations behind the pane. Far away objects (further than 10 meters or so) completely failed to render. This included local walls (I was inside a building at the time), floors, furniture, and so on. The only thing remaining in the middle-to-far view was land and sky.

The nearby view was more interesting. Prims apparently cannot be partially occluded (this is possibly common knowledge, I just never really thought about it). So, fully opaque objects that are only partway inside the occluded field of view are still fully visible. (Naturally, alpha/transparent objects behaved as expected, with portions of a prim disappearing behind the invisiprim.) Occlusion appears to work on a prim level, not an object level. So parts of an opaque object may disappear, while other parts remain.

So what? Well, it's mostly just an oddity. In practice, most invisiprims are small, generally no bigger than is needed to hide legs or feet for exotic avatars and high-heeled shoes. So you'll seldom see this effect by accident. But I can see this being useful for dealing with the eyesores that may appear on the grid from time to time. Don't like your view? One too many giant, spinning "For Sale" signs on the horizon? Slip an invisiprim behind your windows (remember, you only need to use the invisiprim texture on the side you're seeing- you can texture the outside view however you like), and remove the offending portion of the grid from your sight.

Of course, it'll also remove all other objects, trees, and clouds, leaving nothing but empty land as far as the eye can see. (And maybe your front porch, depending on how much of it is fully occluded behind the pane). This may be what you want. It is kind of peaceful, in a solipsistic sort of way. But for most cases, I'd guess this is more useful for skyboxes in crowded airspace, or in other cases where the absence of background objects won't be noticed.
Comments:
How about having a clear ocean view out your window or maybe off a patio.
 
Huh. Good point. After further experimentation, it appears that the ground patches are occluded as well. The only downside is said ocean view (the client's way of showing an empty area) will often be well below ground. I suppose it just depends on where your porch is in relationship to the water line.
 
Post a Comment



Return to Main Page