I was thinking of doing some scifi models, and it would involve a kind of gravity lens effect, where light is distorted and warped by a powerful gravity field.

I have attempted to create a gravitational lensing effect with a refraction shader, but the results don't look very good. Refraction BSDF is a surface shader, and as a consequence the edges of the shader effect are plainly visible as shown in the render below, whereas I would want the edges to fade out more.

Refraction Shader Render

I've tried a few things to accomplish the desired effect, such as using a mix shader node with either transparency or a refraction shader with an IOR of 1. I've tried several variations to accomplish the desired effect, but they all either do nothing or just ruin the shader entirely.

I'm using the cycles engine, and any solutions would be appreciated, especially if they don't require render layers or compositing.

  • $\begingroup$ So rather than the question being how to create a 'gravity lens' (which you seem to have already done), is the real question 'How do I fade out refraction at the edge of a mesh?' $\endgroup$ Nov 23, 2014 at 14:08
  • $\begingroup$ Well, this doesn't quite come close to a true gravity lens effect (even with the faded edges), but yeah, pretty much. $\endgroup$ Nov 23, 2014 at 18:06
  • $\begingroup$ @ZauberParacelsus I'm not really sure what you want. Is it possible you could upload a reference image of a gravity lens? $\endgroup$
    – gandalf3
    Dec 25, 2014 at 0:12
  • $\begingroup$ Something like this, though not as extreme: cfa.harvard.edu/castles/logo.jpg $\endgroup$ Dec 27, 2014 at 3:56
  • $\begingroup$ Main issue is that right now, it looks like a solid object. However, what I want may not be doable, since blender does not support volume refraction. $\endgroup$ Dec 27, 2014 at 3:59

1 Answer 1


I believe that you would want to mix a Refraction shader with a Transparent one, using the Layer Weight's Facing as the factor; This gives you something similar to fresnel, which, however doesn't depend on surface normals, and can be blended.

enter image description here

  • $\begingroup$ Yeah, that's one of the things I had already tried. $\endgroup$ Nov 24, 2014 at 23:27

You must log in to answer this question.

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