[vtkusers] plot a huge amount of spheres

David E DeMarle dave.demarle at kitware.com
Thu Aug 22 10:55:14 EDT 2013


Use a vtkPolyData with points on the locations, and a VTK_VERTEX cell
refering to each one.

Then send that into vtkGlyph to have the CPU makes the spheres which then
get send to the card.

Better yet, draw it with vtkGlyph3dMapper to make the spheres via vertex
programs on the GPU instead of the CPU.

Better still, bring ParaView's point sprite plugin over, which will draw
the spheres via fragment programs on the GPU.


David E DeMarle
Kitware, Inc.
R&D Engineer
21 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-881-4909


On Thu, Aug 22, 2013 at 10:45 AM, Gib Bogle <g.bogle at auckland.ac.nz> wrote:

> You need only multiple actors, all using the same mapper.
>
>
> On 23/08/2013 2:39 a.m., curator wrote:
>
>> Hi all,
>>
>> I am able to draw a vtkSphere with its own vtkSphere, vtkActor and
>> vtkMapper equipped together. Now if I need several spheres, I add multiple
>> instances of this stuff for each sphere and add them all up to the same
>> renderer - so far, so good.
>>
>> Now I need to draw a really huge amount of spheres, which are all
>> identical except the position. Is there any more efficient way to to that
>> than just creating N vtkActors, N vtkMappers and N vtkSpheres?
>>
>> regards,
>> curator
>> ______________________________**_________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at http://www.kitware.com/**
>> opensource/opensource.html<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 <http://www.vtk.org/Wiki/VTK_FAQ>
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.vtk.org/mailman/**listinfo/vtkusers<http://www.vtk.org/mailman/listinfo/vtkusers>
>>
>
>
> --
> Dr. Gib Bogle
> Senior Research Fellow
> Auckland Bioengineering Institute
> University of Auckland
> New Zealand
>
> http://www.bioeng.auckland.ac.**nz <http://www.bioeng.auckland.ac.nz>
>
> g.bogle at auckland.ac.nz
> (64-9) 373-7599 Ext. 87030
>
>
> ______________________________**_________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/**
> opensource/opensource.html<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 <http://www.vtk.org/Wiki/VTK_FAQ>
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/**listinfo/vtkusers<http://www.vtk.org/mailman/listinfo/vtkusers>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130822/cbe20db7/attachment.htm>


More information about the vtkusers mailing list