Hello!
I am a beginner and in my scene that I working right now I have a ceiling LED light. I tried to put a Spot Light but it dosen’t make any sense because my ceiling LED of course it is rectangular, and the spot is conical. So i tried with Rect Light because of the rectangular boundary for the light.
The problem is that since it’s attenation radius is spherical and I only want it to light in some spot, my Rect Light actually lights in all directions because of the spherical radius.
How can I make it light in a rectangular form, only in it’s boundaries from the barn angle/height, and not in every direction?
(One thing to mention, I heard that for VR, you must disable Forward Shading in order to work. Is it that true…are therey different settings for Rect Light when it comes to a non VR project and a VR project?
Welcome to UE! I think you are in the right path with that light setup, just need to clarify part of the concept. Per checking Epic’s documentation, the Attenuation Radius for all lights is a sphere, mostly due it being more efficient, performance wise. Yet, the sphere doesn’t define the shape of the light, just the max travel distance
Now, to stop the light from spilling on the sides, and shape it as a rectangular box, you only need to adjust the “Barn Door” settings. With your Rect Light selected, check the Details panel, adjust your Source Width and Source Height to the size of your ceiling LED, then play around with Barn Door Angle and Barn Door Length, until you get the rectangle shape you are looking for.
For further details on rect lights, or any other feature, it always helps to revisit the related UE docs on the matter:
In fact, that very same doc gives you a clue on your second point:
The forward renderer does not currently support Rect Lights. If you need to use forward rendering in your Project, use a Spot Light or Point Light instead.
Since a lot of VR projects use Forward Shading for performance reasons, that results in trouble when using rect lights. But that does not mean you can’t use VR and rect lights at the same time. It’s a matter of using Deferred Shading instead. Your performance will take a hit, but you would be able to keep your lights.