Allow reading of all parameters of a PBR material
tracked
Cain Maven
The way it is now, reading the PBR properties of a face using llGetPrimitiveParams() with the PRIM_GLTF_X flags will only return parameters that are overrides of the underlying material asset. In other words, it is impossible to read all PBR texture parameters via scripts. This is a severe restriction, and one that appears to be more severe than what applies to Blinn-Phong textures.
Being able to get and set all texture parameters is very useful in a number of contexts. This is unfortunately made very difficult if not impossible in the current model.
We need way of accessing all parameters of PBR materials applied to a surface, not just the overrides. While it may be necessary to impose permission-based limitations, at a minimum it should be possible to do this on objects that the user has modify permissions on.
PS: It's not always obvious what constitutes an "override." For example, all that is needed to create an override of the Tint parameter is to click the color swatch and then immediately close the color selection dialog without clicking a color -- any color, even the currently selected one. The tint clearly doesn't change, yet the parameter is now an override.
Log In
Cosmic Linden
If your main use case is "I want to override this PBR material property and only that property", then you may consider: https://wiki.secondlife.com/wiki/LlSetLinkGLTFOverrides
Cain Maven
Cosmic Linden Sure, it's half a loaf... but what I'm asking for is really llGetLinkGLTFParams() -- or something like it :)
To be clear: what I'm after is a way of reading all PBR properties of a face without any knowledge of the original material asset. Being able to read and write all parameters really is an important capability for a number of use cases.
Moo Boo
Here's how I circumvented the poor PBR implementation. You gotta proxy the material UUID to a server outside of SL, have it read from the CDN directly (http://asset-cdn.glb.agni.lindenlab.com/?material_id=<uuid>), remove LL's sketchy homebrewed file headers, and voilá there's your material parameters and texture UUIDs in a nice and normal JSON format.
Takes a few lines of PHP to do so and can be done on a free host so it's not an additional expenditure. Sadly LL's servers are prevented from connecting to themselves ~"for security reasons"~ so it has to be done through an external server.
Have fun!
Cain Maven
Moo Boo That's a cool workaround -- but a bit too complex for everyday use. An LSL function is what I'm hoping for :)
MissArrielle Resident
Yes. This needs to happen.
Spidey Linden
tracked
Issue tracked. We have no estimate when it may be implemented. Please see future updates here.
Gorman Indigo
this makes total sense! Cain Maven is right! this should be implemented at once. thank you.
Farris Fargis
I totally agree with Cain on this. Please implement as soon as possible. Thank you!