Materials processing reaches beta – overview and more

After recent delays as the code passed through QA, the Materials Processing viewer unexpectedly reached beta release on Friday, May 31st with the release of version 3.6.0.275764, accompanied by a blog announcement from the Lab.

What is Materials Processing?

In case you’ve missed the news to date (if you already are, feel free to skip to the info on the viewer :)).

Materials processing brings normal and specular maps to object surfaces in Second Life (prims, sculpts and mesh – but not avatar skin / clothing layers). The capability has been developed as a collaborative effort between TPV developers (notably from the Exodus, Catznip and Firestorm teams), content creators and Linden Lab.

Note: The following two sections are not intended to be a technical discussion on computer graphics mapping or a detailed analysis of normal & specular maps. It is intended purely as a broad, non-technical of the latter.

Normal Maps in a Nutshell

Normal maps (sometimes referred to as bump maps, although they are more rightly the most common form of bump map) are a means of faking high levels of detail on an otherwise bland surface by means of simulating the bumps and dips that create the detail. Normal maps can be created in several ways.

For example, when working with 3D models, a common method is to make two models of the same object: one a very complex, highly detailed model with a high polygon count, the other a much lower polygon count model with significantly less detail. An overlay process is then used to generate a normal map of the detailed model’s surface features which can be applied to the less complex model, giving it the same appearance as the highly detailed model, but for just a fraction of the polygon count, reducing the amount of intensive processing required to render it.

Using a normal map to enhance the detail on a low-polygon model. The image on the left shows a model of some 4 million triangles. The centre image shows a model with just 500 triangles. The image on the right shows the 500-triangle model with a normal map taken from the model on the left applied to it (credit: Wikipedia)

Another common way to produce a normal map is to generate it directly from a texture file. Most modern 2D and 3D graphics programs provide the means to do this, either directly or through the use of a plug-in (such as the nVidia normal map filter for Photoshop or the GIMP normal map plugin). When combined with diffuse maps, the normal map creates the impression of surface detail far greater than can be achieved through the use of the texture alone.

Normal map from a texture: left – the original texture (diffuse map) and its normal map shown as a split view; right – the material resultant from applying both maps to surfaces inside a game (credit: Valve Corporation)

Specular Maps in a Nutshell

In the real world, every highlight we see in an object is actually the reflection of a light source. Surfaces and surface details reflect light differently to one another, depending on a range of factors (material, lighting source point(s), etc.). Specular maps provide a means of simulating this by allowing individual pixels in an object to have different levels of brightness applied to them, giving the illusion of different levels of light being reflected by different points on the object.

When life gives you lemons: a mesh lemon with (l) a normal map applied, and (r) a normal and a specular map together. Note how light is apparently being reflected across the surface of the latter (credit: Mind Test Studios)

Like normal maps, specular maps can be produced in a number of ways, both within 3D graphics modelling programs and in tools like PhotoShop. As shown above, they can be combined with normal maps and textures to add detail and realism to 3D models and flat surfaces.

Second Life itself already includes a very dynamic example of how materials can be combined to create in-world effects in the form of Linden Water. This is created using an animated normal map to create the wave-like effect for the water, while an animated specular map adds the highlights and reflections. The result is a very realistic simulation of moving water able to catch and reflect sunlight.

Some key points about materials processing:

  • Effects will currently only be visible when using the Materials Processing beta viewer
  • In order to be visible in your world view, whether you are creating objects using materials processing OR whether you simply want to see them in-world, you must have the Advanced Lighting Model (previously “Lighting and Shadows” and often referred to as “deferred rendering”) option in Preferences > Graphics enabled
    • Note that this does not mean you also have to enable shadows themselves – you can leave the drop-down set to None and still see materials in use in-world, thus minimising any impact on your frame rates
    • The Lab has done a lot of work on the rendering pipeline to improve performance; as such, if you’ve not run with the Advanced Lighting Model / deferred rendering enabled on your computer due to previous performance issues you might find you can now enable Advanced Lighting Model in your viewer without experiencing a dramatic loss of frame rates
  • When creating objects which use materials processing, note that they will automatically move to the “mesh” accounting system for land impact, which can affect  the impact value assigned objects and models
  • Materials capabilities do not work when under Linden water.

Materials processing: the option formerly known as "Lighting and Shadows" - soon to appear in a project viewer
To see materials processing effects in-world, you’ll need to enable the Advanced Lighting Model on the Materials Processing beta viewer – but you do not have to enable any of the shadows options as well

