Ray tracing in paraview

Hello everyone,
After LIGGGHTS simulation of tablets, I want to spray coat them. I have read that it can be possible with use of ray-tracing (OpenGL). Can it be done in paraview? or is there a better method out there?


Hi @rohitch13, ParaView does offer some materials rendering capabilities via ray tracing backends. If you are aiming to compute a result of a physical simulation of a spray coating process, ParaView is not the right tool - but if you want to render images of the tablets with a realistic surface, ParaView could be useful.

Thanks @cory.quammen , I do want to do a physical simulation of a spray coating process. Do you have any idea what might be the right tool for this? I’m fairly new to this.

I don’t, but maybe someone who sees this who works in this domain will be able to recommend something.

I think what you are looking for is some kind of car paint material (which simulates the coating effect on a surface) from OSPray (Intel OSPRay Documentation).

It is feasible to do that in paraview, as we support PBR rendering using the OSPray library. I will ask a colleague and come back to you with details on how to achieve that kind of rendering.

In the meatime, you should try to enable PBR in paraview looking at, for example, this blog post Introducing Physically Based Rendering with VTK - Kitware Blog.


Coating with the PBR shader of ParaView is not yet merged but should come in few weeks, but you can use OSPray with Principled Material + Clear Coat, or with a CarPaint material.

To use custom OSPray materials in ParaView, you must load a json file that contains material definition. Look at this repository in the file ospray_mats.json.

This file has to be loaded in ParaView (with RayTracing enabled of course) by clicking on “File… Load Path Tracer Material”. Then, you can choose a defined material under the material property as seen below :


Hi Lafoix!
I am trying to use osray materials as you mentioned but it’s giving me the following error:

Generic Warning: In /builds/gitlab-kitware-sciviz-ci/build/superbuild/paraview/src/VTK/Rendering/RayTracing/vtkOSPRayMaterialHelpers.cxx, line 259
No material Library in this renderer. Using obj by default.

I have loaded the json file as well and it’s showing me materials too but when I select them, I gives me this error. Kindly help.