Volumetric Light Color based on "Distance From Light"

Been dissecting a project a guy did in Lightwave and he had some neat options for changing the color of a volumetric light using a ramp based on “distance from light”. He also has the ability to apply a texture to the volumetric light. Is this possible in Blender?


What are you wanting to do exactly, is it a standard lamp inside of a volume or is it an actual emission volume?

I want to do two things: Create volumetric light that changes color based on distance from the source (be it a point light or some mesh light), and I would like the volumetric light to have a texture applied to it that shows not just when the light hits a mesh, but the volume itself in the air. I’m trying to figure out if these two techniques are possible as they’d really help me out

Based on my limited knowledge of Cycles, that’s not possible because we don’t have access to light data in our materials. You can however obtain i.e. position of a lightsource by linking it through the texture coordinates/object, then link your lightsource. It’s only one 3D coordinate in space rather than all positions of an area light, so it’s quite limited. See example here, although my goal differs from yours. I didn’t try anything related to volumetrics though.

Thanks, I’ll keep looking into this. Maybe there’s another way to accomplish what I need.