A second look at LSL control of materials

Back on November 20, I had blogged about materials processing and the lack of LSL support for controlling normal and specular maps by means of a script. I’m sure you’ve all purchased shoes, apparel, avatar accessories and all sorts of other goods (from furniture to vehicles) where you can use a HUD or a menu to change:

  • The colour of the object or any mesh or sculpted prim in the linkset(s) of which the object consists;
  • The texture of the object or any mesh or sculpted prim in the linkset(s) of which the object consists;
  • Parameters like shininess and glow

As it stands, LSL is adequately powerful when it comes to controlling a prim’s parameters – from full bright to texturing and from glow to colour, and beyond. Now that we have materials support, we essentially add up to two extra textures on each prim’s face: the normal and the specular map (for more information, please read my previous post or visit the Wikipedia articles in this post’s “See also” section, or read Inara Pey’s excellent coverage of the matter).

Now, if the LSL functions currently used to control prim parameters (more specifically, llSetPrimitiveParams, llSetPrimitiveParamsFast, llSetLinkPrimitiveParams and llSetLinkPrimitiveParamsFast) were enhanced with new flags like PRIM_MATERIAL (or PRIM_NORMAL) and PRIM_SPECULAR which would be controlled exactly the way PRIM_TEXTURE is controlled right now (i.e. with variables like face, material/normal and specular map name and/or UUID, repeats, offset and rotation), content creators would be able to further enhance their wares, making them more attractive to consumers. Furthermore, this would give people further reasons to embrace materials processing (and also upgrade their machines with ones that are perfectly capable of using ALM at all times).

This topic was brought up as a topic in the official forums by Hart Larsson on the 3rd of July, in two of Nyx Linden’s Content Creation/Mesh Import User Group meetings (October 7th by Storm Engineer and on 21st by yours truly). It was also brought up by me on October 22nd, in Simon Linden’s Server/Sim/Scripting User Group meeting. Lindens at hand admitted it makes sense, and I believe they wouldn’t have much trouble adding the necessary flags to the functions related to prim parameter control. While I’m at it, I was pleasantly surprised to see that there is already a JIRA for it, MATBUG-359, which was filed by Moo Spyker. It’s worth voting for, and I hope more SL bloggers and content creators urge the Lab to add this functionality. Yes, I know griefers could and would abuse this functionality, but this is hardly new.

Materials processing is an exciting new direction for Second Life (and its OpenSim clones). To be completed, LSL functionality for script-based control of materials is de riguer. Let’s hope this won’t take two years to implement…




See also:


Shortlink: http://wp.me/p2pUmX-oy