Tutorial: creating a simple (prim) mirror in Second Life

Background notes: this tutorial is provided as a *basic* guide to making a simple mirror in-world using prims, following the release of the Graphics Features viewer. Further:

  • It has been written using the official Second Life Viewer (SLV) from Linden Lab.
  • The steps outlined should apply pretty much to any third-party viewer currently supporting PBR rendering, allowing for differences in UI and menu option presentation.
  • As Firestorm has more extensive changes to some of the UI elements used, I’ll likely provide a dedicated tutorial for that viewer when it releases with PBR support.
Table of Contents

Please note:

  • If you have never created PBR mirrors before, it is recommended you read the entire tutorial including (Please) Read Me and Setting Viewer Preferences.
  • If you wish to know how to set your viewer so you can see PBR mirror effects, you only need to read  (Please) Read Me and Setting Viewer Preferences.

(Please) Read Me

  • Mirrors comprise two elements:
    • The actual object that forms the mirror. The can be a prim, a mesh face, a single object, part of a more complex (e.g. a mirror face in a frame).
    • A PBR reflection probe: a special kind of object new to Second Life under glTF / PBR which, for the purposes of this tutorial, actually generates the “reflections” on the mirror. As such, it is a object linked to the mirror object, above.
    • Creation of both of these is covered in this tutorial.
  • PBR mirrors:
    • Are planar (or flat surface mirrors), they don’t work particularly well on curved surfaces (like car bodies).
    • Are not designed to be worn as avatar attachments, and will not function correctly if used as such.
    • Come in two forms:
      • Static – meaning they will create reflections of just about everything within their sphere of influence except avatars.
      • Dynamic – meaning they will create reflections of just about everything within their sphere of influence including avatars.
    • Can have a performance impact – so should be used in moderation and with consideration of the effect you are trying to achieve, and the impact it may have on viewers close to them.
      • Example: it might sound cool to have a dynamic mirror as the floor or along one wall of a dance club, reflecting all the dancers – but it will likely kill viewer performance for all the dancers on the floor / dancing close to the wall. So if you must do either, use a Static mirror so avatars are not reflected.
  • To help reduce the performance impact generated by mirrors, only one will ever be active at a time in any given viewer. This will generally be the mirror closest the the viewer’s camera position; all others will simply appear shiny.
    • If you place two mirrors, each with its own reflection probe, too close to one another, you may find you get strange results in both of them.
    • For this reason, if you want to make a wall of mirrors, better to make multiple mirror objects and have a single reflection probe aligned with them to generate reflections in all of them.

This Tutorial

This tutorial breaks mirror creation down into four core steps:

  1. Setting your viewer preferences.
    • Some of these steps may only have to be down once; others may require setting each time you work with PBR reflection probes.
  2. Creating the mirror object using a prim & setting its surface material.
    • The required material can be made using either Blinn-Phong (aka “legacy” or “classic” materials) or the new PBR materials capabilities in the viewer.
    • This tutorial provides guidance on both.
  3. Creating the mirror reflection probe.
  4. Finishing touches – positioning the probe relative to the mirror object, and completing the mirror.

Notes:

  • All of the images in the sections below can be opened in their own tab(s) for greater clarity, if required.
  • Important: be aware that if you place a mirror within a room that contains its own reflection probe already, you may get some very odd results, as the mirror surface can also show “reflections” from the room’s reflection probe.

Step 1: Setting Your Viewer Preferences

Setting your viewer to work with mirrors requires two steps:

  • Ensuring the viewer’s Graphic Preferences is set to view mirrors correctly.
    • This generally only needs to be done once, as the setting will persist between log-in sessions.
    • Must be done by anyone wishing to simply view mirror in-world or who wishes to create them.
  • Enabling the ability to select reflection probes so they can be edited and manipulated.
    • This is intentionally a non-persistent setting, and must be enabled once per log-in session whenever reflection probes are to be directly selected / edited.

Graphics Preferences for Mirrors

