is there a fast way to change the saturation of a Material using a texture?
i would like to have a simple way to make this material to grayscale, but the texture is color:
hi @pcace - good question. If using a color curve will work for you read below. Otherwise If you can provide an imperative example we can maybe work backwards.
I haven’t written <colorCurve> to be understood by the reconciler, but you could add it at runtime to the renderer (automatically working would require change to react-babylonjs or you can add it dynamically yourself) to support. ie:
/* this will not work, but it could be made to work */
<standardMaterial cameraColorCurvesEnabled ...>
<colorCurve assignTo='cameraColorCurves' globalSaturation={100} />
</standardMaterial>
In the absence of that you will need to use one of the escape hatches to drop to imperative code.
Very interesting! Thanks a lot!
is there any reason why curve.globalExposure does not show any change?
And: Color curve does apply to every material in the scene right? so this here is all b/w:
would there be any change to make it so that there is only one object listening to the colorcurve?
I would suggest to start a new question without JSX and then you will get more help from the general community. I don’t know to apply to color curve to a single material, but I was expecting that what I sent you would (although the “global” in the property name is maybe a hint!!).
You can isolate the behavior to one material by not sharing the image processing configuration with the rest of the scene by creating a new one just for one material like the ground here: https://playground.babylonjs.com/#599J9G#1