Playing with materials processing in SL

Update, April 10th: Use of some of the mateirals processing capabilities – notably Alpha Masking and Emissive Masks – can have a significant affect on Land Impact valuse – see my week 14 SL projects update for details.

On Monday April 8th, Linden Lab released the first public cut of the Materials Processing project viewer. As the server-side of the materials processing support was deployed to the main grid earlier in the year, this release means that materials processing – with some caveats – can be experimented with by all.

These caveats are that the viewer is still very much an alpha release, and as such is both subject to change and should not be relied upon as a primary viewer for everyday use in SL. Also, as elements of the viewer may change before it reaches a release status, it is viewed as advisable by LL that people do not use the materials capabilities on MOD / NO COPY items.

So how does it all work? I provided an introduction to materials processing as it applies to Second Life back in 2012. However, the following will hopefully provide a summary for those who haven’t kept up with the news as well as providing a look at the viewer itself.

What is Materials Processing?

Materials processing is the combining of various computer graphics “maps” to significantly increase the level of detail that appears on any object or surface within a computer game. Within Second Life, textures (themselves a form of computer graphics map called a “diffuse map”) are used to add detail to in-world objects and surfaces. The new materials processing capability will introduce two further kinds of computer graphics map – normal and specular –  to Second Life which can be used alongside textures to dramatically increase the detail and realism of objects and surfaces.

  • Normal maps 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 – such as from a texture (diffuse) map using a suitable graphics application (and plugin, if required), or by producing a high-quality model (mesh) and using an overlay process to generate a normal map which can then be applied to a lower-quality model of the same object (i.e. one with a lower triangle count) to simulate the same level of detail as the high quality model, as shown below.
Using a normal map to enhance the detail on a low-polygon model
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)
  • In the real world, every highlight we see in an object is actually the reflection of a light source. Surfaces reflect light differently to one another, depending on a range of factors (material, lighting source point(s),  etc.). Specular maps simulate this by allowing individual pixels in an object to have different levels of brightness applied to them, giving the appearance of different levels of light being reflected by different points on the object. Like normal maps, specular maps can be produced in a number of ways, both within 3D graphics modelling programs and in tools like PhotoShop.
A rendering of a lemon using diffuse, normal and specular maprs to create a life-like look and feel
A rendering of a lemon using diffuse, normal and specular maps to create a life-like look and feel

The new capabilities in Second Life allow diffuse (texture), normal and  / or specular maps to be applied to in-world objects (prims, meshes), to achieve a much greater level of realism in their appearance.

First, Create Your Maps

In order to use the new capabilities, you must obviously have the required maps. These ca be created in numerous ways,  and I’m certainly not qualified enough to give a hands-on demonstration myself. As such the following are intended merely as possible pointers.

Normal maps can be readily produced directly from an associated diffuse (texture map), which may be the most common way to do so. Both Photoshop and Gimp, for example, support normal map creation in this way, each using a suitable plugin. Photoshop uses the nVidia normal map filter for example, while Gimp uses a plugin of its own. There are numerous tutorials available on YouTube explaining how to create normal maps using either Gimp or Photoshop and these plugins.

Left: A diffuse map (texture); right: a normal map created directly from the texture
Left: A diffuse map (texture); right: a normal map created directly from the texture

As a user of Gimp, I found the following tutorial by vscorpianc  provides a sold look at getting going with normal map creation, as it covers installing the required Gimp plug-in and also offers-up various resources for image files to play with, if you don’t have anything suitable yourself.

For those working with mesh, there are also various ways in which to produce a suitable normal map – including, as mentioned above, using an overlay from a high-quality model on an identical model of lower quality. Again, as I don’t use the likes of Blender, Maya, et al, You Tube offers what appears to be some easy-to follow tutorials for those who need them.

The same is true for producing specular maps within various graphics applications as well – such as bond1TGC’s tutorial on Specular Map Creation Tutorial or Aleks Markelj’s detailed tutorial Using Photoshop to create Diffuse/Specular Maps.

Continue reading “Playing with materials processing in SL”

Materials project viewer released

Update: subsequent to this article being published, the Lab issued their own blog post on the new project viewer.

