So I’ve gone away for a while and had a look at cycles rendering and messed about with a few things. How do I distort the render outside of the refraction mesh, if you don’t get what I mean, the distorted ring around the black hole here:
An article and a paper on: Gravitational Lensing by Spinning Black Holes in Astrophysics, and in the Movie Interstellar
Your question doesn’t make a great deal of sense - you’re asking how can a material distort a nearby lightpath, but without the lightpath passing through the material? I’m fairly sure that’s impossible based on the way raytracing in cycles works. Basically, you’re asking to curve a lightpath as it passes an object, wheras as I understand it the lightpaths in blender always travel in straight lines until the hit something, when they will either bounce or scatter if they reflect, or refract if they’re transmitted.
That said, it should be possible to fake the effect by using another mesh, either in front of the camera to create distortion like a lens (imagine taking a picture down a clear bottle with a distorted base). You may also be able to get a similar effect by putting some kind of refracting object around the core. But yeah, in order to be affected by it, the light path will have to pass through the material.
To do it properly, I think you’d probably need to be running some kind of distortion simulator on the background image, but you’re getting into some serious coding for that to work. 
So this is how I’d do it. The nebula is on a background plane, and the lensing is an object with one flat face, and one distorted face.
This was a very simple setup using an orthographic camera and a small background. For the arrangement shown, IORs greater than one were just bunching up the background rather than swapping them over (my understanding of the physics is pretty hazy), and I went with the lowest IOR i could manage before it started showing black (not immediately sure if that’s total internal refraction or the background - I suspect the former).
I haven’t played around with it, but I think you should be able to set up the parenting of the gravitational lens in such a way that it’s always oriented on the far side of the object from the camera, which would allow you to animate with a moving camera; offhand I’m not 100% sure whether you’d get unwanted reflections off the gravitational lens. My other experiments with the refraction BSDF haven’t ended well, to be fair.
The shape of the lens was pretty quick - it was a plane subdivided about 100 times, then picked the middle face and using proportional editing with a smooth curve dragged the dip down (I’m sure I could have chosen more accurate values, but hey). I then extruded, and for the faces on the other side flattened them (keystroke s, z, 0). The background is the horsehead nebula, grabbed from here: http://en.wikipedia.org/wiki/Horsehead_Nebula#mediaviewer/File:Barnard_33.jpg
Attachments
I may come back in a few years after some practice and understand what you’re saying. I’m new to this sort of thing and I don’t really understand the terms used.
I attempted the same thing quite a while ago, and came up with a different solution.
The result seems quite nice, and here’s how I did it:
And a focus on the refraction shader:
The sphere on the inside has a Holdout shader to reproduce the inside of the photon sphere.
As you seen it, the basic idea is to have a sphere that has a dynamic IOR depending on where the ray is going to on the sphere, “hack-reproducing” the gravity influence of light. Unfortunately with this method there’s only one Einstein ring that can be visualized, that’s where this method’s accuracy stops at.
With this shader here you can tweak the value in the Multiply node to get more or less strong bending.
https://dl.dropboxusercontent.com/u/98670603/Other/Black_hole.blend





