5
$\begingroup$

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.

$\endgroup$
  • $\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$ – Ray Mairlot Nov 23 '14 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$ – Zauber Paracelsus Nov 23 '14 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 '14 at 0:12
  • $\begingroup$ Something like this, though not as extreme: cfa.harvard.edu/castles/logo.jpg $\endgroup$ – Zauber Paracelsus Dec 27 '14 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$ – Zauber Paracelsus Dec 27 '14 at 3:59
4
$\begingroup$

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

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.