Linden Lab released a project viewer for materials processing on Monday April 8th, to go with the server-side support already released.


Materials Processing video demonstration

This is very much an “alpha” status viewer, and as such comes with a series of caveats, including:

  • The viewer is still very fragile
  • It is still subject to change in various ways
  • It should not be used on content you care about – particularly if said content is MODIFY / NO COPY.

As Oz Linden wryly commented at the Open-source Dev meeting where the release was announced, “Regular attendees may notice some small changes in my raft…. I had to reconstruct it because I messed it up playing with this viewer (mostly my fault).” So, if you plan to download and play with the viewer, be warned!

For information on the materials project, please read my overview.

The download itself is available on the Lab’s Alternate Viewers wiki page.

Related Links

Server-side Baking / Appearance update

The Server-side Baking / Appearance  (SSB) project took a significant step forward when, as reported in my week 14 projects update, the viewer-side code reached the SL development viewer. Barring any significant issues, it should also be appearing in the SL beta viewer very shortly.

While it will still be a while before the new service makes its debut on the main grid, viewers supporting the new service are liable to start appearing over the coming weeks and communications from the Lab and TPVs on the subject are liable to increase. As such, it seemed appropriate to blog on the most recent discussions on viewer updates in general (LL and TPV) and on the upcoming server-side code deployment, using the TPV Developer meeting on Friday April 5th as a reference.

A Quick Recap

For those who are still perhaps unaware of what Server-side Baking / Appearance is, I have an overview of the project, with detailed information on what it is, how it will work and what will change. However in short.

  • What is it all about? Primarily solving the issue of “avatar bake fail” (when your skin or clothing layers appear blurry to you or those around you, or when you change outfits and you see yourself wearing the “new” outfit and those around you still see you in the “previous” outfit). This happens because the current process of “baking” your avatar’s appearance (the skin and clothes it is wearing)  is driven by the viewer, and hiccups c in the viewer / server communications can result in the server failing to receive all the necessary information following a change of outfit & is unable to process it, leading to the problems mentioned above.
  • What does it do?
    • The new service moves much of the emphasis for the baking process from the viewer to a series of dedicated servers (sometimes referred to as the “ovens” required to do the baking), which should reduce the amount of viewer / server communication and ensure the “bake” process is more robust.
    • As some of the work is still carried out by the viewer, it also is being updated with new code
  • Why Should I Care? The new service is incompatible with the avatar baking mechanism currently in use. This means that once the server-side of the new baking service starts to be deployed on the main grid, viewers which have not been updated to use the new service will no longer function correctly; people using them will see those who are using updated viewers as permanently grey figures (other than attachments).
The SSB problem in part: I'm stabding on an SSB-enabled region. On the left  - as I appear to others who are using an SSB-enabled viewer; On the right, as I appear to others who are using a viewer which does not support SSB.
The SSB problem in part: I’m standing on an SSB-enabled region. On the left – as I appear to others who are using an SSB-enabled viewer; On the right, as I appear to others who are using a viewer which does not support SSB. The latter group would appear as unrezzed ghosts to me

Where Things stand and the Road Ahead

In order to try to make the switch-over between the “old” and “new” baking services as smooth as possible, and minimise the issue of “grey” avatars, the actual deployment of the new service will effectively be in two parts:

  • Because the viewer side of the SSB code will work with the existing baking service, this will be deployed first, in the hope that people will upgrade their viewers as new versions (both the official viewer and TPVs) become available
  • The server-side code will start to be deployed on the grid as the viewer code reaches the SL release viewer; however, this will be a gradual process, driven in part by the number of people either updating to or transitioning to SSB-capable viewers.

The Viewer – LL and TPVs

As noted above, the viewer code for SSB is now available in LL’s development viewer (as of release 3.5.0.273529), and will shortly be arriving in the SL beta viewer before moving to the release viewer (possibly in around two weeks, although this does depend on whether or not unforeseen issues arise when the code is in either the development or beta viewer).

