[vtkusers] Opacity discrepancy with downscaled volume despite opacity unit distance == spacing

David Gobbi david.gobbi at gmail.com
Sun Feb 12 12:06:27 EST 2017


On Sun, Feb 12, 2017 at 10:01 AM, Elvis Stansvik <
elvis.stansvik at orexplore.com> wrote:

> 2017-02-12 17:56 GMT+01:00 Elvis Stansvik <elvis.stansvik at orexplore.com>:
>
>> 2017-02-12 17:31 GMT+01:00 David Gobbi <david.gobbi at gmail.com>:
>>
>>> Hi Elvis,
>>>
>>> Here is something you can do as a check: set the sample distance for the
>>> ray casting to a very small value, so that it takes around 1000 steps for
>>> the ray to traverse the volume from front to back.  The thickness of your
>>> volume is 29*0.006 = 0.174, so you can try a sample spacing of 1.74e-04:
>>>
>>> mapper->AutoAdjustSampleDistancesOff();
>>> mapper->SetSampleDistance(1.74e-04);
>>>
>>> If the two volumes look the same when you use a small sample distance,
>>> then the difference you were seeing was probably just due to discretization.
>>>
>>
>> That indeed did the trick, thanks David!
>>
>
> And to clarify: The small difference I was seeing when I had the sample
> distance left to auto-adjusted isn't really a problem for my application. I
> was just surprised there was still a small difference even when both
> volumes were rendered with the same opacity unit distance, and I wanted to
> find the explanation for it. The discretization error coming into play
> makes sense.
>

So everything should be fine if you leave AutoAdjustSampleDistances "On",
for the interactive rendering, but set the SampleDistance to half of your
high-res volume spacing for the high quality rendering (e.g. use 0.003 for
this data set).

 - David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20170212/a94ee77a/attachment.html>


More information about the vtkusers mailing list