[vtkusers] fastest render method for spheres...?!
David Feng
dfeng at cs.unc.edu
Thu Feb 4 14:48:19 EST 2010
I had a similar problem with this awhile back. My solution was to
write a new mapper that takes in a bunch of points, draws an impostor
quad per point, and binds a shader that does sphere rendering. GLSL
sphere rendering is really fast (basically just requires a dot product
in the fragment shader). The shader code itself isn't bad, and now my
spheres aren't faceted. I can draw thousands of spheres without too
much trouble now. I can send you the code if you're interested.
David
On Thu, Feb 4, 2010 at 1:27 PM, Benjamin Frigan
<frigan at itap.physik.uni-stuttgart.de> wrote:
> David,
> yes, I've already tried it a few minutes ago. I think it gets better
> when I turn it on, at least with vtkglyph3D but not with the vector of
> actors.
>
>
> Marcus,
> but display lists are used by default in VTK, right? So, by turning it
> off it gets worse.
>
>
>
>
> David Doria schrieb:
>> On Thu, Feb 4, 2010 at 1:12 PM, Marcus D. Hanwell
>> <marcus.hanwell at kitware.com <mailto:marcus.hanwell at kitware.com>> wrote:
>>
>> On Thu, Feb 4, 2010 at 12:58 PM, Benjamin Frigan
>> <frigan at itap.physik.uni-stuttgart.de
>> <mailto:frigan at itap.physik.uni-stuttgart.de>> wrote:
>>
>> I forgot to ask the following:
>> I know that in OpenGL, when you render a large amount of
>> objects, you
>> can use something that is called "Backface Culling". Then, all
>> faces
>> that are facing away from the camera because they are always
>> covered by
>> faces that are facing towards the camera. Is this implemented
>> in VTK by
>> default or do I have to enable it somehow?
>>
>>
>> Here is an example of how to turn on backface culling. It seems to be
>> off by default.
>>
>> http://vtk.org/Wiki/VTK/Examples/Visualization/BackfaceCulling
>>
>> Thanks,
>>
>> David
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> 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
>>
>
> _______________________________________________
> 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
>
--
http://www.cs.unc.edu/~dfeng
More information about the vtkusers
mailing list