[vtkusers] Multiple Surfaces at same height

Gerrick Bivins gbivins at objectreservoir.com
Wed Oct 1 12:50:28 EDT 2008


Hi Rich,
Sounds like a z fighting problem but hard to tell without seeing.
You could take a look at the "SetResolveCoincidentTopology" functions in
vtkMapper to see if it can resolve your issue:
http://www.vtk.org/doc/release/5.2/html/a00817.html#a2ea475413fed0b45566e33c
c9f659e8

Gerrick

On 10/1/08 11:21 AM, "PsyVis" <osue80 at bangor.ac.uk> wrote:

> 
> Hello 
> 
> I am trying to visualise some coastal hydrodynamical data taken from a
> mathematical model where I've got two poly data surfaces (one representing
> the sea floor and the other representing the water level). At some points
> the water level gets clamped to the same height as the sea floor so there
> are two surfaces in the exact same space. When this is rendered it leaves an
> undesirable effect (almost like tiger printing - where the renderer cannot
> decide which triangles to draw on top of one another). I've tried using
> seperate renderers(in the same renderwindow) and setting layers but this
> doesn't work either.
> 
> Thanks very much
> 
> Rich
> 
> Here is the code for the rendering process
> 
> 
>         vtkRenderWindow renWin = new vtkRenderWindow();
>         renWin = renPanel.GetRenderWindow();
>         renWin.SetNumberOfLayers(2);
> 
>         vtkRenderer wlRen = new vtkRenderer();
>         wlRen = renPanel.GetRenderer();
>         wlRen.AddActor(wlActor);
>         wlRen.SetBackground(Colors.SLATE_GREY);
>         wlRen.SetLayer(0);
> 
>         vtkCamera camera = wlRen.GetActiveCamera();
>         camera.Zoom(1.5);
> 
>         wlRen.SetActiveCamera(camera);
>        
>         vtkRenderer ren = new vtkRenderer();
>         ren = renPanel.GetRenderer();
>         ren.AddActor(bActor);
>         ren.AddActor(bbActor);
>         ren.AddActor(edgeActor);
>       
>         
>         ren.SetActiveCamera(camera);
>         ren.SetLayer(1);
>        
>          renWin.AddRenderer(ren);
>          renWin.AddRenderer(wlRen);
>         
> 




More information about the vtkusers mailing list