[vtkusers] Need help for Offscreen rendering

Dov Mayzlish dov.mayzlish at philips.com
Tue Sep 4 10:35:25 EDT 2007


Hi Cory,

I'm using VTK 5.0.3 on Windows XP with Nvidia Quadro FX 550.
When I investigate the issue with a long loop of rendering, I see that
offscreen brings the cpu to 100% usage, while onscreen leave it on 5-10%.

Thanks for your help.
Dov






                                                                           
                                                                           
                                                                           
                                                                        To 
                                       Dov Mayzlish/HFA/MS/PHILIPS at PHILIPS 
                                                                        cc 
     "Cory Quammen"                    vtkusers at vtk.org                    
     <cquammen at cs.unc.edu                                          Subject 
     >                                 Re: [vtkusers] Need help for        
                                       Offscreen rendering                 
     Sent by:                                               Classification 
     cquammen at gmail.com                                                    
                                                                           
     09/04/2007 05:02 PM                                                   
                                                                           
                                                                           
                                                                           
                                                                           




Dov,

What version of VTK are you using? Support for hardware-accelerated
offscreen rendering was added within the last year. Your graphics
hardware must support framebuffer objects to use it, otherwise VTK
will revert to software offscreen rendering. What  graphics card are
you using?

Cheers,
Cory

On 9/4/07, Dov Mayzlish <dov.mayzlish at philips.com> wrote:
>
>
> Hi,
>
>  I'm using vtk to render a scene into a buffer, which is then processed
and
> viewed interactively (i.e. zoom/pan/rotate) by my application.
>
>  While onscreen rendering is fast enough for my scene, when I set the
> OffScreenRendering to 'On', rendering process is slow. I believe that
> Offscreen rendering doesn't use graphics hardware acceleration, and cpu
is
> obviously slower.
>
>  Apparenty, when I use onscreen rendering, the WindowToImageFilter does
> generate the image to the buffer (provided the vtk viewport is fully on
the
> screen). In this situation the rendering is fast and I get the image to
my
> buffer fast, but I am stuck with additional window (vtk viewport) on my
> screen.
>
>  Is there a possibility to define Off-Screen rendering to use hardware
> acceleration instead of cpu?
>  A sample of the code is attached at the bottom of the messege.
>
>  Thanks,
>  Dov
>
>  ------------------------------------------------------
>  this->renWin = vtkRenderWindow::New();
>  this->renWin->OffScreenRenderingOn();
>  this->renWin->AddRenderer(this->ren);
>  this->ren = vtkRenderer::New();
>  this->w2if = vtkWindowToImageFilter::New();
>  this->w2if->SetInput(renWin);
>
>
>  ......
>  this->renWin->Render();
>  this->w2if->Modified();
>  this->w2if->Update();
>
>  unsigned char *data = (unsigned char*)
> w2if->GetOutput()->GetScalarPointer(0,0,0);
>
>
> _______________________________________________
> 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
>
>


--
Cory Quammen
Department of Computer Science
University of North Carolina at Chapel Hill
http://www.cs.unc.edu/~cquammen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070904/8ea1c661/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: graycol.gif
Type: image/gif
Size: 105 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070904/8ea1c661/attachment.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pic04127.gif
Type: image/gif
Size: 1255 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070904/8ea1c661/attachment-0001.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ecblank.gif
Type: image/gif
Size: 45 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070904/8ea1c661/attachment-0002.gif>


More information about the vtkusers mailing list