<div dir="ltr"><div>Hi Sam,</div><div><br></div><div>There is a simple solution to this if the animation is looped (for example, if you have 20 polydata and you want to cycle through them). If this is the case, then add all of your polydata to the renderer at the same time, each with its own actor, and use the SetVisibility() method to hide all but the one that you want to show.</div><div><br></div><div>The advantage to doing things this way is that all of the polydata is loaded onto the GPU up front. During the animation, switching the visibility on and off is instantaneous. The visibility switching can be done in a callback to a TimerEvent (for obvious reasons, it can't be done in a for() loop, and for less obvious reasons, trying to use multithreading for this is just asking for trouble).</div><div><br></div><div>I've used this method myself for displaying animated cardiac models with interaction, but I no longer have the code (it was a long time ago). One thing that I remember is that in order to ensure that all the polydata were loaded onto the GPU before the animation started, I did one render at the beginning with all of the actors visible, but with SwapBuffersOff() so that this initial rendering was restricted to the back buffer.</div><div><br></div><div> - David</div><div><br></div><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, May 9, 2018 at 8:09 AM, Sam Raby <span dir="ltr"><<a href="mailto:rabysam28@gmail.com" target="_blank">rabysam28@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">Hello, I have a vtkPolyData that I can display fine. Every half a second another vrkplydata comes in, so I need to display the new vtkpolydata instead of the old one, and so forth. It is essentially like an animation but the incoming vtkploydata are different in size and content, so I cannot use the same vtkpolydata object every time. </span><div><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br></span></div><div><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">Is there an example so I see how to approach this? One requirement is that as this animation is displayed I need to be able to still interact with the scene such as zoom in and out. So it needs to be an unblocking call.</span><br></div><div><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br></span></div><div><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">Thanks</span></div><span class="HOEnZb"><font color="#888888"><div><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">-s</span></div></font></span></div>
</blockquote></div><br></div></div>