Sky Material Questions

First off all… Why cant we use the Reflection Probe Cube Texture (rendered from the skybox mesh with Sky Material) be used as scene.environmentTexture

Playground Example: https://www.babylonjs-playground.com/#4R1H1U#8

Second. how come there is no COLOR to tint the sky with… In Unity, for the procedure skybox you can select a color to tine the sky with

Third … is there a way to shoe night time with moonlight looking sky ?

If the cube texture of the probe is not attached to at least one reflectionTexture property of a material, it won’t be generated.

So, you can either set pbr.reflectionTexture = rp.cubeTexture or instruct manually the system that the cube texture should be generated by doing scene.customRenderTargets.push(rp.cubeTexture);:

https://www.babylonjs-playground.com/#4R1H1U#9

Regarding tinting the sky, you can use the vertex colors of the cube:

https://www.babylonjs-playground.com/#4R1H1U#10

As for your third question, you should be able to find a tint color that matches a night sky. As for adding the moon itself and some stars, I guess it’s not supported yet (but PRs are always welcome :).

1 Like

The tint seems like it would work. Except is tints the whole sky mesh… should only tint the sky and not below horizon