[vtkusers] Set ScalarOpacityUnitDistance correctly?

David Gobbi david.gobbi at gmail.com
Tue Mar 22 14:45:16 EDT 2016


Hi Jan,

As a rough guide, get an estimate of the thickness of the volume
(e.g. from the bounding box returned by mapper->GetBounds())
and multiply by 0.001 to get a useful ScalarOpacityUnitDistance.
This should hopefully provide a qualitatively useful result, you
can tweak the factor until you get something that works.

If you want thin surface to be more opaque, then use a gradient
opacity function to make the boundary itself more opaque.

 - David

On Tue, Mar 22, 2016 at 11:45 AM, jhirsch <jan.hirsch at st.ovgu.de> wrote:

> Hello,
> maybe it seems like a naive question, but how can I set the 'right' value
> for ScalarOpacityUnitDistance from a vtkVolumeProperty object?
> I'm doing a volume rendering with a vtkProjectedTetrahedraMapper and
> depending on the ScalarOpacityUnitDistance value I either see something or
> not. My guess is, that it has something to do with the size of the
> volume...
>
> For example, when I leave this value untouched (default=1.0) there is
> nothing to see for my current data set. When I set it to something like
> 0.0003 the rendering looks OK but when I have only a part of the volume
> (like a thin surface) I have to set ScalarOpacityUnitDistance to something
> like 0.00015. Then the surface appears.
>
> I don't want to guess the right value for every set of data I got, so what
> are the properties and circumstances I have to consider?
>
> Thanks in advance!
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160322/6675c635/attachment.html>


More information about the vtkusers mailing list