[vtkusers] Multiple Surfaces at same height
Michael Jackson
mike.jackson at bluequartz.net
Wed Oct 1 13:45:17 EDT 2008
The ugly hack would be to clamp the water level "just above" the ocean
floor so the z values are not exactly the same. This might help a bit
visually...
Mike
On Oct 1, 2008, at 12:21 PM, PsyVis 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);
>
>
>
> --
> View this message in context: http://www.nabble.com/Multiple-Surfaces-at-same-height-tp19742989p19742989.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
More information about the vtkusers
mailing list