ST_JsonString
Updated at:
Returns the user-defined JSON string of the material object.
Syntax
cstring ST_JsonString(material material);Parameters
Parameter Name | Description |
material | The material object. |
Description
This function returns a user-defined JSON string in a material object. If no user-defined JSON strings exist in the material object, NULL is returned.
Examples
SELECT ST_JsonString(ST_MakeMaterial('{"pbrMetallicRoughness": {"baseColorFactor": [ 1.000, 0.766, 0.336, 1.0 ], "metallicFactor": 0.5,"roughnessFactor": 0.1}}', ARRAY(SELECT the_texture from textures)));
-------------------------------
{"pbrMetallicRoughness":{"baseColorFactor": [1.0,0.766,0.336,1.0], "metallicFactor":0.5,"roughnessFactor":0.1}} Is this page helpful?