Wall colours and light

@Dshah_H, unfortunately the global illumination you showed in the sample images from your original post can only be achieved with ray tracing. The image below shows what is really happening to demonstrate how to achieve realistic shadows. You can see on the ground in front of the bench legs that there is reflected light bouncing off the floor. Also on the left side of the left leg, you can see that the shadow is not one tone, there is light bouncing off the floor to lighten the shadow on that side, but as you get toward the floor line the contact shadows are darker.

The image was taken from another thread about lightmaps and how to use them in Babylon.js, but they need to be baked in a tool with a ray tracer. The reason is that global illumination takes into account all of the bounces and scatters of light rays to create realistic soft shadows, but more importantly light that is reflecting from one surface to another. From your original examples, the chair shadows cast on the wall do not look like a straight projection of the volume of the chair because bounced light from the floor, the ceiling, the table, and the other chairs are breaking up the shadow:

image

And if you are targeting a feature phone and your scene will be static (the position of the light never changes in the room) you may want to just bake the shadow map into the albedo color of the model and render the material with an emissive texture and forget about lighting the scene with IBL or punctual lights.

However, you will need to have the entire model in Blender and light it as you would want before baking out the light maps. The only way to get realistic bounce light is to have all of your objects in the scene for that bounce to happen.

Unfortunately, there really isn’t another way to do this right now in engine in real time. And especially if you are targeting WebGL1 and feature phones.

3 Likes