[vtkusers] vtkImageSlice and depth peeling
Giuseppe D'Angelo
giuseppe.dangelo at kdab.com
Thu Jan 10 09:55:56 EST 2013
Il 10/01/2013 10:44, Giuseppe D'Angelo ha scritto:
> Il 09/01/2013 18:48, David Gobbi ha scritto:
>> Hi Guiseppe,
>>
>> Do your images have an alpha component? The difficulty is that
>> blending of images via the alpha component does not work when depth
>> peeling is enabled.
Hi David,
just did a couple of tests -- yes, indeed the approach of making
HasTranslucentPolygonalGeometry return true of false depending on the
image's opacity doesn't work if the image itself is transparent.
In such cases, we should return true, but of course figuring that out
could be expensive (we need to iterate on all the image's data, possibly
do a lookup through a table, etc...). Sounds like a job VTK should do
for the users, maybe controlled by a flag (SetCheckIfImageIsTransparent
or something like that).
Or, we might be a bit pessimistic and return true unconditionally if
there's the possibility of transparent content (again, controlled by a
flag).
Either way, if HasTranslucentPolygonalGeometry returns true, then I seem
to get correct blending results even from translucent images, with or
without setting an opacity on the vtkImageSlice.
Cheers,
--
Giuseppe D'Angelo | giuseppe.dangelo at kdab.com | Software Engineer
KDAB (UK) Ltd., a KDAB Group company
Tel. UK +44-1738-450410, Sweden (HQ) +46-563-540090
KDAB - Qt Experts - Platform-independent software solutions
More information about the vtkusers
mailing list