[vtkusers] Dynamically Add and Render Points using vtkPolyData

Shawn Waldon shawn.waldon at kitware.com
Fri Oct 27 10:21:33 EDT 2017


Hi Andrew,

Typically 'break it up into pieces' means create multiple vtkPolyDatas and
put them into a vtkMultiBlockDataSet.  With your current solution using
vtkAppendPolyData, the entire points list has to be recomputed every time
you add more to the vtkAppendPolyData and then that new list has to be
uploaded to the GPU for rendering (this also probably deallocates the old
one and allocates a new buffer with the new size too).  You could break it
up into many vtkPolyDatas and have an actor and mapper for each of them,
but typically it is more efficient to put them in a vtkMultiBlockDataSet
and use the vtkCompositePolyDataMapper2 to render them all at once (that
said I'm not sure about performance in this case where you are modifying
it, others on the list may know more about the implementation and how it
will perform).

HTH,
Shawn

On Fri, Oct 27, 2017 at 1:19 AM, Andrew <Andrew at ryonic.io> wrote:

> Thanks Aron,
>
> I will try and use SetPoint for my point insertion,
>
> When You say break it up into Pieces do you mean have multiple Polydata
> actors and Mapper? as they reach their respective "max size" make a new one
> and add it to the scene?? My newest attempt uses Pieces that are added onto
> make 1 large poly data using The vtkAppendPolyData with its Mapper and
> actor.
>
> I can see the renderWindow is an openGL window and my GPU does get utilized
> but, like I mentioned, as the set grows its the render event that takes
> longer and longer not that addition of a point 360 points (2ms)
>
> Regards Andrew
>
>
>
> --
> Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html
> _______________________________________________
> 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
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20171027/31168863/attachment.html>


More information about the vtkusers mailing list