Area light on PBR materials and shadow casting ability

Hey everyone,

First off, a huge thank you for the new area light feature—@srzerbetto, incredible job! I’ve been waiting for something like this for ages :grinning_face_with_smiling_eyes:.

I do have three more major feature requests that I’d love to see supported:

  1. Full PBR material integration
    Area lights should respond correctly to all PBR material channels (both with or without textures)—roughness, normals, metallic, etc.—so textures behave as expected under area illumination.

  2. Shadow casting
    Enable area lights to cast shadows just like directional lights, giving us more realistic and flexible lighting setups.

  3. Texture attachment on color channel
    Allow static textures (e.g. gobos or gradients) to be applied directly to the area light’s color slot for added creative control.

From my tests, none of these appear to be live yet—am I missing something? And if they’re already on the roadmap, is there an ETA for when we might see them?

Thanks again for all the hard work!
Tawibox

1 should be done, do you have a repro as it feels like a bug

1 Like

And 2. is super high on @srzerbetto list ;D

2 Likes

I agree…

cf Disc arealights and support of shadows in arealights

@sebavan

Yes, I observed sth does feel like a bug for rectAreaLight.
I created a separate post here:

@tawibox

Yesterday we merged my PR that adds support for emission textures for area lights. I’m currently working on tooling and documentation but I think the emission property is already out for rectAreaLight if you want to give it a try.

The current implementation requires pre-processing to be performed in the emission texture, so we added a utility class called “AreaLightTextureTools“ that can be used for that. It takes around 3s for a texture to be pre-processed so once you have the pre-processed version of you texture you can save it and use it directly in the light’s emissionTexture.

Here is some sample code: Babylon.js Playground

As for the shadow support, we haven’t found a good implementation for it yet. So we currently don’t have roadmap for implementation.

4 Likes