[vtkusers] Depth peeling

Aashish Chaudhary aashish.chaudhary at kitware.com
Mon Nov 10 10:11:00 EST 2014


What kind of graphics card / driver version / and OS you are using? Any
information related to this would be useful.

- Aashish

On Mon, Nov 10, 2014 at 3:48 AM, Busse, Thomas (GE Oil & Gas) <
Thomas.Busse at ge.com> wrote:

>  Thanks a lot for help.
>
>
>
> I have put a breakpoint at vtkOpenGLRenderer.cxx:541
>
>
>
> The this->DepthPeelingIsSupported is 0.
>
> Digging a little bit deeper this is because :
>
>
>
>       GLint alphaBits;
>
>       glGetIntegerv(GL_ALPHA_BITS, &alphaBits);
>
>       int supportsAtLeast8AlphaBits=alphaBits>=8;
>
>
>
> alphaBits is 0.
>
>
>
> I have checked that all other conditions for
>
>       this->DepthPeelingIsSupported =
>
>         supports_depth_texture &&
>
>         supports_shadow &&
>
>         supports_blend_func_separate &&
>
>         supports_shadow_funcs &&
>
>         supports_vertex_shader &&
>
>         supports_fragment_shader &&
>
>         supports_shader_objects &&
>
>         supports_occlusion_query &&
>
>         supports_multitexture &&
>
>         supports_GL_ARB_texture_rectangle &&
>
>         supports_edge_clamp &&
>
>         supportsAtLeast8AlphaBits &&
>
>         driver_support;
>
>
>
> are true.
>
>
>
> Do I have some settings wrong so that alphaBits is 0? Or is it a problem
> with my graphics card?
>
>
>
> Best Regards,
>
> Thomas
>
>
>
>
>
>
>
>
>
> *From:* David E DeMarle [mailto:dave.demarle at kitware.com]
> *Sent:* Freitag, 7. November 2014 18:00
> *To:* Busse, Thomas (GE Oil & Gas)
> *Cc:* vtkusers at vtk.org
> *Subject:* Re: [vtkusers] Depth peeling
>
>
>
> There can be other conditions.
>
>
>
> Need to more details (or sit down with a debugger) to know for sure if one
> of them is stopping you.
>
>
>
> Put a breakpoint at vtkOpenGLRenderer.cxx:541 to see if vtk thinks your
> card can do depth peeling (or run one of the vtk depth peeling tests).
>
>
>
> Put a breakpoint at vtkRenderer.cxx:599 to see if vtk thinks that there
> are translucent objects in your scene. The one has tripped me up before. If
> it is for you and you happen to be rendering multi block data with block
> opacity, try setting Mapper->SetScalarVisibilityOff to prevent the LUT from
> deciding.
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>   David E DeMarle
> Kitware, Inc.
> R&D Engineer
> 21 Corporate Drive
> Clifton Park, NY 12065-8662
> Phone: 518-881-4909
>
>
>
> On Fri, Nov 7, 2014 at 9:24 AM, Busse, Thomas (GE Oil & Gas) <
> Thomas.Busse at ge.com> wrote:
>
> Hi,
>
>
>
> I tried to get depth peeling working but without success until now.
>
>
>
> My setup is VTK6.1 and a NVidia Quadro K300m under Windows.
>
>
>
> Here is the code snippet of the initialization:
>
>
>
>   m_pVtkRenderWindow = pVtkMFCWindow->GetRenderWindow();
>
>   m_pVtkRenderWindow->Register(NULL);
>
>
>
>   m_pVtkRenderWindow->AddRenderer(m_pVtkRenderer);
>
>
>
>   // Use Depth Peeling for transparency
>
>   m_pVtkRenderWindow->SetAlphaBitPlanes(1);
>
>   m_pVtkRenderWindow->SetMultiSamples(0);
>
>   m_pVtkRenderer->SetUseDepthPeeling(1);
>
>   m_pVtkRenderer->SetMaximumNumberOfPeels(100);
>
>   m_pVtkRenderer->SetOcclusionRatio(0.1);
>
>
>
>
>
> but after rendering a call to
>
>   int depthPeelingWasUsed =
> m_pVtkRenderer->GetLastRenderingUsedDepthPeeling();
>
> returns 0.
>
>
>
> Can someone help me on this?
>
> Is there some additional trick required to get it working?
>
>
>
> According specs the graphics card should fulfill all requirements.
>
>
>
> Best Regards,
>
> Thomas
>
>
>
>
>
>
> _______________________________________________
> 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://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
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
>
>


-- 



*| Aashish Chaudhary | Technical Leader         | Kitware Inc.            *
*| http://www.kitware.com/company/team/chaudhary.html
<http://www.kitware.com/company/team/chaudhary.html>*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20141110/153c12b8/attachment-0001.html>


More information about the vtkusers mailing list