[vtkusers] VTK 8.1.1 & Qt QML: Dual Depth Peeling not working

Sankhesh Jhaveri sankhesh.jhaveri at kitware.com
Fri Oct 26 08:45:23 EDT 2018


Does the issue exist only when depth peeling is enabled? Do you see it
rendering correctly when depth peeling is disabled?

Ensure that the color and depth buffers are preserved with the renderer :

_renderer->SetPreserveColorBuffer(1);
_renderer->SetPreserveDepthBuffer(1);

​

On Fri, Oct 26, 2018 at 6:08 AM "Michel Mürner" <michelmuerner at gmx.ch>
wrote:

> The application I'm working on is based on Qt QML and I'm frequently using
> VTK via the vtkExternalOpenGLRenderWindow rendering to a
> QQuickFramebufferObject. Because semi-transparent geometries weren't
> rendered correctly I found out about the dual depth peeling and enabled it
> as recommended on the VTK website:
>
>
> https://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/CorrectlyRenderTranslucentGeometry
>
>    _renderer = vtkSmartPointer<vtkRenderer>::New();
>    _renderer->SetUseDepthPeeling( 1 );
>    _renderer->SetMaximumNumberOfPeels( 100 );
>    _renderer->SetOcclusionRatio( 0.1 );
>    _renderWindow = vtkExternalOpenGLRenderWindow::New();
>    _renderWindow->SetAlphaBitPlanes( 1 );
>    _renderWindow->SetMultiSamples( 0 );
>    _renderWindow->AddRenderer( _renderer );
>
> Unfortunately all I can see now is a red background. (Note: Red isn't a
> color I'm using for any objects or backgrounds)
>
> The Versions I'm using are VTK Version 8.1.1 and Qt 5.11.2
>
> Has anyone tried something similar with vtkExternalOpenGLRenderWindow,
> QQuickFramebufferObject and Dual Depth Peeling? Or an idea what might be
> the problem.
> _______________________________________________
> 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
>
-- 
Sankhesh Jhaveri *Sr. Research & Development Engineer* | Kitware
<http://www.kitware.com/> | (518) 881-4417
​
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://public.kitware.com/pipermail/vtkusers/attachments/20181026/7cf30168/attachment.html>


More information about the vtkusers mailing list