[vtkusers] Control VTK frame rate

Elvis Stansvik elvis.stansvik at orexplore.com
Tue Jul 4 12:24:43 EDT 2017


Den 4 juli 2017 3:54 em skrev "kay" <jayavardhanravi at outlook.com>:
>
> 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.

Why do you need such a high frame rate? I don't think a human can really
perceive any differences at such high rates. 60 FPS or so is normally the
target to strive for (with monitors).

Elvis

>
> 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.
> _______________________________________________
> 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/20170704/e2dc018d/attachment.html>


More information about the vtkusers mailing list