Can paraview correctly volume render two datasets at once?

Hello everyone,

I am simulating a multiphase fluid, and would like to volume render the concentration of two different fields simultaneously.

I have imported two different concentration fields into paraview and rendered both of them, however I find that the depth integration isn’t correct. One field always obscures the other, regardless of opacity and occlusion. Here are example plots from two different angles. You can see the blue phase is obscuring the red phase despite being behind it.

Screen Shot 2022-08-09 at 17.31.36
Screen Shot 2022-08-09 at 17.31.47

Is it possible to volume render multiple dataset simultaneously with correct occlusion? Or can paraview only correctly volume render with a single field?

This has been noted before, however I don’t think there were any fixes proposed.

Thanks for any help

Hi @ericwhester ,

You may want to try grouping them into a multiblock.
What type is your data ?

Best,

Hello Mathieu,

I’m afraid I don’t understand what it means to group them into a multiblock?

My dataset is two separate RectilinearGrid vtk files (.vtr) over several timesteps.

Thanks,
Eric

Hi @ericwhester ,

I meant to use the GroupDataset filter, but there is no volume rendering available in that case.
But you can then use resampleToImage

Does the attached image visualise two separate fields?

Could you elaborate on resampleToImage, or point me to a resource explaining what it is for and how to use it?

Thanks!

Does the attached image visualise two separate fields?

No, this is two VTR showing the same field

Could you elaborate on resampleToImage, or point me to a resource explaining what it is for and how to use it?

  • Open file1.vtr, apply
  • Open file2.vtr, apply
  • Select file1 et file2 (using Ctrl), Add a GroupDataSet filter, Apply
  • Add a ResampleToImage filter, Apply
  • Volume representation

If I do the following sequence, nothing appears:

  1. Import c1, c2, apply both
  2. Select both, add GroupDataSet filter, apply
  3. ResampleToImage filter, apply
  4. Volume representation on the ResampleToImage filter
  5. Adjust the colormap range from [0,1e-38] to [0,1] (each field varies in this range).

Then unfortunately I don’t see anything.

Is there a step I have missed here? Like applying a volume representation to the c1, c2 filters? Or the groups?

Thanks,
Eric

Please share your data.

If you want to volume render 2 overlapping volumes, try turning on the Enable Ray Tracing option under the View portion of the Properties panel. This will turn on the OSPRay raycaster. OSPRay seems to behave well when volume rendering overlapping volumes whereas the standard render does not.

Hmm, so I tried to enable ray tracing with OSPRay raycaster. Unfortunately everything disappears when I do that.

For context I’m using Paraview 5.10.1 on a Mac OSX12.3.1.

I will try to upload a smaller example dataset tomorrow.

Eric

In the meantime, I think I can get passable results by showing partially transparent isocontours for each dataset.

Screen Shot 2022-08-09 at 22.41.55

My new question: once I have a visualisation that I am happy with, how can I turn that into a batch python script to run remotely?

Thanks,
Eric

1 Like

File → SaveState → python should work.