For instance, is it possible to simulate effects such as heat haze or other kinds of mirages which are caused by air with differing/changing refractive indexes?
Plugging a procedural texture into the IOR input gets pretty close, but the IOR is only being changed at the object's surface (this is to be expected, since the refraction node is plugged into the surface output).
For example, with this scene:
Connecting only the volume scatter node proves that the gradient sphere is in the center of the cube:
If you connect the refraction node, you might expect to see some distortion in the center where the gradient texture is. However, since the gradient is completely inside the cube, there is no evidence of the gradient on the surface, and the IOR is not changed.
Plugging the refraction node into the volume output does not seem to be supported yet; the output is completely transparent.
Is it possible to change the IOR of the inside of an object in cycles like this?
If not, is there any way to simulate these kinds of atmospheric effects in cycles?
I would share the .blend, but pasteall is acting up atm..