[vtkusers] Moving an actor programmatically - performance issues
David Gobbi
david.gobbi at gmail.com
Wed Jan 13 17:47:08 EST 2016
Hi Richard,
Does your OpenGL implementation do anything special to "clip out" the
stationary data?
I'm wondering whether the slowness is due to 1) the time taken to load the
data onto the GPU or 2) the time taken for the GPU to render the polygons
after they're in GPU memory. I'm assuming that both VTK and your OpenGL
implementation do #2 on every render, since that is typical.
VTK only reloads data onto the GPU when the data changes, but if something
goes wrong and static data is re-loaded on every render, there is a huge
performance hit. I believe that VTK's new OpenGL2 backend temporarily had
some issues with unnecessarily reloading data, but those issues were fixed
for VTK 7.0.0.rc1. Are you using the OpenGL2 back end? And what version
of VTK?
The vtkActor::Render() method should only be called by VTK itself.
Applications call vtkRenderWindow::Render().
- David
On Tue, Jan 12, 2016 at 9:32 PM, Richard Frank <rickfrank at me.com> wrote:
>
> Hi,
>
> We are moving a small arrow actor around 3D space driven by data from a
> sensor, with another somewhat dense polygon model held stationary. We are
> moving the actor with setusertransform.
>
> We are only getting about 10 fps. An OpenGL implementation with the same
> data gets 50fps.
>
> What might we be doing wrong? It seems that the call to
> renderwindow->Render() is just drawing everything without clipping out data
> that doesn't need to be updated.....
>
> Also, what is the vtkActor::Render() method for? It seems to perform all
> the OpenGL calls but at the end nothing is drawn on the screen. Is that
> only to be called from within renderwindow->Render()?
>
> Our code uses a timer to read the data from the sensor, and parse the
> data, and then move the actor.
>
> Thanks,
>
> Rick
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160113/33981cc0/attachment.html>
More information about the vtkusers
mailing list