Problems loading Material library under Ray Tracing

In v5.9, I am getting the following warning when trying to apply material under Ray Tracing when using OSPRay pathtracer. This is despite me manually loading the ospray_mats.json file in the materials directory as well as enable-streaming.

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

My GPU is an nvdia quadro p4000. Am I missing something or is this a genuine bug?

Greetings Erik,

The GPU and --enable-streaming feature are not involved here. The warning indicates that something is going wrong in between the time you load the materials definitions file and subsequent lookups into the list of in memory materials.

The feature works in kitware’s 5.9.1 binaries and in my own builds so I do not think it is a bug per se which indicates something in your setup. Hard to tell from the above what the specific problem is.

When you File->Load Path Tracer Materials, do you see any warnings or errors? If not, do Sources->Spheres and click on the pulldown list to the right of “Material” on the Properties tab. Do you see a list of materials or is the only entry “None”? These would indicate something went wrong with the loading process. Like a path problem or a file syntax error.

Note that the kitware binaries are place the json and related texture files carefully in place near the exectutable so that File->Load Path Tracer Materials is not necessary unless you want to load additional materials. You might want to emulate that in your setup.

Beyond the above I would need more information to hazard a guess.

Dave, thank you for this very helpful reply! Indeed I was finally able to apply the materials when creating a Sphere in a new session. I traced the problem down to the fact I was loading a state file that was created in 5.7. When I re-created a fresh state file in 5.9, it works fine.

Now, inspired by the article below, I was hoping to use some materials such as rubber and car paint, but they don’t seem to be in the default Ospray json file.

This led me to explore the OptiX option instead and then I discovered the option to use the Nvdia MDL database in Paraview! This would be amazing but I’m not sure how to do it. I watched the ParaView/OptiX webinar and have downloaded the full nvdia vMaterials library and Optix7. However I cannot load the mdl files into Paraview. How do we do this exactly?

Also related to that article, I do not see the depth of field option in the Adjust Camera panel.

The materials implementation in VTK and ParaView converts VTK’s own .json file format (the ospray_materials.json file for example) into calls into either OSPRay’s API or MDL via visRTX’s API. You might want to look at the visRTX code for ideas of how the MDL calls happen and then see if it is possible to cooking up some new VTK json descriptions to get what you are looking for in vtkMaterialLibrary.

Look for “Focal Disk” and “Focal Distance” on the Adjust camera for DOF. The later is more or less “where in the scene in focus” and the former is “how blurry is it elsewhere”