[vtkusers] Depth peeling

Busse, Thomas (GE Oil & Gas) Thomas.Busse at ge.com
Tue Nov 11 05:00:16 EST 2014


Hi,

pVtkMFCWindow
is created  like this:
  // Initialize VTK window
  CWnd* item = GetDlgItem(IDC_VTK_WINDOW);
  m_pVtkMFCWindow = new vtkMFCWindow(item);
in OnInitdialog().


Attached is the output of glview.


For the ctest: I was not able to build this. In cmake I enabled
BUILD_TESTING
but this ended in 133 warnings and 1  build error.


A note, most probably unrelated, but anyhow:
Compilation of project vtkGUISupportMFC was not working in Visual Studio 2013 out-of-the-box.
I had to change the properties “Character Set” from “Use Multi-Byte Character Set” to “Use Unicode Character Set”
(VTK6.1)

Best Regards,
Thomas

From: Aashish Chaudhary [mailto:aashish.chaudhary at kitware.com]
Sent: Montag, 10. November 2014 16:56
To: Busse, Thomas (GE Oil & Gas)
Subject: Re: [vtkusers] Depth peeling

Is pVtkMFCWindow is an instance of your own render window implementation?

Also, Can you run glview from here (if possible) http://www.realtech-vr.com/glview/download.php and send us the result of that?

It is possible that size of the alpha bit plane (8 vs 5 vs something) else is causing the issue. Also, make sure that you do it before you call render on the render window.

- Aashish

From: David E DeMarle [mailto:dave.demarle at kitware.com]
Sent: Montag, 10. November 2014 19:51
To: Aashish Chaudhary
Cc: Busse, Thomas (GE Oil & Gas); vtkusers at vtk.org
Subject: Re: [vtkusers] Depth peeling

> NVidia Quadro K300m under Windows.

hmmm, why would glGetIntegerv(GL_ALPHA_BITS, &alphaBits) would return 0? Maybe the context isn't initialized correctly at this point in the program somehow...

Thomas what does ctest -R Depth give you?







David E DeMarle
Kitware, Inc.
R&D Engineer
21 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-881-4909

On Mon, Nov 10, 2014 at 10:11 AM, Aashish Chaudhary <aashish.chaudhary at kitware.com<mailto:aashish.chaudhary at kitware.com>> wrote:
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<mailto: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<mailto:dave.demarle at kitware.com>]
Sent: Freitag, 7. November 2014 18:00
To: Busse, Thomas (GE Oil & Gas)
Cc: vtkusers at vtk.org<mailto: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<tel:518-881-4909>

On Fri, Nov 7, 2014 at 9:24 AM, Busse, Thomas (GE Oil & Gas) <Thomas.Busse at ge.com<mailto: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<http://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<http://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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20141111/99fb09c9/attachment.html>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: QuadroK300M_OpenGLView_Report.txt
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20141111/99fb09c9/attachment.txt>


More information about the vtkusers mailing list