11
$\begingroup$

I'm trying to create a point light with a stepped falloff. I know that in Blender Render, there is an option to customize falloff, but the falloff node in cycles only allows for linear, quadratic and constant.

Is there a way to make my own falloff curve or manually manipulate the light properties in Blender?

$\endgroup$
3
  • $\begingroup$ I believe you can keyframe the strength. $\endgroup$
    – Dontwalk
    Commented Feb 21, 2018 at 22:13
  • 2
    $\begingroup$ Wouldn't keyframing the strength change the falloff over time, but not distance? I'm looking for light that has a clear stepped attenuation at any given time. $\endgroup$
    – Sarah
    Commented Feb 21, 2018 at 22:28
  • 1
    $\begingroup$ Yes... You could also keyframe the distance (Location) of the light source. $\endgroup$
    – Dontwalk
    Commented Feb 21, 2018 at 22:32

1 Answer 1

10
$\begingroup$

You can manipulate the Emission strength of the lamp based on the Ray Length from the Light Path node - this is precisely what the Light Falloff node does (you provide an emission Strength and it determines what the actual emission should be to achieve that result).

You can derive the different Light Falloff values from each other by either multiplying or dividing by the ray length to move up or down the scale. ie,

Quadratic * RayLength = Linear
Linear * RayLength = Constant
Constant / RayLength / RayLength = Quadratic

This allows you to get some interesting effects - for example, you could get Cubic falloff by simply dividing Quadratic by the RayLength.

To get a 'stepped' effect (where the falloff suddenly changes at regular intervals) you can use the Modulo maths function to give a stepped effect to the Ray Length as follows :

lamp nodes for stepped output

Adjusting the Modulo node will affect the size of the banding.

This can produce the following result :

result


Here's another useful setup for adjusting the falloff using a Color Ramp - this time using Constant falloff so the 'maximum' illumination is not affected by distance (ie, purely based on the color ramp).

color ramp falloff

The Subtract and Divide maths nodes control the offset and scaling of where the color ramp is applied to the illumination and the color ramp controls the profile. For 'stepped' banding simply use Constant interpolation in the Color Ramp and configure the ramp with the required bands.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .