[vtkusers] Opacity with multiple meshes
Nicolas Rannou
nicolas.lists at gmail.com
Fri Jan 27 15:51:44 EST 2012
Thanks for all the advices I got it working.
-> there is a qvtk_qtopengl option in vtk and you have to be careful when
you setup your qvtkwidget!
Nicolas
On Fri, Jan 27, 2012 at 11:20 AM, Nicolas Rannou <nicolas.lists at gmail.com>wrote:
> I'm using a QVTKWidget to render my scene and it seems to be the problem.
> (a simple example works properly but my application does not)
>
> Can I somehow turn opengl on in this QVTKWidget, should I customize
> QVTKWidget to inherit from a QGLWidget, etc.?
> Is there any option in vkt's cmake to allow such a thing?
>
> Thanks
>
>
> On Thu, Jan 26, 2012 at 4:11 PM, Nicolas Rannou <nicolas.lists at gmail.com>wrote:
>
>> Thanks for the suggestions I'm giving it a try!
>>
>> I'll use depth peeling since I need the objects to remain distincts and
>> it looks more straight forward.
>> It looks like I should also set "renderWindow->SetAlphaBitPlanes(1)"
>>
>>
>> On Thu, Jan 26, 2012 at 3:18 PM, David E DeMarle <
>> dave.demarle at kitware.com> wrote:
>>
>>> And since you have multiple meshes, for depth sort to work, you need to
>>> append them all together first, then depth sort that. Otherwise the opacity
>>> is only correct within each one, not amongst them.
>>>
>>> David E DeMarle
>>> Kitware, Inc.
>>> R&D Engineer
>>> 21 Corporate Drive
>>> Clifton Park, NY 12065-8662
>>> Phone: 518-881-4909
>>>
>>>
>>> On Thu, Jan 26, 2012 at 3:13 PM, David E DeMarle <
>>> dave.demarle at kitware.com> wrote:
>>>
>>>> Use depth peeling.
>>>> http://www.vtk.org/Wiki/VTK/Depth_Peeling
>>>>
>>>> Or vtkDepthSortPolyData before rendering.
>>>>
>>>> David E DeMarle
>>>> Kitware, Inc.
>>>> R&D Engineer
>>>> 21 Corporate Drive
>>>> Clifton Park, NY 12065-8662
>>>> Phone: 518-881-4909
>>>>
>>>>
>>>> On Thu, Jan 26, 2012 at 3:10 PM, Nicolas Rannou <
>>>> nicolas.lists at gmail.com> wrote:
>>>>
>>>>> Hello,
>>>>>
>>>>> I have several meshes I want to visualize.
>>>>>
>>>>> If I decrease the opacity of those meshes, the visualization goes
>>>>> wrong:
>>>>> I don't see a nice "superposition effect", instead I only see the
>>>>> "last" object "in the ray".
>>>>>
>>>>> Decreasing the opacity,
>>>>> - paraview has the expected behavior
>>>>> - the vtk example (
>>>>> http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/Opacity) has
>>>>> the wrong behavior.
>>>>>
>>>>> I could find which option to use to enable a proper behavior...
>>>>>
>>>>> Thanks,
>>>>> Nicolas
>>>>>
>>>>> _______________________________________________
>>>>> 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
>>>>>
>>>>> Follow this link to subscribe/unsubscribe:
>>>>> http://www.vtk.org/mailman/listinfo/vtkusers
>>>>>
>>>>>
>>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120127/5a8b4b3b/attachment.htm>
More information about the vtkusers
mailing list