UPDATE: Inara Pey reported that Maestro Linden announced the availability of Simon Linden’s work for LSL control of materials on Aditi (the Beta grid). Things have indeed moved faster than I expected, so I’m updating the post accordingly. Anyway, the regions available for testing are roller-test102 and roller-test103, both on channel DRTSIM-253. For more information on testing these capabilities, which are still under development, as well as information on known issues, please read Inara’s post.
This is hardly breaking news, as Inara Pey has already covered the recent developments in her blog; I wanted to post about this, but I was really swamped with RL and this kept me. At any rate, here’s the (belated) low-down.
As regular readers of this blog may know, I was among those people who urged Simon Linden to look at adding LSL functions to control materials (normal and specular maps) and had blogged about it. It made sense, after all; let’s say you’ve bought a pair of shoes, or a handbag, and it comes with a texture/colour-change HUD. As it stands now, you can change the texture (the diffuse map) and/or the colour of the object and its various parts. However, you cannot change the normal map or the specular map. This means that, if the object takes advantage of materials for one type of texture (e.g. a polished crocodile leather texture), if you change the texture to suede, then you’d get the rather odd-looking result of a suede shoe or handbag, but with the scales of a crocodile’s skin; and, since the crocodile leather would be shiny, the suede would be shiny too. That would be strange, wouldn’t it?
LSL control of materials would enable content creators to really enhance the looks of their products. Also, it would allow for even more atmospheric builds. Even without any such functions, Liara Okiddo, a good friend of mine that is known to a number of SL users from the exquisite Isla Okiddo homestead region she had opened some time ago (see Inara Pey’s coverage of it), already uses regular texture animation in a prim textured with raindrop splashes (and the respective normal maps) in a small, but gorgeous build she’s currently making; she documents her work on this build on her Flickr Photostream. Just imagine the potential.
I was not alone in the drive to get the Lab to look at providing this capability. A JIRA had already been filed (MATBUG-359), and Loki Eliot had presented a use-case scenario at Simon Linden’s Server/Sim/Scripting User Group meeting on October 22nd, 2013. As far as your truly is concerned, the point I made was that “[b]y extending LSL functionality, we’d be able to change the texture, the normal and the specular map at the same time, and you’d switch from, say, top-grain leather to velvet or suede or leatherette, and you’d also get the proper look. And yes, changing from a dry to a wet look, as Loki said, is another bonus.“
Contrary to popular belief, the Lab does not consciously try to piss its customers off, or rip them off. They are being extremely cautious and careful, because they have an old, monolithic, non-modular, difficult to maintain, and even more difficult to update and upgrade piece of software on their hands. The slightest change can lead to content breakages, big or small – and this does not only concern unsupported functions and user hacks, but also regular, supported, official functions. Furthermore, because of the issues I have already mentioned, each new feature takes an awful lot of effort to implement. Materials took more than a year to develop. Group bans have been in the works for around two years. HTTP improvements have taken a long time, too. And the list is endless.
Then, there’s always the potential for abuse of new LSL functions. The lower forms of online life known as griefers have already repeatedly abused new capabilities when they came out, and they’re always trying to find ways to abuse whatever tool LL’s scripting language offers in order to anger legitimate users.
In the case of LSL-controlled materials, the main problem was the maximum permissible rate of map (normal, specular) change. If it was too high, it would cause serious problems; from what I can understand, changing diffuse, normal and specular maps at a very fast rate could cause viewer crashes. So, Simon consulted with the people present at his meetings and started looking for ways to accommodate content creators, but without leaving much scope for griefing.
What he told us on Tuesday, May 13th, 2014, was:
“I am looking at it but not promising anything. We’re trying to be really careful to understand how the server and viewers will react when stressed with a lot of material churn. From what I can tell, fast-moving material-based animation will not work well … that’s likely to be throttled or blocked somehow. But supporting something like a hud or other control that could adjust the look of an object … where it’s done rarely … is definitely possible.“
Work carried out at present
At any rate, on May 20th, Simon came up with some news. He told us “I can say I was trying to grief myself with materials LSL functions the other day. I hope we can talk more about that on Thursday at the beta user group.”, and proceeded to describe some of the functions for controlling materials via LSL that he came up with:
- [PRIM_SPECULAR, integer face] returns [string texture, vector repeats, vector offsets, float rotation_in_radians, vector color, integer glossy, integer environment]
- [PRIM_NORMAL, integer face] returns [string texture, vector repeats, vector offsets, float rotation_in_radians]
- [PRIM_ALPHA, integer face] returns [integer alpha_mode, integer alpha_cutoff]
- [PRIM_SPECULAR, integer face, string texture, vector repeats, vector offsets, float rotation_in_radians, vector color, integer glossy, integer environment]
- [PRIM_NORMAL, integer face, string texture, vector repeats, vector offsets, float rotation_in_radians]
- [PRIM_ALPHA, integer face, integer alpha_mode, integer alpha_cutoff]
He also added that “[t]here is a magic default value using NULL ids that represents “no material” … so it can be removed.” I honestly don’t really know what that means. I’ll ask when I get a chance; hopefully this Tuesday, unless RL gets in the way.
Anyway, during this Tuesday’s (May 27th) meeting, he expanded on the topic of texture animations. As it is, llSetTextureAnim() will animate all three maps that are applied to an object or face equally, at the same rate, with the same directions etc. Currently, the Lab is not looking to expand the functionality of llSetTextureAnim() to allow for independent animation of each map. The reason for this, as explained by Simon, is:
“I’m guessing that would be pretty ugly to implement … or would need some careful design and thought as it couldn’t create new material entries under the hood. I think that will have to be a follow-on feature … I can imagine it might create some cool effects but it would have to be carefully done not to blow up the materials accounting.“
I can’t tell you when we’ll have LSL control of materials on the main grid.
; at this time, Simon himself isn’t sure when some regions will be available on the Beta grid for testing. So, I have no ETA to give youSimon’s work on LSL control of materials is already available on Aditi. But, tThe first steps are being taken, and I believe that, sometime this year, we’ll be able to use GET and SET functions for normal and specular maps, albeit with limitations as to how often normal and specular maps will be allowed to change. Independent animation of these three maps, though… It seems it’ll take a considerable amount of time to implement, if it is decided that this functionality can be safely implemented.
- SL projects updates 22/2: LSL functions for materials avialable for Aditi testing – by Inara Pey
- [#MATBUG-359] Request for LSL functions related to material maps – Second Life Bug Tracker
- LSL control of materials coverage on this blog
- Articles on materials processing by Inara Pey
- Return to Isla Okiddo – by Inara Pey
- Insights into building “Le Botanique” – Flickr album and explanations by Liara Okiddo
- Transcript of October 22 2013 Server/Sim/Scripting User Group meeting
- Transcript of May 13 2014 Server/Sim/Scripting User Group meeting
- Transcript of May 20 2014 Server/Sim/Scripting User Group meeting
- Transcript of May 27 2014 Server/Sim/Scripting User Group meeting