Third-party viewer developers have also been working on integrating the SSB code into their viewers (and several already have pre-release / alpha / experimental versions of their viewers with the code already implemented, which they have been making available to their users for testing purposes). As such, TPVs are liable to be releasing updates to their viewers in the next few weeks which users will be strongly advised to take for the reasons noted above.

Quite when TPVs will start releasing SSB-capable versions of their viewers is going to be something of a balancing act. Given that there is a chance that unforeseen bugs / issues are found within the viewer code while it is in the SL beta viewer channel, some may opt to not make any release until after the code reaches the SL release viewer channel in order to avoid the risk have having to make two (or more) updates in quick succession as a result of bugs being found. Others may opt to make a release alongside the upcoming SL beta viewer release, and track how things progress, updating their viewer as required.

Communications

A vital part of the deployment process is that of communications. Therefore, in the coming weeks users can expect to see both LL and their preferred TPV developers communicating directly on SSB as viewers become available / server-side deployment commences in order to encourage as many as possible to update to a viewer supporting SSB ahead of the the server-side deployment.

Continue reading “Server-side Baking / Appearance update”

SL projects update week 14 (3): Viewer releases, server-side AO

Server Deployments – week 14

On Tuesday April 2nd, the Second Life Server (SLS or Main) channel received the interest list update which has been running on the Magnum RC channel for weeks 12-13, together with fixes for the following issues:

  • BUG-1779 – Updates for objects that are out of view are delayed for a maximum of 5 seconds, at which point they will be sent
  • BUG-1795 – “Agent appears in incorrect position to other agents after being moved by a sim teleporter”
  • BUG-1814 – “No object updates from vehicles after some region crossings” – yes, the vehicle region crossing bug fix reaches the Main channel (and should be on BlueSteel and LeTigre following the RC deployments on Wednesday 3rd April).

Deployment release notes.

On Wednesday April 3rd, the Release Candidate (RC) channels received the following updates:

  • BlueSteel and LeTigre received the same package as week 13, which includes the new Animation Override LSL capabilities together with the following:
    • The changes deployed to the Main channel on Tuesday April 2nd
    • A fix for BUG-2134 – “Avatar pre-jump is sporadic”
    • Release notes are available (BlueSteel link)
  • Magnum received Monty Linden’s new server-side HTTP updates – release notes.

SL Viewer

There has been some activity within the various viewer channels, and the promise of more to come.

The Communications Hub User Interface (CHUI)

CHUI has now reached the  viewer release channel with LL issuing viewer 3.5.0.273444. This release includes both the new CHUI UI for conversations, etc., as well as a lot of additional refactoring of code. A blog post has accompanied the launch, complete with Torley’s original video on the interface.

Server-side Baking Viewer Code

The viewer-side code for Server-side Baking / Appearance (SSB) reached the SL development viewer with the release of version 3.5.1.273529. With CHUI now in the release viewer, SSB should also be appearing in the SL beta viewer view shortly.

Materials Processing

“Materials is actually making great progress,” Oz Linden reported at the Open-source Dev meeting on Wednesday April 3rd. He went on to say the latest work on the code is showing promise and was due to go to LL’s QA department. If things go well with QA, it is possible that a project viewer could finally be emerging from the darkness. However, as Oz again warned this will only happen when, “We’re confident that 1) it won’t do any serious harm, and 2) it’s not so terrible that it’ll give the project a black eye.”

Nevertheless, things are moving.

Server-side Animation Override Capabilities

New server-side AO capabilities coming soon
New server-side AO capabilities: LSL functions now being deployed to main grid

While the new Animation Override LSL capabilities have only just rolled-out BlueSteel and LeTigre, the server has actually supported overriding animations for over a year; it has just lacked the required LSL functions and some bug fixes. This means that if you use the new capabilities on either BlueSteel or LeTigre, any animations you set will continue to work across the entire grid until you log out.

In noting this at the Server Beta user group meeting on Thursday April 4th, Kelly Linden went on to say:

The new override functions do not allow setting by UUID. My original version (well over a year old) set by integer constants. However there was some desire internally to make the system more flexible, to allow for different states or modifying the state machine diagram, and for that string constants were used. Right now those string constants are converted to integer constants for use in the existing internal state machine.

