Angle of incidence support for RectAreaLight

RectAreaLight is used to show window in the room. But there is no way to provide angle of incidence in such cases.

I have windows in my room which throw light perpendicular to the direction of the window. I want to implement lights in such a way that they show light based on the time of the day. That is, if it is morning time light should be coming from east direction and at evening time light should be coming from west direction.

If I change the target the reflection of the light and its helpers also rotate making the view upleasant. I can rotate the helper again to the original rotation separately but that also shows half of the window as dark. Is there a way to achieve realistic sun based directional light using rectarea light such that windows are completely lighted and yet the light coming from them is slanted in the direction of the light.

Note that room walls are completely solid and I can’t place a single sun object and have cut outs for all the windows.

light = new THREE.RectAreaLight(color, intensity, width, height);
light.lookAt(new THREE.Vector3(target.x, target.y, target.z));

Some screenshots depicting the situation.

rsz_1screenshot_from_2020-02-10_18-45-12 rsz_screenshot_from_2020-02-10_18-45-57 rsz_screenshot_from_2020-02-10_18-46-17

I dont see a problem https://jsfiddle.net/te20mfoq/

3 Likes

Thanks a lot!!!