Note: as per the notes above, these settings need to be active any in viewer that is to interact with to PBR mirrors.

  • Open up Preferences → Graphics.
  • Click the Advanced Settings button to open the Advanced Settings Preferences Floater. Now locate and set the following:
    • Mirrors checkbox – make sure it is checked, otherwise PBR mirrors will only appear as shiny surfaces.
    • Reflection Detail:
      • If you wish to view everything a mirror is designed to reflect, whether it is static or dynamic, set this drop-down to Static + Dynamic.
      • If your system struggles with performance as a result of mirrors, set this to Static, so no avatar reflections will be rendered.
    • Reflection Coverage: make sure this is set to Full Screen.
    • Mirror Resolution set the resolution your viewer will use to display mirror reflections. Higher resolutions will obviously be sharper, but may have an increased impact on performance when rendering mirror reflections.
    • Mirror Update Rate: set the frequency with which you wish you update to update rendered mirror reflections. Again, the more frequent the updates, the more realistic the reflections – and the potential for greater impact on viewer performance.
 Setting your viewer’s Graphic Preferences to see / create mirrors

Setting the Viewer so You Can Select Reflection Probes

Reminder: You only need to do this if you are going to be selection and editing / moving any reflection probe. It is a non-persistent setting, so must be performed once each log-in session when you wish to select and edit a reflection probe of any description.

  1. Go to the Build menu at the top of the viewer window.
  2. Click the menu to open it, scroll down to Option to open that sub-menu.
  3. Locate the option Select Reflections Probes and click it to check it.

Step 2: Making the Mirror & Setting the Surface Material

Creating the Mirror Object

  • Create a cube prim and size it as required. Keep the Build / Edit floater open after creating and sizing your prim.
  • Click on the Texture tab in the Build / Edit floater, and (also see image, below):
    1. Click on the texture swatch to open the Pick: Texture floater.
    2. In the Pick: Texture floater, click the Blank button.
    3. This will cause the texture swatch in the Texture picker to turn white (and the mirror object itself).
    4. Click the OK button in the Pick Texture floater to close it.
  • You now need to set the object’s surface materials either by using Blinn-Phong (“legacy”) materials (below) or by using PBR materials.
Setting the mirror object to a blank white face / object

Setting the Surface Material Using Blinn-Phong

  • Edit the mirror object just created and select the front face. Click on the Texture Tab of the Edit floater.
  • In the Texture tab of the Edit floater, click on the Shininess (Specular) radio button (arrowed in the image below).
  • Now (as per the image below):
    1. Click on the texture swatch to open the Pick: Texture floater.
    2. In the Pick Texture floater, click the Blank button.
    3. This will cause the texture swatch in the Texture picker to turn white.
    4. Click the OK button in the Pick Texture floater to close it.
    5. This will update the Texture tab to display new options: Glossiness, Environment and Color.
  • Set Glossiness and Environment each to 255 and ignore Color.
  • Your mirror object should now be shiny – don’t worry about the appearance, it will soon improve.
  • Close the Edit floater.
  • Continue with Making the Reflection Probe.
Setting the mirror object to have a shiny surface using Blinn-Phong (aka “legacy” or “classic”) materials (click to enlarge in new tab, if required)

Setting the Surface Material Using PBR

Refer to the image below when following these instructions.

  • Edit the mirror object just created and select the front face. Click on the Texture Tab of the Edit floater.
    1. Click on the Material drop-down.
    2. Select PBR Metallic Roughness from the drop-down.
  • The Texture Tab display will update. Now take the following steps:
    1.  Click on the empty texture swatch or click on Choose from Inventory to open the Pick: Texture floater.
    2. Click the Blank button in the Pick: Texture floater this will update the texture swatch in the floater (and in the Texture tab).
    3. Click the OK button in the Pick: Texture to close the floater.
    4. The Edit Selected button in the Texture tab will now be enabled.
    5. Click Edit Selected to open the Editing Materials floater.
    6. In the Editing Materials floater, change the value of Roughness Factor to 0.0.
  • Your mirror object should now be shiny – don’t worry about the appearance, it will soon improve.
  • Close the Edit floater.
  • Continue with Creating the Reflection Probe (below).