In other words, the system allows animations to be specified by name (string constant), making the capability somewhat more user-friendly than might have been the case has UUIDs for animations been required. The the string constants are converted to integers for handling by the server’s state machine (the “engine” for animations on the server-side) means that it should be possible for the state machine to be updated in the future without potentially breaking content using the capabilities.

In answering a question on the lack of support for animations such as idling and typing, Kelly again explained that some animation types are not supported by the state engine. These are either handled within the viewer (idling) or elsewhere in server (typing), as such they fall outside the new AO capabilities. Swimming is also excluded, although Kelly couldn’t remember if that is handled viewer-side or elsewhere in the server.

HTTP Updates

Monty Linden’s ongoing HTTP work reached the Magnum RC channel. For those interested in monitoring SL’s port usage, Monty provided a quick summary in response to a question on texture fetches posted to the deployment thread:

The Texture Console speaks truth for texture fetches, either http or udp.  If that is quiet while this transport is going on, it’s something else …. and here are some rules that will determine the traffic:

  • Port 12046 but textures are quiet => mesh fetches
  • Port 12043 (corrected, was 12042) => other HTTP services (“Capabilities”)
  • UDP port 12035, 13000-130XX => simulator communications

Related Links

SL project updates week 14 (2): Server releases; deformer

Deployments for Week 14

SLS Main Channel

On Tuesday April 2nd, the Second Life Server (SLS or Main) channel received the interest list update which has been running on the Magnum RC channel for weeks 12-13. This includes:

  • More correct sorting when streaming objects to viewer
  • More objects are categorised as cacheable by the server (improves scene loading speed when revisiting regions)
  • Packed full ObjectUpdate data recycled for multiple viewers (optimisation of how UDP packets are built)

Additionally, the package includes fixes for the following issues:

  • BUG-1779 – Updates for objects that are out of view are delayed for a maximum of 5 seconds, at which point they will be sent
  • BUG-1795 – “Agent appears in incorrect position to other agents after being moved by a sim teleporter”
  • BUG-1814 – “No object updates from vehicles after some region crossings” – yes, the vehicle region crossing bug fix reaches the Main channel (and should be on BlueSteel and LeTigre following the RC deployments on Wednesday 3rd April).

As always, there are release notes for the deployment.

Following deployment, there have been assorted reports that:

  • Region crossings in vehicles are generally a lot better – although the BUG-1814 fix will not reach the entire grid until after the RC deployments for Wednesday 3rd April (see below). However, feedback is pretty much in line with my own Magnum tests in my Mark XI Spitfire
  • There are reports that the fix for BUG-1779 is not working in all cases – Whirly Fizzle reports that her Meeroos are still suffering the same update issue as prior to the roll-out
  • There are also reports of increased issues with prims / parts of linksets failing to rez until right-clicked upon – although there is some speculation that this might be worse for some TPVs as they may not have recent code updates from the Lab.
Prims failing to rez until right-clicked: issue more prevalent?
Prims failing to rez until right-clicked: issue more prevalent?

Release Candidate Channels

On Wednesday April 3rd, the Release Candidate (RC) channels should receive the following updates:

  • BlueSteel and LeTigre should receive the same package as week 13, which includes the new Animation Override LSL capabilities. In addition they also should receive:
    • The changes deployed to the Main channel on Tuesday April 2nd
    • A fix for BUG-2134 – “Avatar pre-jump is sporadic”
    • Release notes are available (BlueSteel link)
  • Magnum should receive Monty Linden’s new server-side HTTP updates (see below) – release notes.

SL Viewer

The Mesh Deformer project viewer was finally updated on Tuesday March 2nd with the release of version 3.5.1.273384. There are no changes to the deformer with the release – which does see the deformer code now merged with the CHUI codebase.

HTTP Updates

Monty Linden's HTTP updates should arrive on the Magnum RC on Wednesday 3rd April, assuming no last-minute hitches
Monty Linden’s HTTP updates should arrive on the Magnum RC on Wednesday 3rd April, assuming no last-minute hitches