Kitsune Shan has produced an excellent demonstration demonstrating using individual diffuse (texture), normal and specular maps on a prim, and then how they look when combined. Note that normal and specular maps can be used independently of one another with texture (diffuse) maps, you don’t always have to use all three (just as textures can continue to be used on their own, if required).

Download and Installation

This is possibly one of the last (if not the last) viewer releases to go the route of the “generic” beta channel, prior to the new SL viewer release process coming into effect in the next few weeks. As such, the viewer can still be found on the Second Life Viewer Beta section of the SL viewer download page. However, there are a few points to note about the initial release installation:

  • If you already have the SL beta viewer installed, the Materials Processing Beta will present itself as a mandatory update to your existing beta viewer on start-up
  • However, on installation (whether mandatory from an existing beta viewer version or by downloading the installer) the viewer will default to a separate folder (SecondLifeBeta) to any version of the beta viewer you may have already installed (which have always defaulted to SecondLifeBetaViewer)
  • The viewer will use the default SecondLife folders for cache and user settings (i.e. for Windows, the default cache will be: C:\Users\[username]\AppData\Local\SecondLife, and default user settings will be C:\Users\[username]\AppData\Roaming\SecondLife).

Principal Viewer Changes

The principal visible difference in the new viewer lies in the Build floater’s Texture tab, which now includes options for applying diffuse (texture), bumpiness (normal) and shininess (specular) maps (to refer to them as they appear on the tab) to objects and object surfaces, and each of which have their own additional options. Rather than draw-out this article too much, I’ve provided a very basic introduction to them, Playing with materials processing in SL, written in April 2013.

Materils Build floater Texture tab: The diffuse (texture) option, showing the Alpha mode drop-down options (l); the normal map options, with map picker and default texture list drop-down (c); the specular map options, in which the Use texture drop-down displays the familiar low, medium & high shiny options (r)
Materials Build floater Texture tab: The diffuse (texture) option, showing the Alpha mode drop-down options (l); the normal map options, with map picker and default texture list drop-down (c); the specular map options, in which the Use texture drop-down displays the familiar low, medium & high shiny options (r) 0 click to enlarge, if required.

Another change to the viewer is that it now include gamma correction. This means that there is a chance that scenes rendered in the Materials Processing viewer will render differently to when seen with a non-materials viewer.  How differently scenes render when compared to non-materials viewers will depend on a variety of elements (brightness, time of day light, scene content, etc).  This isn’t a bug, it’s a result of the updates made to the rendering system.

Note the viewer represents the latest code from LL, and so includes all recent viewer updates, SSB/A support and CHUI. The code has also been moved to a public repository, although it may be a while before it starts appearing in more TPVs (it is currently available in the Experimental branch of the Cool VL Viewer), most of which are currently focused on SSB/A.

Bear in mind, this is still a beta release for the viewer-side materials code, and as such there are still going to be bugs and potential issues. The Lab have therefore requested that anyone encountering issues (particularly when reproducible) refer to the MATBUG JIRA and add their own findings to any listed report on the issue, if the issue isn’t already listed, the request is to raise a bug report.

Related Links

14 thoughts on “Materials processing reaches beta – overview and more

    1. Firestorm may be a while, but the SL beta works if you want to get an early start.

      Like

        1. It’s reasonably stable. “Reasonably” being the operable term for most viewers, whatever their status.

          Like

    1. I am SOOOOO tempted to pull-out some of my old builds and start re-papering them with materials!

      Like

  1. Looks good, but I am wary of invoking Mesh land impact calculations. Last I checked, that could still do awkward things, but they’ve had time to do something.

    There’s talk of a new Firestorm fairly soon. I reckon we shall have to waity and see whether Materials gets in.

    Like

    1. The next release of Firestorm is probably unlikely to have mateirals in it; the team have been focused on ensuring the latest updates from LL for SSB/A are incorporated into 4.4.1 (or however it might be labelled, given the current beta labelling), and getting bugs stomped on. Materials doesn’t touch on much of what has already gone into the viewer (in theory), but I’m guessed a rapid merge might cause concern with regressions, and a careful merge is going to delay things beyond a point where the team may want to get the next release out of the door ready of the spread of SSB/A on the grid.

      Admittedly haven’t played with materials in anger to further test LI results with complex prims since my testing back in April. It’s now on my to-do list!

      Like

Comments are closed.