Reflections on a prim: a potential way to create mirrors in SL

Update: just after pushing this out (slightly prematurely, thank you, Mona, for pointing out the error), Gwenners poked me on Twitter and reminded me of the 2006 experiments with reflections and supplied some links to shots from those heady days: and

The ability to have honest-to-goodness mirror surfaces in Second Life which could reflect the world – and avatars – around them has often been asked for over the years, but has tended to be avoided by the Lab as it’s been seen as potentially resource-intensive and not the easiest thing to achieve. As a result people have in the past played around with various means to try to create in-world mirrors.

Zonja Capalini posted a article on using linden water as an avatar mirror in 2011
Zonja Capalini posted an article on using linden water as an avatar mirror as far back as 2009

Zonja Capalini, for example, was perhaps one of the first to blog about using Linden water as a mirror (or at least the first I came across, thanks to Chestnut Rau and Whiskey Monday), and she certainly came up with some interesting results, as shown on the right, and which I tried-out for myself back in 2012.

However, achieving results in this way is also time-consuming and not always practical; you either have to purpose-build a set, or try shoving a jack under a region and hope you can persuade it to tip over on its side…

But there is hope on the horizon that perhaps we may yet see mirrors in SL (and OpenSim).

While it is still very early days,  Zi Ree of the Firestorm team has been poking at things to see what might be achieved, and has had some interesting results using some additional viewer code and a suitable texture.

This has allowed Zi to define a basic way of generating real-time reflections, including those of avatars, on the surface of a prim. The work is still in its early days, and Zi points to the fact that she’s not a rendering pipe expert, so there may be under-the-hood issues which may not have come to light as yet. However, she as produced a number of videos demonstrating the work to date (see the same below), and has raised a JIRA (STORM-2055) which documents the work so far, and self-compilers can use the patch provided in the JIRA if they want to try things for themselves.

Currently, the code only works when the viewer is running in non-deferred rendering (i.e. with the Advanced Lighting Model turned off). This does tend to make the in-world view a little flat, particularly if you’re used to seeing lighting and shadows.

However, having tried a version of the SL viewer with a code applied to it, I can say that it is very easy to create a mirror – all you need is a prim and a texture, make a few tweaks to some debug settings, and a possible relog. The results are quite impressive, as I hope the picture below demonstrates (click to enlarge, if required).

I see you looking at me ...
I see you looking at me …

Performance-wise, my PC and GPU didn’t seem to take too much of a hit – no doubt helped by the fact the mirror effect only works in non-deferred mode at present. Quite what things would be like if this were to be tried with ALM active and shadows and lighting enabled could be a very different story.

As the effect is purely viewer-side, it does run up against the Lab’s “shared experience” policy; not only do you need a viewer with the code to create mirror surfaces, you need a viewer with the code to see the results. People using viewers without the code will just see a transparent prim face (or if the mirror texture is applied to the entire prim, nothing at all while it is 100% transparent).

This means that in order for mirrors of this nature to become the norm in Second Life, then the idea, as offered through this approach, is going to have to be adopted by the Lab. Obviously, to be absolutely ideal, it would also be better if it worked with Advance Lighting Model active as well. Zi additionally notes that some server-side updates are also required in order for a simulator to be able to save things like the reflectiveness of a given mirror surface, etc.

It's all done with mirrors ...
It’s all done with mirrors, y’know … (click to enlarge, if required)

Whether this work could herald the arrival of fully reflective surfaces in-world remains to be seen. It’s not clear how much interest in the idea has been shown by the Lab, but hopefully with the JIRA filed, they’ll take a look at things. There’s little doubt that if such a capability could be made to happen, and without a massive performance or system hit, then it could prove popular with users and add further depth to the platform.


13 thoughts on “Reflections on a prim: a potential way to create mirrors in SL

  1. In Imprudence, export acts differently if you’re trying to export on opensim as opposed to trying to export in Second Life. That’s because the code checks what grid it is running on and acts differently depending on where it’s being run from.

    It would be nice if they would develop this feature for opensim and gave Oz a nudge so he could advocate for the change to come over to SL. I don’t think that will happen, sadly, because SL politics.


  2. I forgot to finish my thought, That’s what I get for writing before my first cup of coffee. The imprudence example sets a precedent for adding a feature and then either enabling it or disabling it based one what grid the viewer is run on. To get around the “shared experience” problem, a viewer with this feature could check wether it’s running on SL or running on opensim and either disable it, or enable it.


    1. Imprudence hasn’t signed the havok agreement and as such isn’t restricted from producing a single viewer for both platforms. Imprudence is also so out of date it can barely be called viewer for Second Life.


  3. I am no techie and have downloaded the software needed and got the texture from Zi, but I am already lost as to what to do. LOVE the idea, but for (insert blond joke here) it is not so easy to figure out how to get this to work.


    1. If you have a viewer compiled with Zi’s patch, then all you need to do is:

      • Rez a cube prim
      • Edit the prim and select a face of the prim
      • Go to the Texture Tab on the Build floater and use the texture picker to apply Zi’s texture to the selected face
      • Set Transparency in the Texture tab to 100%, and (optionally) glow to 0.01

      As you’re using Zi’s texture, which the code updates are set to use by default, you should then have a working reflective surface on the prim, and all you need to do is resize it. However, if you find the qaulity of the reflections aren’t particularly good:

      • Enable the Advanced menu (if not already enabled) via CTRL-ALT-D
      • Open the Debug Settings floater and type MirrorResolution in the input box
      • Set the value for MirrorResolution to 1024
      • Close Debug Settings
      • Relog

      Note that you can apply the mirror texture to the entire prim, and make all of its surfaces reflective, but it is a lot easier to select and manipulate the mirror prim if you only make one face into the mirror.

      Liked by 1 person

  4. hi,ive been searching everywere for a different type of mirror script,for example i made a glove and i copyd it to other hand but it wont fit because they are both right can i make th eother glow to fi for left arm


Have any thoughts?

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s