1
$\begingroup$

For a spot lamp I have two angles -- angle of the outer cone (spot size) and angle of the inner cone that inidicates the boundary line at which light from the spot will start to blur. Based on these two angles how can I calculate "blend" of the spot?

Blender reference manual says that "blend" value can be between 0.0 and 1.0 and that:

The falloff rate of the Spot lamp light is a ratio between the Blend and Size values; the larger the circular gap between the two, the more gradual the light fades between Blend and Size.

But I can't figure out the exact formula to calculate blend based on those two angles.

$\endgroup$
1
$\begingroup$

From the Blender Wiki:

The value is proportional and represents that amount of space that the inner cone should occupy inside the outer cone (SpotSi).

This is quite confusing, because the value is calculated by subtracting the area of the smaller circle from the area of the larger one instead.

R = bigest Radius
r = smallest Radius

blend = π(R*R - r*r) / π(R*R)

It should be:

blend = (R*R - r*r) / (R*R)


blend = 1 -> r = 0
blend = 0 -> r = R

enter image description here

BUT the result is not exactly what I expected.

enter image description here

In this example, the smaller black circle is half as large as the radius of the larger circle.

The orange lines are the cones of the spotlight obtained from the formula:

blend = (R*R - r*r) / (R*R) = 0.75

This is the manual setting (blend 0.71): enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.