Point light make ceiling dark

I have a point light and a hemispheric light in a room.
Check website:
https://carpetam.ir/
Problem is: Point light not make ceiling brighter, but hemispheric does.

In website just change Hemispheric to zero then you can see Point light not bright the ceiling.
Please help me.

Could you repro the issue in the playground ??? so that we could fiddle with the setup.

Please not default max number of lights per material is 4 so you might have reached the limit or if using pbr the default unit requires high intensity (10000) as they are physically based,

2 Likes

Here the playground
https://playground.babylonjs.com/#EN15RL#10
My problem was ceiling rotation, it was
ceiling.rotation.x = Math.PI / 2 * 3 ;
Now I change it to
ceiling.rotation.x = Math.PI / 2 ;
But still ceiling is a solid color. I fiddle with specularColor and emissiveColor but no reflection found like other sides of the room

https://playground.babylonjs.com/#EN15RL#12

Actually your initial ceiling rotation was okay I believe. As normals pointed downwards. You rotating it to ceiling.rotation.x = Math.PI / 2 made it that normals are pointed up, so that’s why the light had no effect I believe.

With that said, the reason why the ceiling appeared black though is the groundColor property of the hemilight. Setting this to white (or shade of grey, play with this), will light up the ceiling. Basically if the both diffuse and groundColor properties of the light are the same color, the hemilight will light the scene uniformly.

4 Likes

Thanks a lot @nogalo , I didn’t know groundColor exist.
But when you remove HemisphericLight and move point light, the side of the room which is closer to the point light is more darker than other sides, it is totally reverse to real.
Comment Hemis light and change distance off pointlight from ceiling like screenshot or walls.
https://playground.babylonjs.com/#EN15RL#15

You can check this behavior in 3dsMax for example

Light closer to the ground


image

Further from the ground

image
image

Now, I am not an expert, but I would say this is “real” behavior, at least for standard lights. You can take your phone for example, turn on the flashlight, and point at the table and change distance from the table and see what will happen.

How I am imagine this behavior is somewhat like this. You can see the area that rays emitted from light affect depending on the distance.

Really I don’t know what to say, I don’t want to argue but in my opinion a lamp light has 360 degree emission in every direction and with distance light get weaker, so longer distance should have darker view.
But your groundColor helps me a lot, Thanks @nogalo

1 Like

An hemi light is actually quite different :slight_smile: it represents a two color ambient with a ground of one color and a ceiling as another one.

Yeah, but the “issue” here is pointLight. Hemilight is not the one in question :smiley:

2 Likes

lol yup missed this one :slight_smile:

1 Like

I guess the ceiling issue is different, but if you want your point lights to behave realistically, then you have to use PBR (physically-based rendering) materials or it won’t be physically-based :smiley:

https://playground.babylonjs.com/#EN15RL#17

2021-06-24_17-25-47

2 Likes

@bghgary thanks for caring, It’s better now, but still not enough,
Check out my website:
https://carpetam.ir/
Imagine a real room in night, when ambient(environment) light is too low, and lamp is emitting lights in a room, in my website you can imitate this condition, when user make ambient to 0 and Lamp to 7, like screenshot:


It is like someone had smoked in his room for many years :slight_smile:
And PBR show me error:
Cannot read property 'environmentBRDFTexture' of null
Did I miss something in my code? I just change StandardMaterial to PBRMaterial

pbrMaterial.reflectionTexture = “your hdr/env map”

or on scene level

scene.environmentTexture = “your hdr/env map”

Now I am not sure what are you doing with the code exactly, but you have to have some environment map loaded for PBRMaterials to work.