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?
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.
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!
Hehe, sure thing! Apparently, then, “directional” must just be the way Bulgarian people like to refer to it…
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.
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’.
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.
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.
I’ve submitted a patch for revision here: https://developer.blender.org/D10594
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.