[vtkusers] Control VTK frame rate

kay jayavardhanravi at outlook.com
Tue Jul 4 09:54:26 EDT 2017


I had rendered actors to the render window. As I increase the number of
actors the frame rate decreases and the rendering is slow. Is there any
possible way to set the frame rate or increase the rendering speed as the
number of actors increase.

I tried to use ImmediateRenderingMode but I could not find any difference in
rendering speed/ Frame Rate.

I am trying to move the actor based on the input which is generated every
millisecond i.e 1000 datapoints for 1 second and apply it to the actors to
make a rotation.

Sample code that I use:

vtkSource s = new vtksource;
vtktransform t = new vtktransform;
vtktransformpolydatafilter tf = new vtktransformpolydatafilter;
tf->setinputconnection(s->getoutputport());
tf->settransform(t);
vtkpolydatamapper map = new vtkpolydatamapper;
map->setinputconnection(tf->getoutputport());
vtkactor act = new vtkactor;
act->setmapper(map);
while(true)
{
   t->Identity();
   t->RotateZ(SomeInputData); // SomeInputData changes every millisecond and
transform is in a loop
   t->update();   
   renderer->addActor(act);
   renderer->modified();
   renderWindow->render();
}

As the number of actors rendered to the same window increases the frame rate
decreases. 
I used renderer->GetLastRenderTimeInSeconds(); to get the frame rate (i.e
1/time)

Any solutions or suggestions would be helpful.
 Thanks for taking time to read the post.

Regards,
Kay



--
View this message in context: http://vtk.1045678.n5.nabble.com/Control-VTK-frame-rate-tp5743876.html
Sent from the VTK - Users mailing list archive at Nabble.com.


More information about the vtkusers mailing list