How do I achieve a Volumetric material?

Hi guys,

Couldn’t find an answer or an example of this, so decided to ask it here. Basically, what I want to achieve is a volumetric material, which when applied to a sphere, will have soft edges. Sort of like fog volumes in UDK (I know they were dropped). I feel like I’m close, but can’t really figure it out. I’ve tried applying LightBeam material to the sphere, but the problem is - I can still see some sharp geometry on the edges. I guess the answer lies somewhere around using depth fade, pixel depth and sphere mask, but I cannot figure out how to connect them all correctly.

The application for this is to create a glow effect around lights (this method allows me more control than just bloom, which is global).

If anyone knows the answer or a better way to do this, it would be greatly appreciated.

The new Math Hall in Content Examples has it if you can download it. If not, look into SphereGradient-3D and ExponentialDensity nodes.

Ah, thanks so much! It would never occur to me to look for a visual example in a map called “math lab” :slight_smile: But it has exactly what I was looking for, and it’s really simple apparently.

Thanks again!