It's been busy so I haven't been able to write a tutorial on the materials, but I can point in the right direction:
Enscape uses a custom gltf extension so it can add parameters to materials that are not supported otherwise. Also, Enscape ignores certain parts of the standard gltf spec (like alpha blending) in favor of their own implementation (this is also covered in their extension).
This is how you activate the material extension for your own assets:
1) open the .gltf file
2) add this snippet indicated in red:
3) now you can enhance the materials with the enscape extension (see example material below)
You can see there's lot of parameters to play with.
I don't have time in the coming week to write a detailed tutorial but I'll try to answer questions here. Also, if you're confused as to what some of the values do, I recommend referencing the Enscape material editor (in Sketchup, Rhino or Archicad), because most of the parameters map almost one-to-one to the editor.
For people asking about masking: check out the maskTexture part.
{
"name": "example material",
"pbrMetallicRoughness": {
"baseColorFactor": [ 0.23, 0.23, 0.23, 1.0 ],
"baseColorTexture": {
"index": 0
},
"metallicFactor": 0.0,
"roughnessFactor": 0.026
},
"normalTexture": {
"index": 1
},
"emissiveFactor": [ 0.0, 0.0, 0.0 ],
"doubleSided": false,
"alphaMode": "OPAQUE",
"extensions": {
"ENS_material": {
"materialType": 0,
"billboardType": 0,
"bumpMapType": 2,
"albedoColor": [ 0.23, 0.23, 0.23, 1.0 ],
"tintColor": [ 1.0, 1.0, 1.0, 1.0 ],
"specular": 0.5,
"imageFade": 1.0,
"indexOfRefraction": 1.0,
"isSolidGlass": false,
"emissiveStrength": 0.0,
"waterParams": {
"waterColor": [ 0.0, 0.0, 0.0, 1.0 ],
"windDirection": [ 0.0, 0.0 ],
"waveHeight": 0.0,
"waveScale": 0.0,
"causticsIntensity": 0.0
},
"roughnessTexture": {
"index": 3
},
"maskTexture": {
"index": 4
}
}
}
},