[vtkusers] Screen video recording of vtk rendering as it is rotated and interacted with.

Samuel Barnes ironictoo at yahoo.com
Fri Sep 1 09:00:26 EDT 2006


Look up:

vtkMPEG2Writer
vtkAVIWriter

For examples on how to generate a movie.  As for how to interact with it while it is generating, what I do that works well is in my loop that generates the frames of my movie I put a windows message processor.  This code jumps out and processes any waiting messages (button clicks, mouse moves, etc) so you can still ineract with your program while it is maxing out your processor doing the rendering.  Code example below:

for(UINT n=2; n<=m_numImages; n++)
    {
        animVTK->GenerateFrame(m_basename, n, m_angle);

        //Add message processor so progress bar always works
        //and you can interact with render sceen
        MSG msg;
        while ( ::PeekMessage( &msg, NULL, 0, 0, PM_NOREMOVE ) )
        {
            if ( !AfxGetApp()->PumpMessage( ) )
            {
                ::PostQuitMessage(0);
                break;
            }
        }
    }

Rashed Karim <rashed.karim at gmail.com> wrote: Hi everyone, 

I am trying to capture a video of my VTK rendering as I rotate it, etc. and convert it to an AVI/GIF format so that I can post it on the web. I have seen other people do it, so does anyone know its done?  

Thanks, 

-- 
Rashed Karim
PhD student 
Imperial College London 
http://rashedkarim.com
 
 _______________________________________________
This is the private VTK discussion list. 
Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20060901/12535228/attachment.htm>


More information about the vtkusers mailing list