Most of the talk I’ve seen about the Materials Project has been connected with the goodness that normal maps and specular maps are going to bring to the party. While these features are going to be great there’s also even more stuff packed into the materials system, so I thought I’d do a quick tour round one of the features I haven’t seen mentioned so much : Emissive Masks.
If you’ve done much building in SL you’re probably familiar with the “Full Bright” checkbox on the texture tab of the build floater. Prims that have this option set always appear brightly lit, even at night – in effect they are emitting their own inner light, so they never fall into shadow. This effect is known as being emissive, or an emissive material.
In the current version of SL you can only apply the emissive property to a prim an entire face at a time – you have no fine control over it. With the Materials Project you can now get fine control over how emissive every bit of a face’s surface is.
What does this mean in practice? I’ve cobbled together an example from an original image downloaded from CGTextures – the front panel of an Audio mixing…gizmo. I don’t know the technical term for what it is; it just had the right amount of shiny when I was looking for a tutorial texture 😉
I’ve taken the original texture, made an emissive mask from it, and applied it to a prim with a little glow thrown into the mix:
By day the effect is to give a little selective glow to the panel. By night the effect is far more dramatic – the illuminated parts of the panel really pop.
To help you achieve this effect yourself I’ll need to cover two main topics: Creating the emissive mask and then how it’s combined with the original diffuse texture for upload.
Creating the Emissive Mask:
The emissive mask is another one of those greyscale masks that are going to be cropping up a lot when you’re dealing with materials – in this case the whiter the image is at any given point controls how much light it will seem to emit.
To make the emissive mask from the original texture I first converted it to a greyscale image – that takes care of the greyscale part of the map.
Then it’s a case of painting black over every part of the image that I don’t want to be emissive. In this case it took about ten minutes to carefully black out everything except the glowing displays and indicator lights.
Combining the Texture and Emissive Mask:
Now, to create a texture that uses the emissive mask you must take the original texture and apply the emissive mask to it as an alpha mask. Your graphics editor (and every other piece of software) will interpret this as transparency rather than emissive but once it’s uploaded we can instruct SL to interpret it as we like.
Once the combined texture (original + the emissive as an alpha mask) is uploaded to SL we can get to work on it. Create a simple box prim, select a single face and apply the texture to it. This will look weird at first because SL will interpret the alpha layer as transparency by default.
In the build panel’s texture tab you need to look for the “Alpha Mode” dropdown and change it to “Emissive Mask”. The Materials Project viewer can interpret the alpha mask of a texture in different ways, which is efficient but means that you can’t have a texture with an emissive mask that is also transparent in parts. Swings and roundabouts. Once you set the Alpha Mode to Emissive Mask the prim will look much like the screenshots further up this post.
To give some more life to the surface add a little Glow and it’ll really look like those lights are shining out.
Adding More to the Shine
The emissive mask doesn’t really make the surface of an object light up – it’s really just a trick that makes parts of the surface always look bright. We can use some of the existing features of SL to push things a little further, though.
For some time now we’ve been able to create “Projectors” – prims that project a texture as light into the scene. If we combine this with the emissive mask we can get some really nice effects.
To see this in action, take a prim with an emissive mask and look in the “Features” tab of the build floater. In there are the light options where you can set the texture it projects. Turn the light on for the prim and set the projector texture to the same combined diffuse/emissive texture created above. The surface will now not only seem to shine when viewed but it will also project its light into the scene.
Now the panel not only glows and shines in the right places but actually shines that light onto passing avatars.
Using a projector isn’t perfect – it actually projects a mirror image of what the emissive surface should be projecting into the scene. A little judicious use of the projector’s focus hides this well 😉 I haven’t played enough with the Materials Project to know for sure, but you can probably get it all to work precisely with one texture so long as you’re flipping the x-axis in the right places on the texture tab.
Anyway, that wraps it up for this quick look at emissive textures. Now we can make control panels that seem to light up and cast dramatic light across our avatars’ faces along with a million other things I’m likely too dense to imagine – over to you 🙂