Lensing of black holes / custom ray-tracing with ParaView

I am looking for ways to create a lensing effect similar to the black hole in the Interstellar movie in ParaView. Here‘s another example where scientists at NASA have used a ray-tracing code to create this effect: https://www.nasa.gov/feature/goddard/2018/new-simulation-sheds-light-on-spiraling-supermassive-black-holes. Ideally, here’s what I would like to do to enable this sort of thing:

  1. Load 3D point data from my black hole simulation (no problem, works already)
  2. Hook into one of ParaView‘s ray-tracing renderers (ideally the ‚GPU Based‘ one) to update the direction of each ray given its current position and the value of my point data at that position based on a formula I provide.

Is this possible at all with current builds of ParaView, or do you think this will become possible? If no, is it possible for me to contribute this functionality to ParaView? I would be grateful for any pointers :slight_smile:

This is definitely doable. And I would love to see it happen.

It boils down to creating a new material in either visRTX about here or OSPRay about here (or preferably both) and exposing it in ParaView about here.

FYI @carsonsbrownlee @tbiedert

This can be done in OSPRay, but would require writing custom code in OSPRay
as a plugin in order to be able to change ray directions based on data values, we do not currently possess a custom sampling function that is exposed externally. I would be happy to help you through that process id you chose that route, the results would certainly look great!