Cycles Light Distance Clamp?

Hi All,

I am looking for a way to control the distance that Cycles emission shader can affect another object in a scene. I am aware of the Light Falloff node, however it does not have a distance control.

What I want is the distance parameter for a light like we have in Blender Internal. In Blender Internal I can set the distance for a light and no light will travel beyond that distance.

Does anyone have a node setup for Cycles that can emulate the Blender Internal lamp distance effect?

I managed to cobble together a node setup that mainly works. The distance node value is not linear, however…not sure why?

Attachments