The next stage in Monty Linden’s HTTP project should reach the Magnum RC channel on Wednesday April 2nd. these updates can be briefly summarised as:

  • More complete and more correct headers on texture and mesh fetches – these should ensure the viewer is better able to handle objects as they are downloaded to it
  • Keepalive connections for some HTTP-based services

Notes on the latter point explain that:

The behavioral change for HTTP connections marks the beginning of support for persistent (keepalive) connections. Services transiting the capabilities router, at ports 12043 and 12046, may honour a request for keepalives and keep a connection open after request completion. These services may include such activities as texture and mesh fetching, event delivery to viewer, HTTP-In for LSL scripts, asset uploads and inventory operations. Benefits from keepalives include immediate and future throughput increases and less TCP connection churn (which often disrupts consumer-grade networking equipment). The exact set of services that will see this is expected to change over time.

In other words, connectivity between the viewer and the server should be somewhat more robust and, in the case of older router models, less taxing.

Server-side Baking Avatar Z-offset

I missed the Monday Content Creation meeting on April 1st due to family commitments. However, I understand from information received that the question of avatar height offsets. The solution, as currently offered by LL, is considered to be less than optimal for all situations. In replying to the question, Nyx Linden apparently indicated that the Lab do not consider the matter fix in light of further examples having been given, and that further work in correcting matters is in-hand. Whether these further fixes address all concerns remains to be seen.

Other Items

Griefing

Griefing was once again a subject of discussion at the Simulator User Group meeting on the 2nd April. As with the last time the recent increase in mainland griefing was raised, LL are not willing to discuss specifics in terms of what they’re aiming to do. However, Simon Linden did provide more general feedback in response to questions.

Nothing new to report about griefing tools … but it is on our radar and definitely a concern … When looking at griefing problems the most serious issues and the ones that get the fastest attention is anything that can crash a region or viewer. After that there’s a broad spectrum mostly based on the level of pain and if there are things that can or can’t be done about it already. The fight has been going on since long before I joined the Lab.

During the discussion, Simon was at pains to again point out that those Lindens attending the User Group meetings are not responsible for dealing directly with griefing accounts – that is the role of the Governance team. However, he also made it clear that there are internal LL meetings where griefing is discussed, saying:

The Lindens that come here like Andrew, Kelly and myself are server developers, so we focus on features there that can help. Dealing with accounts is outside our area and the Governance people handle that … We do regularly meet and discuss what’s going on … everyone is aware of the recent increase in griefing … It’s gotten a lot worse recently. Not due to technical failures and it becoming easier, but from more griefers.

Simon also indicated that the bug which allowed objects to get stuck in limbo at the edge of a region, where they could be exploited by griefers, now has a fix in the BlueSteel and LeTigre RC channels, and that measures to help combat particle spamming are “in the pipeline”, with the hope that a project viewer will be featuring these will be available soon.

SCR-19 – Script function to return objects remains a popular choice of handling griefing objects, and Simon – purely as a brainstorming exercise asked for feedback on region controls which could be turned off / options which could help make land more “griefer-proof”. Some of the responses included:

  • Having particles require group permissions
  • Banning individuals based on their group membership. This raised questions over privacy and usefulness / effectiveness. The former as it would require a means to discover someone’s groups, even if hidden; the latter points because it would only otherwise work on a person’s active group, it would be relatively easy to circumvent (by leaving the group, if necessary)
  • Blocking object rezzing based on the creator’s name
  • Turning off public script operation over explicit banned/no access parcels, making the return time for public rezzed objects over explicit banned/no access parcels 1 minute.

Again, none of this should be taken as an indication that any of the above will be explicitly developed by LL; rather they are likely to be added to the melting-pot at the Lab and help LL better understand where user concerns lay and what directions they should consider for further technical responses to griefing issues.

Mesh Object Physics Shape

There has been a (possibly long-standing) problem with the physics shape for some mesh objects being changed unexpectedly. Lares Carter, speaking at the Simulator User Group, described it thus:

The physics shape type for mesh objects gets changed from Prim to Convex and doesn’t change back until the object is right-clicked. This only happens for linksets that contain a prim with a target omega property. Things that can trigger the change: movement changes and rezzing the object. There also seem to be other factors as it can happen for static objects too.

