The Material Editor in ParaView

February 8, 2024

ParaView provides many different types of rendering based on rasterization techniques like Gouraud or Physically Based Rendering (PBR) and also with ray tracing for photorealistic rendering. For this last one, there are several backends such as Optix or the Nvidia index. In this blog we will focus on OSPRay, the open source ray tracing engine of Intel, as a backend which is available in ParaView since the 5.6.0.

Fig1. OSPRay renderer enables mixing realistic rendering with scientific visualization

Intel OSPRay enables you to specify materials to customize the rendering of each dataset in the render window. You can find a list of materials with CC0 copyright in this kitware repository.

To facilitate the use of these materials, Paraview has a new dedicated panel, the Material Editor. This one has been improved in ParaView 5.12.0 to facilitate the OSPRay materials edition.

How to load an existing material in this editor

First, you should select the Path Tracer backend to support materials in the OSPRay configuration panel.

Fig2. The Material Editor panel in ParaView. The button in the red square is for loading a material. The other one in green is for saving materials.

Regarding the material editor panel itself, see Fig2, it can be divided into 3 parts. The first one will be for the “Shader Ball” which we will introduce later, the second one is for loading and saving a material. The last will be to control each parameter for the current material.

It is possible to load an existing material by clicking on the button highlighted in red in Fig2. Then all materials present in the json file will be loaded. The first material described in the file will be selected by default, you can easily change to another loaded material in the drop down list. Then you can click on “Attach” to link the material to the active source in ParaView like in Fig3.

Fig3. How to load and apply OSPRay material in ParaView.

Editing material

Modifying material can be tedious, especially when this last is applied to a complex dataset. To make the edition of material easier, it’s now possible to see the current material modification applied to a simple sphere live, like in Fig4. This one is what we call the Shader Ball.

Fig4. The ShaderBall

About the last part in this panel, it shows and makes it possible to edit each property. An OSPRay material can be defined as a standardized json file like in the right of Fig5.

Some properties can be linked together especially for texture which is more easily edited in this panel. An example of OSPRay material can be seen in Fig5.

Fig5. The Metal_Aluminium_mirror material in the Material Editor on the left and the corresponding json file on the right.

Conclusions

Thanks to this work, the usage of realistic rendering is even easier in ParaView with the path tracer of Intel OSPRay. These changes are available in ParaView 5.12.0.

All materials used in this blog post come from https://gitlab.kitware.com/paraview/materials which are all under creative commons (CC0) copyright.

Acknowledgements

This work was sponsored by TotalEnergies.

The spitfire dataset used in the video was provided by IT4I.

Tags:

Leave a Reply