Volume rendering of Scalar Field with Selective Opacity

Hi Folks,

I have a 3D data of a scalar which is being advected & diffused. What I need is a volumetric representation/rendering of 3D data similar to the one attached(figure1 and figure2)[1] and [2].

My system’s 3D volume rendering is attached (figure3). What I am struggling with is to define the colormap such that the middle ranges become transparent. I hope that by doing this I can reproduce the same figure.

What I have tried as a first cut, is to apply the iso volume filter on the VTK file which happens to be a rectilinear grid, only after which I can render it as a Volume (earlier the option wasn’t present). After applying the IsoVolume filter, I apply color map opacity transfer function to make certain range as transparent. The output of this pipeline could be found in figure 4. Even after this the visualisation doesnt look as clean as I expected and it happens after applying the iso-volume filter.

Is there some other way out. Any ideas on how to implement/produce this in Paraview.

Attachments(removed): Due to size limitations I am sharing all the figures on this Imgur link
https://imgur.com/a/oQaJQr1

VTK File : https://my.pcloud.com/publink/show?code=XZ3HR27ZNeIJPE0acSzyxxz9PQUjwfp23Jy0
Note :- the field I am interested is the Temperature denoted by T. The ends on the +Y and -Y are walls which are hot and cold respectively.

[1] http://www.pnas.org/content/pnas/113/1/69.full.pdf
[2] https://arxiv.org/pdf/1605.04161.pdf

Hi,
You can use the filter ResampleToImage and use the Image Volume Representation which has a nice Shade option.
Is it what you are looking for?

Michael

1 Like

Thanks Michael, that is exactly what I wanted. Another thing that I am struggling with ( also related to your image) is that I want to have the walls represented as a surface (-y and +y) to have certain opacity so that I can have a camera rotating animation of the representation ( rotation about the x axis ). Since my data prints the vtk from the first INTERIOR cell to last INTERIOR cell, hence I don’t have the values of the wall (cell centered finite volume discretization). What I have done is to have two different vtk files for respresenting the surface depicted like this


vtk DataFile Version 3.0

vtk output
ASCII
DATASET RECTILINEAR_GRID
DIMENSIONS 2 1 2
X_COORDINATES 2 float
-0.002 0.050
Y_COORDINATES 1 float
0
Z_COORDINATES 2 float
-0.002 0.018
CELL_DATA 1
POINT_DATA 4
FIELD FieldData 1
nodal 1 4 float
0 1 1.1 2

Like this I get the walls but I can’t get them to have an opacity other than 1. As soon as i change the opacity slider for the surface it vanishes from the visualisation. Any idea how to get that ?

P.S. Your pipeline renders visualisation much faster than the iso-volume filter. Thanks again for that.

The opacity works fine on my side with this file.
Alternatively, you can create the walls with a plane source.

Here is the state file of my session:

volume_render.pvsm (553.0 KB)

With your state file too it seems not to work. Kindly see the attached images one with opacity 1 and other with opacity other than one. I have chosen the hot wall to be the case.

What version of ParaView are you using?

I am using Paraview 5.5.2 still it doesnt work :confused:

Try to run paraview with the argument -dr

The problem still persists. I tried running it with -dr flag.

Hi Michael, any idea on what is going wrong ? I never was able to do it ( change opacity for a slice or surface ) and i thought it was usual paraview behavior.

Can you share a snapshot of semi-transparent wall surface that you are able to reproduce ?

I’m sorry, I’m running out of idea. Maybe a graphic card driver issue?
Here is my screenshot with paraview master (reproduced also with paraview 5.5.1):

Hi Michael,

I tried to reproduce the same pipeline on my laptop and it works just fine (the opacity for the surface). I can now confirm that it has to do something with the graphics drivers. I was earlier testing it with my workstation which has Nvidia graphics card. Has there been a bug/issue already filed for this ?

I cannot find an issue related to surface opacity.
You can file one there.