[vtkusers] 3D model and 2d Image overlay - depth issues, flickering

Miro Drahos mdrahos at robodoc.com
Fri Nov 8 13:48:19 EST 2013


Try to use the following:
   vtkMapper::SetResolveCoincidentTopologyToPolygonOffset();
vtkMapper::SetResolveCoincidentTopologyPolygonOffsetParameters(0.1, 1);

Just call these in the ctor of your viewer, they are static functions 
and will set some global variables.
If your issues are really coincidency, this should help. You may need to 
fiddle with the parameters a little bit.
Cheers,
Miro


On 11/07/2013 08:34 PM, manikandtan.ck wrote:
> Miro Drahos wrote
>> Try to keep just one camera and set the other renderer to it:
>>
>> ren2->SetActiveCamera(ren->GetActiveCamera());
> Thanks for that. I tried with one camera and the interactivity quirks
> mentioned before are gone.
> But the flickering shown in the first post remains.
>
>
>> Also, do you really need all these
>>
>> rw->SetWindowId(hWnd);   * //rw is vtkWin32OpenGLRenderWindow*
>> rw->SetParentId(hWnd);
>> rw->SetDeviceContext(hDC);
>> rw->SetContextId(hRC);
>>
>> Why not just create vtkRenderWindow and let VTK deal with the device/OS
>> specific-issues?
> I need these because the program is built with MFC at its core. Volume
> rendering is just one of the modules of the main program. The output should
> be rendered in the MFC window throughout the program.
>
>
>
>
>
>
>
>
> --
> View this message in context: http://vtk.1045678.n5.nabble.com/3D-model-and-2d-Image-overlay-depth-issues-flickering-tp5724298p5724355.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
> _______________________________________________
> 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



More information about the vtkusers mailing list