[vtkusers] Drawing custom image with depth buffer and a translucent plane

Ken Martin ken.martin at kitware.com
Tue Oct 23 13:40:49 EDT 2018


Maybe from vtkRenderer.h

/**
   * This flag is on and the GPU supports it, depth-peel volumes along with
   * the translucent geometry. Only supported on OpenGL2 with dual-depth
   * peeling. Default is false.
   */
  vtkSetMacro(UseDepthPeelingForVolumes, bool)
  vtkGetMacro(UseDepthPeelingForVolumes, bool)
  vtkBooleanMacro(UseDepthPeelingForVolumes, bool)




On Tue, Oct 23, 2018 at 1:32 PM, Elvis Stansvik <
elvis.stansvik at orexplore.com> wrote:

> I believe this is a limitation of VTK. Translucent polygonal geometry with
> opacity != 1.0 can't be rendered intersected with a volume other than in a
> back-to-front or front-to-back manner.
>
> Someone correct me if I'm wrong (we'd also very much like to be able to do
> this).
>
> Elvis
>
> Den fre 12 okt. 2018 kl 22:20 skrev Pato Sandana <
> patricio.sandana at synopsys.com>:
>
>> Hi Everyone,
>>
>>
>>
>> I’m trying to draw a vtkVolume and a vtkPlaneWidget both intersecting and
>> the vtkPlaneWidget is translucent. I cannot achieve that, either the plane
>> is totally behind or front.
>>
>>
>>
>> For a vtkActor with the same box extent this works.
>>
>>
>>
>> I tried to get the z-buffer from the context using
>> vtkRenderer::GetZbufferData() method, but I only get 1s. (Is this correct?)
>>
>> I also tried to write the z-buffer data I got with
>> vtkRenderer::SetZbuferData() method, but the plane is still behind.
>>
>>
>>
>> Any hints how to achieve this? Thanks in advance.
>>
>>
>>
>> Regards,
>>
>>
>>
>> *Pato Sandaña*
>>
>> TCAD Senior R&D Engineer
>>
>> Synopsys Inc. – Santiago, Chile
>>
>> [image:
>> https://spp/pic/corporate/Lists/Signatures%20Database/Attachments/164/CS12924_AutomotiveEmailSignature_2.jpg]
>>
>>
>>
>>
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at http://www.kitware.com/
>> opensource/opensource.html
>>
>> Please keep messages on-topic and check the VTK FAQ at:
>> http://www.vtk.org/Wiki/VTK_FAQ
>>
>> Search the list archives at: http://markmail.org/search/?q=vtkusers
>>
>> Follow this link to subscribe/unsubscribe:
>> https://public.kitware.com/mailman/listinfo/vtkusers
>>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/
> opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> https://public.kitware.com/mailman/listinfo/vtkusers
>
>


-- 
Ken Martin PhD
Distinguished Engineer
Kitware Inc.
101 East Weaver Street
Carrboro, North Carolina
27510 USA

This communication, including all attachments, contains confidential and
legally privileged information, and it is intended only for the use of the
addressee.  Access to this email by anyone else is unauthorized. If you are
not the intended recipient, any disclosure, copying, distribution or any
action taken in reliance on it is prohibited and may be unlawful. If you
received this communication in error please notify us immediately and
destroy the original message.  Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://public.kitware.com/pipermail/vtkusers/attachments/20181023/4354a6f0/attachment.html>


More information about the vtkusers mailing list