Is there a way to change the color/brightness of the defaultEnvironment-skybox-reflectionTexture?
The default Environment is a simple way to create all needed environment effects, but it is a little… ORANGE So the effect this has on all objects in the scene is also a little orange, and I’d like to change that.
Is there a way to simply change the tone of the reflectionTexture without uploading a custom texture as a replacement?
chatGPT sometimes dreams, I hope this time it gives you answer nearby the truth…
Yes, you can change the color and brightness of the defaultEnvironment’s skyboxMaterial.reflectionTexture without uploading a custom texture by modifying the BaseTexture’s level and toneMappingColor properties.
The level property controls the overall brightness of the texture, while the toneMappingColor property applies a color correction to the texture. By modifying these properties, you can adjust the tone and brightness of the skybox reflection in your scene.
Here’s an example of how you can modify the reflectionTexture in your code to adjust the tone and brightness:
const environment = scene.createDefaultEnvironment();
const reflectionTexture = environment.skyboxMaterial.reflectionTexture;
// Adjust the brightness of the reflection texture
reflectionTexture.level = 0.5; // Reduce brightness by 50%
// Adjust the color tone of the reflection texture
reflectionTexture.toneMappingColor = new BABYLON.Color3(1.0, 0.5, 0.2); // Apply an orange color tone
In the above code, I’ve reduced the brightness of the reflection texture by 50% and applied an orange color tone to the texture by setting the toneMappingColor property to a new Color3 instance with RGB values of (1.0, 0.5, 0.2).
You can experiment with different values for these properties to achieve the desired tone and brightness for your scene’s reflection texture.