SkyBox environment

Hello everyone,

I’m coming to you with a little problem with the SkyMaterial.
I don’t know if it’s the SkyMaterial itself or if I’ve configured it incorrectly, but I find that the light intensity of the sky all around, and in particular opposite the sun is not very realistic.

As you can see in the attached PlayGround: https://playground.babylonjs.com/#V4QNOJ#10

Given the position of the sun and its power, it seems to me that the sky should be much brighter than it is.

Can you tell me how it is?

Thanks in advance.

Clément.

1 Like

cc @sebavan

For my part, I configure it like this. Which seems better to me :

1 Like

Let me add @julien-moreau the daddy of the material who could shine some light on the issue ?

3 Likes

in both playgrounds if you remove the hemi light you will realize the skybox is contributing no light to the sphere or ground at all.

I dont think it provides any IBL to the scene , are you expecting it to act like a HDR Environment? Ive never used this myself before but just looking at all the sample images in the docs I can see it does not affect lighting on the model in those scenes either

1 Like

In order to create sunlight illusion one may add Directional light with shadows, as well as PBR materials - https://playground.babylonjs.com/#V4QNOJ#13

1 Like

I think the problem is not the enlightment of the ground or the sphere but the enlightment of the sky itself. When the sun is at that place, the sky behind is much too dark.

@labris, here’s another screenshot of your playground behind the camera, without changing any parameters. If the sun is that shiny, i think the sky must be shiny everywhere too.

2 Likes

Thanks for your feedback, but my problem is more with what @bvaisman said: I’m talking only about the sky.

I may have misspoken, but I’m not talking about the resulting light on objects, the ground, or the shadows.

It seems to me that the sky itself is too dark (mainly on the side opposite the sun), and that it only becomes clear when the sun is very high in the sky, whereas it should, in my opinion, be lit up, despite a lower inclination of the sun.

There is a constant in the shader called steepness.

image

By lowering this value I got a much brighter sky on the opposite side of the sun:

Maybe we could add this value to the parameters of the material.

2 Likes

You’re right, it will very be useful to get a much more realistic environment. I will create an issue because i’m not still able to do the PR by myself

2 Likes

I’ll create the PR.

1 Like

It depends on the planet you are on :slight_smile:

2 Likes

Valid :see_no_evil:

I don’t want to interfere at this stage (didn’t see the topic before hand) but whilst quickly reading the content and opening the PG, I kind of wonder why you do not use ‘luminance’ at all. I believe it kind of helps for the part that says

I kind of recall that for one of my older project, I used to tweak and animate ‘luminance’ depending on the time of day.

Not sure if this helps though :thinking:

1 Like

I thought the guys tried out all parameters already :smiley:

Lower steepness generates the same result as higher luminance. Seems we don’t need the PR.

Not sure about this one. But I believe skybox could still do with a number of ‘improvements’. The later one (I upvoted) is regarding ‘true’ days and night cycles. Nights isn’t really handled at this moment.

scene.clearColor = new Color4(0, 0, 0, 1) :rofl:

2 Likes

To be precise, we don’t need the PR with steepness

2 Likes

Yes, but that’s a bit ‘minimalistic’. :grin: Eventually, night isn’t just plain black. Eventually, there would be a moon. Eventually, I had to redo an entire ‘night’ sky(box) and time the fade between both at sunrise/sunset. :sweat_smile:

1 Like

Would be nice to have those SkyMaterial properties available in the inspector for real time tweaking, but I can’t seem to find them there?

1 Like