Materials, in Babylon, can be inspected with the inspector. In this inspector, different settings can be changed. How do identify which piece of code is equivalent to the respective setting in the inspector? I tried searching through the docs but I was unable to guess which keywords would find the correct document.
(I was hoping to learn how to grab properties from the inspector in the thread “how to grab properties from inspector” but the content of that thread had nothing to do with the title.)
You can use this:
If you open the .json produced, you will see the name of the properties that have been changed during the recording.
that is actually pretty handy
of course , in this light additionally, lets not forget to move forward with the times and make use of chatGPT , eg : I just asked :
Q: “using babylonjs framework , please list all properties of the PBR material that deal with clearcoat”
Sure, here are the properties of the PBR material in BabylonJS framework that deal with clearcoat:
clearCoat: This property sets the intensity of the clearcoat layer on the surface of the material. It is a value between 0 (no clearcoat) and 1 (full clearcoat).
clearCoatIntensity: This property sets the intensity of the clearcoat reflections on the surface of the material. It is a value between 0 (no reflections) and 1 (full reflections).
clearCoatRoughness: This property sets the roughness of the clearcoat layer on the surface of the material. It is a value between 0 (smooth) and 1 (rough).
clearCoatNormal: This property sets the normal map for the clearcoat layer on the surface of the material. It is a texture that contains the normal information for the clearcoat layer.
useClearCoat: This property enables or disables the clearcoat layer on the surface of the material. It is a boolean value where true enables the clearcoat layer and false disables it.
clearCoatColor: This property sets the color of the clearcoat layer on the surface of the material. It is a BABYLON.Color3 object that represents the color of the clearcoat layer.
you could ask for code examples as well
March 23, 2023, 2:01pm
Looks like it can read the API. Else, one could just go to the API, I guess
yes, it is just the api being repeated BUT this manner of searching is consolidated and faster. Plus dont miss out as I wrote at the end , you could follow this up or even upfront ask for code examples of each and it will do a snippet of code for each… the API docs cant do that. Again, you could go search for it somewhere on the internet but this takes like ~2 seconds to get all that focused and consolidated info at your fingertips.
Yup but it has errors
clearCoat is actually the main property where all the other ones will be
On It you will find:
All the tint props
and many more
I am not entirely sure where chatGPT sourced those props but none of them exist
It is weird cause it is a lot of time really accurate in the answer
oh hold on , i do recall hearing the training data only went up to 2021 , could it be older api code then?
dammit , they need to update the training data!
@sebavan , interesting , if you try the bing version , which uses search results I think above training data , it is still incorrect , eg :
clearCoat: This property sets the intensity of the clear coat layer. The default value is
its lists these as its source :
Which of course has the props as you mentioned … so it to must actually be using older cached search results, not doing an actual live search.
Thats a little dissapointing, ok so my previous advice on using chatGPT needs to be taken with caution
This is perfect! Thanks for pointing this out. I never knew of the “Delta Changes” thing. This feels very much like script listening for Adobe plugins