Material Help: Central 'Glow' on Non-Uniform Mesh

Hi folks,

I’m trying to create a round ‘glow’ that appears to be in a fixed position on the interior of an object - like a bulb visible through a lampshade, for example.

I successfully produced the look I was after on a round opaque glass sphere using fresnel, but on non-spherical shapes I’m struggling to figure out the approach.

Something like the effect in the image link below, but the material itself cannot be translucent, so the effect has to be entirely in the material. And the effect needs to hold up from any angle, so I kind of need the effect to be at a fixed point relative to the object, but ‘projected’ onto the surface?

Hoping someone can point me in the right direction.

I’m no expert on these things, but if you project the vertex position of each fragment onto the plane perpendicular to the view/camera vector it should be easy to calculate the distance from the fragment relative to the center point (Plus an offset if you like).

Then you just need to use that distance to determine the brightness of that fragment -

1-distance/glow-radius

Will give you a value you can use, just clamp it between 0 and 1.

Of course you will need to define the glow radius yourself, probably as a material param.