Can't inspect Fresnel Parameters

Hi, is it possible to inspect the FresnelParameters (i.e emissiveFresnelParameters.leftColor) of the standardMaterial? It is possible with a GUI control like ColorPicker().

This code doesn’t work:

mat.inspectableCustomProperties = [
    {
        label: "LeftColor",
        propertyName: "emissiveFresnelParameters.leftColor",
        type: BABYLON.InspectableType.Color3
    }
]

https://www.babylonjs-playground.com/#TAZ2CB#53

Thanks.

inspectable can only be referencing object properties directly.

You could nevertheless add a property to material matching the child fresnel left color like this:
https://www.babylonjs-playground.com/#TAZ2CB

Hope that helps.

Hi Sebavan, I think you forgot to add your code to the playground or you provided the wrong link?

Good catch, forgot half of the url…

https://www.babylonjs-playground.com/#TAZ2CB#54

1 Like

Awesome! Very handy static method. Thanks for your help. I can now get rid of my 400 line fresnel gui stack panel. :grinning: