Directional Area Lights

Hello to everyone!

As I have suggested on Right-Click Select, I thought Cycles users would benefit from a directionality parameter available to area lights that controls how wide or narrowly spread their light is. Such a feature is common among other render engines.

After giving a glance at the codebase, I’ve decided I’d liked to give it a try at implementing it.
My idea would be to add a 0.0 to 1.0 float parameter called “directional” to area lights. Then, similarly to what happens with spotlights with the spot_light_attenuation() function in kernel_light.h, attenuating the intensity multiplier of area lights as a function of that parameter and the angle between the sampling direction and the light normal.
Would such a feature be desirable and/or aligned with the scope of Cycles?

Thank you.


The possibility of such a feature has been previously discussed in this topic: Area light features

Currently Blender allows to obtain this behavior through shader nodes. Should we also have a native parameter or should we focus instead on providing a dedicated node for it?


Okay, today I have prepared a first working prototype.

The aim of this implementation was to exactly replicate how an ideal honeycomb grid would affect the light of a softbox. The “Directional” parameter, in my model, determines the thickness of such a grid. At 0, there is no grid, at 1 the grid is infinitely thick.
Before committing the code, I really desired to hear some feedback from the forum. One issue I couldn’t really decide upon is whether the algorithm should account for the “lost” light, making the remaining light brighter, in order to maintain the total emitted energy constant at any directionality.

A feature like this would be great to have. I think it should keep the total energy constant.

It’s also possible to take the directionality into account for importance sampling, but that can also be done later.


Thank you Brecht!
I’ll play with it a bit more tonight. Possibly tomorrow I’ll submit the code.


great work! agree with Brecht that the light should be visually constant when changing the slider, also for the sake of english name it “Directionality” instead of “Directional”. Again, great work man!

how about naming it “spread” ?


Hehe, sure thing! Apparently, then, “directional” must just be the way Bulgarian people like to refer to it… :smile:

I do like “spread” a lot! But it would make more sense then to reverse the values. 1 would mean maximum spread, thus the default behavior. If we go for spread, it would be even clearer to express it as an angle, moreover as, internally, that parameter is in fact processed as an angle. The default would then be 180°, to be reduced to 0° for maximum focus. I like the idea.
Would this cause any impracticality anywhere else?


I might be wrong, but I think if’ve hear direction-related words (sometimes angles) more often than “spread” across softwares. So maybe it would make it easier for everyone to stay in this lexicon?
Anyway it’s nothing that important, as long as it’s consistent at least within Blender.

I think “spread” is fine, it’s short and understandable.


Here’s LuxCore, it’s called “Spread Angle” here

1 Like

I was just about to say that. Expressing directionality as an angle would be clearer and a whole lot easier to visualize conceptually.

In stage lighting there are several tools for shaping the directionality of the light. Barn doors, top hats. They can be characterized not only by an angle at which they can be opened, but also by the length of these shutter-like element, so probably there should be a parameter for shutter length, in addition to directionality (angle, spread). As you can see, on the screenshot, light shutter angle and length combined give pretty dramatical difference on penumbra light distribution. Emissive plane is hidden inside the light constraining meshes.


The ‘Photographer’ addon tackles the intensity issues, might be good to have a look at that.
Having a spread option would be great btw. And ‘Spread’ is used a lot of this option in other renderers.

For barndoor type of light effects, in Arnold this is done via a shader node that is linked to the light shader. Maybe that would be a interesting route to take, as it opens up more possibilities for light related things as it is not ‘bolted on’.


It’s like IES profiles

So supporting this in blender would be great

yes this seem cool, but is better the control on lamp’s spreads this library is limited to the lamps specifics that are constrained by glass and shapes, and are good for fast architectural viz rendering. Is always better having custom controls on lighting, without external library.

My favourite solution so far is this:
It gives great results, but I’m pretty sure there’s energy loss.

In my opinion, both spot and area lights should natively have this directional intensity curve, not just a parameter or two, (and possibly directional colour gradient) since the immediate increase in realism is significant. This would be an easy way–even for beginners–to create real looking light sources and to match reference photos without knowing what actual light source was used.


Barndoors and honeycombs (directionality) have different use cases. Honeycombs can be used to create harsher shadows while keeping a soft spec.

Sorry for the long absence…

I’ve submitted a patch for revision here:
The patch does not compensate for the luminosity loss, as neither the spotlight does. To maintain some commonality among the two types of light, I thought that we could come up in the future with a specific switch, a checkbox called “preserve luminosity”, that would handle that aspect, making both lights luminosity-constant. In fact, I believe users should be able to decide which mode they prefer to operate in, as there are some situations in which the current behavior might be preferable: for example when the light is used as a key light and the variating luminance at the center of the beam could require an otherwise unnecessary exposure correction. Or during animations, the parameter could be animated to create interesting light effects. Ultimately, for those who come from traditional studio photography, this behavior is pretty much what they expect from a physical honeycomb in front of their lights.