How to render a model with material and data(volume render) at the same time

I have a model and the power distribution of this model as follow:



I want to give the model a material to make this model real, and I want to see the data with volume rendering at the same time.
I use the Material Editor to attach a material to the model, but when I take on the OSPRay to render the model, the volume data will disappear.
Is there any other way to solve this problem?
I am a new user, I’m desperate for someone to help me answer this question. Thanks vety much!

Please share your test.vtk

Best,

test.vtk (1.8 KB)
this is my test.vtk file. The model is a 3.1*3.1 cube, its center coordinate is (1.5,1.5,1.5).

this is my test.vtk file. The model is a 3.1*3.1 cube, its center coordinate is (1.5,1.5,1.5).
test.vtk (1.8 KB)

For some reasons your dataset appears almost transparent when using volume rendering with ospray:

image

I’m not sure why, maybe because there are not a lot of cells ?

@Dave_DeMarle

Thanks for your reply. I have tried other models and VTK files whose number of cells is sufficient. However, they also experience the same problem as the test.vtk file.

Could you share such files ? I only reproduce with your example so far. Here is how a classic unstrectured wavelet looks like:

image
wavelet.vtk (2.6 MB)

It looks like when ParaView uses the projected tetrahedra method for volume rendering (the default for unstructured data like test.vtk) the OSPray render is rendering the volume much more transparent than OpenGL. I don’t know why, but there are a couple things you can do to correct it.

One thing you can do is to change the volume rendering mapper from Projected tetrahedra to Resample To Image. The image volume rendering seems equivalent between OSPray and OpenGL. You may have to play with the sampling dimensions to get a good image.

If you need the details of the unstructured grid and must render it directly, you can alternately lower the Scalar Opacity Unit Distance parameter. (I don’t know why OSPray is interpreting this parameter differently than OpenGL. This might be related to bug #18890, but I’m not sure.) If you crank that value down to 0.1, I can see the middle (opaque) part of the volume clearly. That said, the results look very speckled. OSPRay must be using some kind of trapdoor transparency for rendering. You can correct that by increasing the Progressive Passes and/or Samples Per Pixel parameters for OSPRay. That will increase the rendering time though.

Taking the “wavelet.vtk” file as an example, I imported it into ParaView and used volume rendering to display the data, while also using OSPRay. I found that when using OSPRay, the volume rendering data in the “wavelet.vtk” file was still visible, but when using my VTK file, the volume rendering data disappeared. I am puzzled by this phenomenon.



here is my file:
I’m sorry that I failed to upload my file(23068KB). Because it’s huge?

I’m sorry that I failed to upload my file(23068KB). Because it’s huge?

No need imo.

It looks like when ParaView uses the projected tetrahedra method for volume rendering (the default for unstructured data like test.vtk) the OSPray render is rendering the volume much more transparent than OpenGL. I don’t know why, but there are a couple things you can do to correct it.

I agree @Kenneth_Moreland . I think opening an issue is in order: https://gitlab.kitware.com/paraview/paraview/-/issues

Could you take care of it @zjqf ?

thanks for your reply. I have tried the ‘Resample To Image’, and I will try the second way. Thanks very much!

Ok! Thank you very much!