Setting the mirror object to have a shiny surface using PBR materials (click to enlarge in new tab, if required)

Step 3: Making the Reflection Probe

Reminder: When creating / editing reflection probes, always make sure you have enabled Build Menu → Options → Select Reflection Probes. Failure to do so will leave you unable to properly edit any reflection probes you create.

  • Create a cube prim.
  • Important:
    • Rotate the prim so that the TOP face of the cube is facing the same direction as the surface of your mirror (that is, the blue arrow of the gizmo tool is pointing away from the face of the mirror object).
    • Make sure it is perfectly at right angles once rotated.
  • Click on the Features tab of the Build / Edit floater:
    1. At the bottom of the tab, check the box labelled Reflection Probe.
    2. A pop-up will generally be displayed, read and understand it (you can check the Don’t Show box if you do not want to see this warning in future), then click OK to convert the prim to a reflection probe.
    3. This will enable the options at the bottom of the Features tab.
    4. Click on the Sphere drop-down and change it to Box.
    5. Click on the Static drop down and:
      • If you wish the mirror to only reflect the objects in front of it, and not avatars as well, select Mirror (Environment).
      • If you wish the mirror to reflect avatars as well, select Mirror (Everything).
Setting the reflection probe properties (click to enlarge in new tab, if required)

Step 4: Finishing Touches

Positioning and sizing the mirror probe to give the required reflections on the mirror object.
  • With the reflection probe selected, make sure the Move radio button at the top left of the Edit floater is enabled.
  • Position the reflection probe so it is overlapping the mirror such that the red arrow / line of the gizmo move tool is just in front of the mirror object.
  • Click the Stretch Radio button in the top of the Edit floater and stretch the reflection probe to fit the mirror object, giving you a mirror-like reflection.
    • Note: The exact size of the reflection probe and its position / depth relative to the front of the mirror might require a little juggling to get right.
  • When done correctly, you should have a basic mirror reflecting the space around you.
  • Finally, link the mirror components together as a single object – but make sure the reflection probe is not the root of the linkset for ease of future moving / editing the mirror.
  • Name the mirror and Take it (or a copy) back to inventory for future use (if required) and / or place the original where you wish to use it.

Note:

  • Because the reflection probe will be deeper than the mirror, anything shiny that is also encompassed by it and in the same plane will also act as a mirrored surface.
  • Similarly, if you have several “mirror” surfaces in the same plane as the reflection probe (e.g. several mirrors on the same wall), you can extend the mirror’s size to encompass all of them, thus use as single reflection probe for multiple mirrors.

Video and Final Words

For those who prefer to watch, the video below – courtesy of Ascension Media and Lighting (You Tube) – goes through all of the above steps for creating a mirror object and its reflection probe. Other videos are available, but I felt this one was very easy to follow, especially given it does not rely on Voice or text (but best to make it full screen to see everything).

Again, this is a basic (if wordy!) tutorial. There is a lot more that can be done when creating mirror objects. and I’m not attempting to cover everything here; this is simply to get people started. Remember that mirrors do have limitations imposed, and can impact viewer performance – so use them wisely!

Finally, note that mirrors are a specialised use for reflection probes – the latter can be quite intrinsic to general reflections and lighting in Second Life. To get a feel for how they can be used, I recommend taking a read of Reflection Probes and You by Kristy Aurelia.

4 thoughts on “Tutorial: creating a simple (prim) mirror in Second Life

    1. Yeah a I a piece WAY back on using Linden Water and purpose-built sets tipped at 90-degrees to fake mirrors. Then, of course we had projectors which could be used to make mirrors – but in that case, avatars were effectively vampires, as they cast no reflection. Now we have reflection probes – still not perfect (particularly if you have a mirror in a room with its own wall-to-wall reflection probe), but they work. I’m actually not convinced as to their value in SL compared to other aspect of the glTF project, but LL cannot be faulted for given users what many have been wanted for over a decade.

      Like

Have any thoughts?

This site uses Akismet to reduce spam. Learn how your comment data is processed.