The issue has been reported in BUG-2147, and differs from the problem wherein some objects / parts of builds (such as floors, walls, etc.) fail to rez until clicked upon (but can be walked on, etc.), in that the mesh object can be seen and can collided with – but the physics shape is incorrect. There are reports that analysing the physics model in the mesh uploader can be used by content creators to mitigate the issue. However, this issue is now on the Lab’s radar in terms of further investigation.

 

SL projects update 14 (1): CHUI, SSB, and getting immersive

The best laid plans of mice, men and Linden Lab gang aft a-gley…

Back in my week 12 update, I reported on the Lab’s hoped-for deployments, viewer-wise in the upcoming weeks, noting that if all went well, CHUI would reach the release viewer late in week 13, and open the door for Server-side Baking to move to the Beta viewer at the start of week 14 – possibly even on April 1st (and no, that wasn’t an early April Fool’s joke from Oz!).

However, a couple of things have come up which are tweaking things slightly.

Communications Hub User Interface

There are a number of unresolved issues with CHUI, not all of which might necessarily prevent the code moving to the release channel, but some of which do have  significant performance / useability impacts, such as:

  • CHUIBUG-132 – Frequent performance issues on recent CHUI builds – fast timers show problem is in “URL Complete”
  • CHUIBUG-183 – cancelling an inventory search before the search is complete results in blank inventory contents (issue thought to be the result of a refactoring of the inventory code which is included with the CHUI code)

As a result, there was a further release of the CHUI beta viewer on April 1st (3.5.0.273174), which was followed by a further development viewer update (3.5.1.273259) on the same day.

Server-side Baking

Server-side appearance baking - no beta viewer just yet
Server-side appearance baking – no beta viewer just yet

It had been hoped that the viewer code for SSB would move to the beta channel once CHUI had moved to the release channel. As CHUI is now remaining in beta for a while longer, the move with SSB has been delayed.

In terms of SSB’s viewer beta run, LL are re-assessing the time frame. Again, on March 22nd, Oz Linden suggested that the beta run would be between two and four weeks and liable to sway towards the latter – with the caveat that a lot depends on issues / bugs which are found during the beta run. The current thinking at LL appears to be more pragmatically focused on seeing what occurs during the beta run, rather than pinning matters to a firm timescale – as such, SSB is liable to be in beta for around two weeks, possibly longer.

However, in terms of the server code, the plan remains to cut-over to the new server code capability after the SSB code has reached the release channel of the SL viewer – although again, it is possible some initial testing regions may be running on Agni prior to the SSB code appearing in the release viewer. Until now, LL have indicated that the server-side deployment will be gradual, again as indicated in my week 12 notes linked-to above; however, exact plans still have to be confirmed within the Lab, so this may well also be subject to change in the future.

One issue with the SSB server-side code is that crossing from an SSB-enabled region to a non-SSB region triggers the need for a manual rebake (going from a non-SSB region to an SSB-enabled region will trigger and automatic rebake), and some concern has been raised that this might cause some upset as the SSB code is deployed. However, and as Oz Linden points out, manual rebakes are currently a fact-of-life on SL, and as such, this is unlikely to be seen as a reason for an immediate deployment of SSB right across the grid; nor does it warrant time being spent on ensuring rebakes are handled automatically during such region crossings as once server-side deployment does commence, the issue is liable to be relatively short-lived.

Oculus Rift and Leap Motion

The Oculus Rift headset has been garnering a lot of interest. While still very much under development, the headset has already gained considerable support from the likes of Valve Software and other game-makers. This has inevitably lead to some asking whether LL have their eye on the technology.

Whether they have or not is unclear. What is clear, and while not quite the same, is that there has been some informal experiments with the Leap Motion system, courtesy of Simon Linden, as reported on in the SL blog and also in these pages.

Commenting on the Leap Motion work which chairing the Open-source Dev meeting on monday April 1st, Oz Linden said, “If an open source dev wanted to pick up what Simon started, that would be great. That was a side project of his, and right now we don’t have time to do much more with it internally.”

The code for the work Simon has completed was also made available when his experiments were made public – so if anyone is up for the challenge, the links are still live!