[vtkusers] Vertex presentation (scalability and visibility issues )

Sebastien Jourdain sebastien.jourdain at kitware.com
Mon Apr 25 21:05:25 EDT 2011


Hi Alex,

In paraview we solve that problem by using the point-sprite plugin
that draw a 2d texture at each vertex location.

Seb

On Mon, Apr 25, 2011 at 7:33 PM, Alex Malyushytskyy
<alexmalvtk at gmail.com> wrote:
> I am trying to display some points on top of 3d mesh and I could not
> find a reasonable way to achieve what I would like to.
>
> First comments comments about what I would call ideal:
> - vertex presentation should be drawn in pixels ( do not change size
> during zoom )
> - if vertex center is visible, vertex presentation should be fully visible.
>
> As for now I found 2 ways to display vertex, but I failed to find a
> way to achieve what I want with bot of them:
>
> 1. Vertex  as 3d cell (a sphere). This can be implemented in multiple
> ways ( the way I tried was to use vtkGlyph3D ).
> But all the ways suffer draw data as 3d data, which means rendering
> and memory usage is inefficient.
> t and even though location of the point  is displayed somehow clear
> part of the presentation is hidden if point is displayed on top of
> other cell (for example triangle ).
> The only advantage of this method is that, if sphere is used as a
> source for a glyph3d vertex presentation looks ok, if vertex center is
> located  on the surface of another cell.
>
> The major issue with this approach is that I could not find any way
> ("automatic scaling, etc"). I certainly could find a scale factor and
> recreate spheres each time user zooms with different radius,  but  I
> doubt that could be done without without killing the performance.
>
> 2. Vertex as 0d cell. I tried vtkVertexGlyphFilter.  This approach is
> close to ideal, but suffer another major issue.
> Vertex is presented as a 2d rectangle in screen coordinates.
> Zooming in/out always shows desired size of the rectangle in pixels (
> I would prefer it to be circle or frame as a shape, but can live with
> it ).
>
> Problems of this method are:
> Vertex presentation is still rendered as 3d object. Assume the
> previous example - vertex on the triangular surface.
> Depending on the camera, part of the vertex rectangle is hidden behind
> triangular surface.
>
>
> Is there any alternative?
>
> I remember when we were using hoops 3d  in one of the project we were
> able to draw vertexes ( and other primitives) ourselves.
> Once visibility of the primitive was established  (by hoops) we could
> callback function was called and we could directly draw vertex
> rectangle in 3d coordinates.
> Can anything like this be achieved with vtk?
>
> Thanks in advance,
>
> Alex
>
>
>
>
>
>
>
>
>
> should be displayed by drawing 2d primitive in screen coordinate system.
> _______________________________________________
> 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