Monday, January 5, 2009

Shades of Grey

In between bouts of trivia—and little bits of exploring—I have continued to work on jewelry items in Second Life…in part because I want to do something useful, but also because I still have commissions to fulfill! One of the things that was most fun (and most frustrating!) about the Polaris piece was building the gem: it's kind of an unwieldy gaggle of prims, and only works because it takes advantage of gaffes and goofs in SL's rendering to appear to shift and gleam when it moves or nearby lighting changes.

In my development as a Second Life (cue fanfare!) Content Creator (da ta dum!), I thought I would spend some time trying to come up with other ways to make gems. The technique I used in Polaris is very time- and labor-intensive, but it also isn't applicable to other types of stones. What if you want something round, or teardrop-shaped…or with no facets at all? So (I admit!) I spent a lot of time admiring the jewelry worn by other people in SL—zooming in embarassingly close with Second Life's built-in camera, and then trying to recreate interesting bits of what I'd seen. After a little while, I could recognize how different builders had approached creating different types of jewelry, and I built a few experiments of my own to see what I could do.

One of the main things about gems is how they focus and diffuse light. Second Life enables builders to set the color and opacity of prims, so objects can have a somewhat translucent quality. Object sides can also have textures, which are essentially bitmap graphics splattered across the surface of an object. Textures might sound like a great way to get (say) a sphere to resemble a cut gem—and, to a small extent, it works, although the results really do look painted-on: they have no depth, no sparkle…and mostly look like cartoons.

Also, no matter how you play with objects' opacity, they never reflect or refract light accurately. Sure, Second Life supports three levels of "shiny" (how much light an object reflects) and it's somewhat effective for, say, representing objects made of glass or metal. But it's not particularly useful for creating an object that both reflects light and lets light pass through it…particularly if that light can get refracted from any number of angles. Second Life's shininess, opacity, textures, and colors are just a simplified mimic of real life…they don't follow the same rules or offer the same wealth of possibilities.

So I started to look at how Second Life's properties might be used to create something…well, if not real, then at least interesting. One property a prim can have is emitting light—and, within some limits, creators can control its color and intensity. Although Second Life is capable of rendering (at most) nearby eight light sources at the same time (the sun and moon count as two—it's always a full moon in SL!—so really six other sources can be active), the lighting property is useful for creating lamps, torches, fires, beacons, lightsabers (I'm sure!) and other light-emitting items. One very common application of this lighting property is "face lighting"—if you ever see a woman (or even a guy!) walking around SL like they have their own personal spotlight following them, they probably wear face lighting as part of their hair. It's usually built as a little, invisible, light-emitting prim that sits about 20 cm in front of their face in order to let them "look their best" no matter the local lighting. Unfortunately, the light tends to bleed all around them, at best making them look ridiculously vain, and at worst like they've got some sort of lightbulb stuck in their mouth.

So, I thought: maybe there's a way to combine transparency, opacity, textures, and this light thing to make something interesting? After some experiments, I came up with this:

I know it sort of resembles a translucent almond (yay Lou!), but it was just a proof of concept and here was the best part: if you turn out the lights and wait until the sun goes down:

…it has just a hint of a glow. Subtle. The kind of thing someone else would only notice up close, like the detail in fine jewelry. Here I'm showing it next to our old friend, the 1cm×2cm cylinder, for scale…and so you can see the light would get picked up by something close, like a mounting, clothing, or skin.

Now, I realized I was playing a little close to the edge with this. First of all, not everyone in SL sees lighting: sometimes their graphic cards only have enough oomph to handle the sun and moon. And that's fine: The Almond is still gem-like without the light. Similarly, some people don't have graphics cards that let them see "bump mapping" and Second Life's "shiny" effect—and that's OK with The Almond too, because it doesn't rely on either property.

But where I made my mistake was assuming that if a user's video card could handle spiffier graphics, their display of light-emitting objects would be more accurate and more realistic than folks with fewer graphics options. Wow, was I wrong. Here's The Almond (at night) with an option called "Basic Shaders" disabled…and right next to it, the same Almond (in the same place, no properties changed) with Basic Shaders enabled:

That's quite a difference…and where one is a subtle effect suitable for use in jewelry, the other is a horrendous, garish, frickin' airplane landing light.

And there doesn't appear to be a way to create light-emitting objects that reliably offer a subtle lighting effect across both sets of settings. And who knows what people with even spiffier graphics capabilities might see! Grr.

I tell you, it's enough to keep a girl confined to text-based trivia.


  1. Tune for people with better computers, they're bound to have more money to spend :)

    (My older video card which was pretty old had Basic Shaders enabled by default..)

  2. Chadd logic is strong, but SL logic remains perplexing.

    My "better" computer with the super-spiffy graphics can't enable Basic Shaders at all. Asking around, some people with older computers have Basic Shaders enabled by default; some people with newer computers crash as soon as they turn it on. Furthermore, screengrabs from friends reveal that even when people have Basic Shaders enabled, their on screen results *viewing the same object in the same place under the same lighting at the same time* are nowhere near identical.

    Which, you know, just makes me a bigger fan of ASCII art.


Comments are moderated. You can use some HTML tags, such as <b>, <i>, <a>. If you'd like to contact me privately, use a blog comment and say you don't want it published.