Control VTK frame rate

classic Classic list List threaded Threaded
20 messages Options
Jay
Reply | Threaded
Open this post in threaded view
|

Control VTK frame rate

Jay
This post was updated on .
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);
renderer->addActor(act); // Edited this part
while(true)
{
   t->Identity();
   t->RotateZ(SomeInputData); // SomeInputData changes every millisecond and transform is in a loop
   t->update();
   renderer->addActor(act);  // Edited this part
   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
Reply | Threaded
Open this post in threaded view
|

Re: Control VTK frame rate

Elvis Stansvik


Den 4 juli 2017 3:54 em skrev "kay" <[hidden email]>:
>
> 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


_______________________________________________
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
Jay
Reply | Threaded
Open this post in threaded view
|

Re: Control VTK frame rate

Jay
By rendering more number of actor, I get a frame rate of 7-9 but i am trying to improve it to 12-14. And I get no where near 60 FPS though my display settings are set to 60. At frame rate of 7-9 and 12-14 there is huge visible difference, which I am trying to improve.

I think I use more than sufficient hardware configuration. My hardware configuration 32GB RAM, 4GB NVIDIA M2000M Graphic Card, Core-7i processor

Regards
Reply | Threaded
Open this post in threaded view
|

Re: Control VTK frame rate

David E DeMarle
Make sure you are using the openGL2 backend.

More importantly, avoid using multiple actors. They are heavyweight objects and won't support high rates for more than perhaps a few hundred instances. Instead use appendpolydata or something similar to bring everything together into one or a handful of actors.

On Jul 4, 2017 12:33 PM, "kay" <[hidden email]> wrote:
By rendering more number of actor, I get a frame rate of 7-9 but i am trying
to improve it to 12-14. And I get no where near 60 FPS though my display
settings are set to 60. At frame rate of 7-9 and 12-14 there is huge visible
difference, which I am trying to improve.

I think I use more than sufficient hardware configuration. My hardware
configuration 32GB RAM, 4GB NVIDIA M2000M Graphic Card, Core-7i processor

Regards



--
View this message in context: http://vtk.1045678.n5.nabble.com/Control-VTK-frame-rate-tp5743876p5743880.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

_______________________________________________
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
Jay
Reply | Threaded
Open this post in threaded view
|

Re: Control VTK frame rate

Jay
I am using the latest version of OpenGL backend.

I could consider combining polydata to use fewer actors as you suggested. But each of the actor perform transforms like rotation and translation independently of other.

Regards

Reply | Threaded
Open this post in threaded view
|

Re: Control VTK frame rate

Elvis Stansvik
In reply to this post by Jay
2017-07-04 18:33 GMT+02:00 kay <[hidden email]>:
> By rendering more number of actor, I get a frame rate of 7-9 but i am trying
> to improve it to 12-14. And I get no where near 60 FPS though my display
> settings are set to 60. At frame rate of 7-9 and 12-14 there is huge visible
> difference, which I am trying to improve.

Your display settings have nothing to do with how well VTK can perform.

What I meant was: Why are you moving your actor at such a high
frequency (1000 times per second)? To me it doesn't make sense to try
to move it that often (you're probably swamping VTK with render
requests).

I would try to move it maybe 60 times per second, or at least in that ballpark.

Where are these high frequency events coming from?

If you by any chance is using Qt 5.5, and these are mouse/touch
events, you could be suffering from QTBUG-40889 (fixed in 5.6).

Elvis

>
> I think I use more than sufficient hardware configuration. My hardware
> configuration 32GB RAM, 4GB NVIDIA M2000M Graphic Card, Core-7i processor
>
> Regards
>
>
>
> --
> View this message in context: http://vtk.1045678.n5.nabble.com/Control-VTK-frame-rate-tp5743876p5743880.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
_______________________________________________
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
Jay
Reply | Threaded
Open this post in threaded view
|

Re: Control VTK frame rate

Jay
My Input data is generated by the realtime system, so the high frequency of data. But the VTK application I am trying to build is not a real time system. To explain further, the pseudo code that I posted before works by calling render in a loop.

double realTimevariable; // This variable is updated by the real time system every millisecond
while(true)
{
   t->Identity();
   t->RotateZ(realTimevariable); // realTimevariable takes the value at this point of time
   t->update();  
   renderer->addActor(act);
   renderer->modified();
   renderWindow->render();
}

Each time the loop is run value of the realTimeVariable is taken from the memory at that instance of time.
This process works for less number of actors and frame rate is 12-14, but if the actors are doubled the frame rate goes down by 7-9 which is visible to the eye. From what I understand, this looping of render call (renderWindow->Render();) is what you mentioned "swamping VTK with render requests", Please correct me if I am wrong.

And I dont want to control data to 60 times per second, as I want VTK to render as often as it can (Minimum of 12 FPS)

I am not using QT, just basic vtk pipeline in C++.
Reply | Threaded
Open this post in threaded view
|

Re: Control VTK frame rate

Bill Lorensen
How many actors do you have?

On Jul 4, 2017 4:26 PM, "kay" <[hidden email]> wrote:
My Input data is generated by the realtime system, so the high frequency of
data. But the VTK application I am trying to build is not a real time
system. To explain further, the pseudo code that I posted before works by
calling render in a loop.

double realTimevariable; // This variable is updated by the real time system
every millisecond
while(true)
{
   t->Identity();
   t->RotateZ(realTimevariable); // realTimevariable takes the value at this
point of time
   t->update();
   renderer->addActor(act);
   renderer->modified();
   renderWindow->render();
}

Each time the loop is run value of the realTimeVariable is taken from the
memory at that instance of time.
This process works for less number of actors and frame rate is 12-14, but if
the actors are doubled the frame rate goes down by 7-9 which is visible to
the eye. From what I understand, this looping of render call
(renderWindow->Render();) is what you mentioned "swamping VTK with render
requests", Please correct me if I am wrong.

And I dont want to control data to 60 times per second, as I want VTK to
render as often as it can (Minimum of 12 FPS)

I am not using QT, just basic vtk pipeline in C++.



--
View this message in context: http://vtk.1045678.n5.nabble.com/Control-VTK-frame-rate-tp5743876p5743885.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

_______________________________________________
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
Jay
Reply | Threaded
Open this post in threaded view
|

Re: Control VTK frame rate

Jay
If I use 120 Actors I get a frame rate of 12-14,
but if I use more than 240 I get a frame rate of 7-9

And all the actors are loaded from STL/OBJ files

Regards
Kay
Reply | Threaded
Open this post in threaded view
|

Re: Control VTK frame rate

Bill Lorensen
Do they all change during the simulation?

Sent from my iPad

> On Jul 4, 2017, at 4:35 PM, kay <[hidden email]> wrote:
>
> If I use 120 Actors I get a frame rate of 12-14,
> but if I use more than 240 I get a frame rate of 7-9
>
> And all the actors are loaded from STL/OBJ files
>
> Regards
> Kay
>
>
>
> --
> View this message in context: http://vtk.1045678.n5.nabble.com/Control-VTK-frame-rate-tp5743876p5743887.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
_______________________________________________
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
Jay
Reply | Threaded
Open this post in threaded view
|

Re: Control VTK frame rate

Jay
The actors are loaded with data from STL/OBJ files only once, but the transform like rotation are make the actors to change every time the loop is run.
Reply | Threaded
Open this post in threaded view
|

Re: Control VTK frame rate

Bill Lorensen
Are they transformed independently or in unison? Also, how is the transformed applied? In the pipeline, or directly to the actor?

Sent from my iPad

> On Jul 4, 2017, at 4:56 PM, kay <[hidden email]> wrote:
>
> The actors are loaded with data from STL/OBJ files only once, but the
> transform like rotation are make the actors to change every time the loop is
> run.
>
>
>
> --
> View this message in context: http://vtk.1045678.n5.nabble.com/Control-VTK-frame-rate-tp5743876p5743889.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
_______________________________________________
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
Jay
Reply | Threaded
Open this post in threaded view
|

Re: Control VTK frame rate

Jay
Transforms are independent and are applied directly to the actor
Reply | Threaded
Open this post in threaded view
|

Re: Control VTK frame rate

Bill Lorensen
In reply to this post by Bill Lorensen
That seems to rule out Appending the models.  Are you using SetUserMatrix on the actors? Also, use a SetInputData on the mappers after Updating the last filters in the pipeline.

Sent from my iPad

> On Jul 4, 2017, at 5:16 PM, Bill Lorensen <[hidden email]> wrote:
>
> Are they transformed independently or in unison? Also, how is the transformed applied? In the pipeline, or directly to the actor?
>
> Sent from my iPad
>
>> On Jul 4, 2017, at 4:56 PM, kay <[hidden email]> wrote:
>>
>> The actors are loaded with data from STL/OBJ files only once, but the
>> transform like rotation are make the actors to change every time the loop is
>> run.
>>
>>
>>
>> --
>> View this message in context: http://vtk.1045678.n5.nabble.com/Control-VTK-frame-rate-tp5743876p5743889.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
_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Re: Control VTK frame rate

David Thompson-2
Hi all,

You might try the vtkGlyph3DMapper. It can take in a bunch of "source" polydata objects plus a set of points with point-data specifying orientation, scaling, and the index of which polydata to draw at each point. More recently, David Lonie added a way for it to take in a multiblock dataset and let each point specify the index of a top-level block to render (again, with point-data specifying per-instance transforms).

That would leave you with a single actor and an easy way to update per-instance transforms.

        David

> On Jul 4, 2017, at 5:32 PM, Bill Lorensen <[hidden email]> wrote:
>
> That seems to rule out Appending the models.  Are you using SetUserMatrix on the actors? Also, use a SetInputData on the mappers after Updating the last filters in the pipeline.
>
> Sent from my iPad
>
>> On Jul 4, 2017, at 5:16 PM, Bill Lorensen <[hidden email]> wrote:
>>
>> Are they transformed independently or in unison? Also, how is the transformed applied? In the pipeline, or directly to the actor?
>>
>> Sent from my iPad
>>
>>> On Jul 4, 2017, at 4:56 PM, kay <[hidden email]> wrote:
>>>
>>> The actors are loaded with data from STL/OBJ files only once, but the
>>> transform like rotation are make the actors to change every time the loop is
>>> run.
>>>
>>>
>>>
>>> --
>>> View this message in context: http://vtk.1045678.n5.nabble.com/Control-VTK-frame-rate-tp5743876p5743889.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
> _______________________________________________
> 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

_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Re: Control VTK frame rate

Ken Martin
In reply to this post by Jay
That doesn't seem to match the pseudo code you posted, where the transform is applied to a filter (shared by all the actors, well the only actor). Maybe an updated bit of pseudo code would help.

In general with lots of actors you want to make sure 

        mapper->StaticOn();

and

    ren->RemoveCuller(ren->GetCullers()->GetLastItem());

make sure it is a release build, and make sure your transformation is happening on the actor, not a filter such as trransformpolydata.



On Tue, Jul 4, 2017 at 5:18 PM, kay <[hidden email]> wrote:
Transforms are independent and are applied directly to the actor



--
View this message in context: http://vtk.1045678.n5.nabble.com/Control-VTK-frame-rate-tp5743876p5743893.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



--
Ken Martin PhD
Distinguished Engineer
Kitware Inc.
28 Corporate Drive
Clifton Park NY 12065

This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee.  Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message.  Thank you.

_______________________________________________
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
Jay
Reply | Threaded
Open this post in threaded view
|

Re: Control VTK frame rate

Jay
Thank you Ken Martin.

I could not post all the code, as the system is huge. Sorry that I missed some parts in pseudo code.
Hope you understand.

Making these changes had increased the frame rate from 7-9 to 16-17.
This fixed the low frame rate.

You post has really helped me
Thank you Ken Martin for the time

Regards,
Kay
Reply | Threaded
Open this post in threaded view
|

Re: Control VTK frame rate

Elvis Stansvik
In reply to this post by Ken Martin


Den 5 juli 2017 2:29 em skrev "Ken Martin" <[hidden email]>:
>
> That doesn't seem to match the pseudo code you posted, where the transform is applied to a filter (shared by all the actors, well the only actor). Maybe an updated bit of pseudo code would help.

The code snippet confuses me as well, since it looks like a new actor is added to the renderer in each iteration of the while(true). If that's true, the number of actors would grow fast and unboundedly.

Unless I'm missing something here.

Elvis

>
> In general with lots of actors you want to make sure 
>
>         mapper->StaticOn();
>
> and
>
>     ren->RemoveCuller(ren->GetCullers()->GetLastItem());
>
> make sure it is a release build, and make sure your transformation is happening on the actor, not a filter such as trransformpolydata.
>
>
>
> On Tue, Jul 4, 2017 at 5:18 PM, kay <[hidden email]> wrote:
>>
>> Transforms are independent and are applied directly to the actor
>>
>>
>>
>> --
>> View this message in context: http://vtk.1045678.n5.nabble.com/Control-VTK-frame-rate-tp5743876p5743893.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
>
>
>
>
> --
> Ken Martin PhD
> Distinguished Engineer
> Kitware Inc.
> 28 Corporate Drive
> Clifton Park NY 12065
>
> This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee.  Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message.  Thank you.
>
> _______________________________________________
> 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
>


_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Fwd: Control VTK frame rate

Ken Martin
In reply to this post by Ken Martin
On list in case it use useful to others


---------- Forwarded message ----------
From: Ken Martin <[hidden email]>
Date: Fri, Jul 7, 2017 at 8:47 AM
Subject: Re: [vtkusers] Control VTK frame rate
To: Andreas Buykx <[hidden email]>


The default culler checks the bounding box of every actor/prop and if they are outside of the view frustum it does not render them. So the performance question becomes:

is checking the actor's bounding box (with the pipeline mtime check) faster than the time savings of sometimes not rendering the actor?

So when the actors will all typically be visible and there are lots of them (or their filter pipelines are long) removing the culler can save time because you may be CPU bound on checking pipeline mtime. Oddly enough checking pipeline mtime can be fairly time consuming for lots of pipelines/actors.  So making the mapper static and removing the culler basically cuts out all pipeline mtime checks reducing the CPU load which with a fast GPU the CPU can often be the bottleneck for lots of VTK actors.



On Fri, Jul 7, 2017 at 5:07 AM, Andreas Buykx <[hidden email]> wrote:

Hi, could you please explain what the removal of the last culler is about? In what situations is it needed? I looked in the VTK7.1.0 and found that a small number of tests does this but  do not understand why it is needed in these tests and not in others.

 

Thanks a lot,

Andreas Buykx

 

From: vtkusers [mailto:[hidden email]] On Behalf Of Ken Martin
Sent: Wednesday, July 05, 2017 2:30 PM
To: kay
Cc: vtk
Subject: Re: [vtkusers] Control VTK frame rate

 

That doesn't seem to match the pseudo code you posted, where the transform is applied to a filter (shared by all the actors, well the only actor). Maybe an updated bit of pseudo code would help.

 

In general with lots of actors you want to make sure 

 

        mapper->StaticOn();

 

and

 

    ren->RemoveCuller(ren->GetCullers()->GetLastItem());

 

make sure it is a release build, and make sure your transformation is happening on the actor, not a filter such as trransformpolydata.

 

 

 

On Tue, Jul 4, 2017 at 5:18 PM, kay <[hidden email]> wrote:

Transforms are independent and are applied directly to the actor



--
View this message in context: http://vtk.1045678.n5.nabble.com/Control-VTK-frame-rate-tp5743876p5743893.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



 

--

Ken Martin PhD

Distinguished Engineer
Kitware Inc.

28 Corporate Drive
Clifton Park NY 12065

 

This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee.  Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message.  Thank you.




--
Ken Martin PhD
Distinguished Engineer
Kitware Inc.
28 Corporate Drive
Clifton Park NY 12065

This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee.  Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message.  Thank you.



--
Ken Martin PhD
Distinguished Engineer
Kitware Inc.
28 Corporate Drive
Clifton Park NY 12065

This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee.  Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message.  Thank you.

_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: Control VTK frame rate

Cory Quammen-2
Ken,

That's great info to know.

Thanks,
Cory

On Fri, Jul 7, 2017 at 8:48 AM, Ken Martin <[hidden email]> wrote:

> On list in case it use useful to others
>
>
> ---------- Forwarded message ----------
> From: Ken Martin <[hidden email]>
> Date: Fri, Jul 7, 2017 at 8:47 AM
> Subject: Re: [vtkusers] Control VTK frame rate
> To: Andreas Buykx <[hidden email]>
>
>
> The default culler checks the bounding box of every actor/prop and if they
> are outside of the view frustum it does not render them. So the performance
> question becomes:
>
> is checking the actor's bounding box (with the pipeline mtime check) faster
> than the time savings of sometimes not rendering the actor?
>
> So when the actors will all typically be visible and there are lots of them
> (or their filter pipelines are long) removing the culler can save time
> because you may be CPU bound on checking pipeline mtime. Oddly enough
> checking pipeline mtime can be fairly time consuming for lots of
> pipelines/actors.  So making the mapper static and removing the culler
> basically cuts out all pipeline mtime checks reducing the CPU load which
> with a fast GPU the CPU can often be the bottleneck for lots of VTK actors.
>
>
>
> On Fri, Jul 7, 2017 at 5:07 AM, Andreas Buykx <[hidden email]> wrote:
>>
>> Hi, could you please explain what the removal of the last culler is about?
>> In what situations is it needed? I looked in the VTK7.1.0 and found that a
>> small number of tests does this but  do not understand why it is needed in
>> these tests and not in others.
>>
>>
>>
>> Thanks a lot,
>>
>> Andreas Buykx
>>
>>
>>
>> From: vtkusers [mailto:[hidden email]] On Behalf Of Ken Martin
>> Sent: Wednesday, July 05, 2017 2:30 PM
>> To: kay
>> Cc: vtk
>> Subject: Re: [vtkusers] Control VTK frame rate
>>
>>
>>
>> That doesn't seem to match the pseudo code you posted, where the transform
>> is applied to a filter (shared by all the actors, well the only actor).
>> Maybe an updated bit of pseudo code would help.
>>
>>
>>
>> In general with lots of actors you want to make sure
>>
>>
>>
>>         mapper->StaticOn();
>>
>>
>>
>> and
>>
>>
>>
>>     ren->RemoveCuller(ren->GetCullers()->GetLastItem());
>>
>>
>>
>> make sure it is a release build, and make sure your transformation is
>> happening on the actor, not a filter such as trransformpolydata.
>>
>>
>>
>>
>>
>>
>>
>> On Tue, Jul 4, 2017 at 5:18 PM, kay <[hidden email]> wrote:
>>
>> Transforms are independent and are applied directly to the actor
>>
>>
>>
>> --
>> View this message in context:
>> http://vtk.1045678.n5.nabble.com/Control-VTK-frame-rate-tp5743876p5743893.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
>>
>>
>>
>>
>>
>> --
>>
>> Ken Martin PhD
>>
>> Distinguished Engineer
>> Kitware Inc.
>>
>> 28 Corporate Drive
>> Clifton Park NY 12065
>>
>>
>>
>> This communication, including all attachments, contains confidential and
>> legally privileged information, and it is intended only for the use of the
>> addressee.  Access to this email by anyone else is unauthorized. If you are
>> not the intended recipient, any disclosure, copying, distribution or any
>> action taken in reliance on it is prohibited and may be unlawful. If you
>> received this communication in error please notify us immediately and
>> destroy the original message.  Thank you.
>
>
>
>
> --
> Ken Martin PhD
> Distinguished Engineer
> Kitware Inc.
> 28 Corporate Drive
> Clifton Park NY 12065
>
> This communication, including all attachments, contains confidential and
> legally privileged information, and it is intended only for the use of the
> addressee.  Access to this email by anyone else is unauthorized. If you are
> not the intended recipient, any disclosure, copying, distribution or any
> action taken in reliance on it is prohibited and may be unlawful. If you
> received this communication in error please notify us immediately and
> destroy the original message.  Thank you.
>
>
>
> --
> Ken Martin PhD
> Distinguished Engineer
> Kitware Inc.
> 28 Corporate Drive
> Clifton Park NY 12065
>
> This communication, including all attachments, contains confidential and
> legally privileged information, and it is intended only for the use of the
> addressee.  Access to this email by anyone else is unauthorized. If you are
> not the intended recipient, any disclosure, copying, distribution or any
> action taken in reliance on it is prohibited and may be unlawful. If you
> received this communication in error please notify us immediately and
> destroy the original message.  Thank you.
>
> _______________________________________________
> 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
>



--
Cory Quammen
Staff R&D Engineer
Kitware, Inc.
_______________________________________________
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