<html><body>
<p>Hi Cory,<br>
<br>
I'm using VTK 5.0.3 on Windows XP with Nvidia Quadro FX 550.<br>
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%.<br>
<br>
Thanks for your help.<br>
Dov<br>
<br>
<br>
<br>
<br>
<img src="cid:10__=4DBBF9DFDFDC09FB8f9e8a93df93@philips.com" width="16" height="16" alt="Inactive hide details for "Cory Quammen" <cquammen@cs.unc.edu>">"Cory Quammen" <cquammen@cs.unc.edu><br>
<br>
<br>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr valign="top"><td style="background-image:url(cid:20__=4DBBF9DFDFDC09FB8f9e8a93df93@philips.com); background-repeat: no-repeat; " width="34%">
<ul><b><font size="2">"Cory Quammen" <cquammen@cs.unc.edu></font></b><font size="2"> </font>
<p><font size="2">Sent by:</font><br>
<font size="2">cquammen@gmail.com</font>
<p><font size="2">09/04/2007 05:02 PM</font></ul>
</td><td width="66%">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr valign="top"><td width="1%"><img src="cid:30__=4DBBF9DFDFDC09FB8f9e8a93df93@philips.com" border="0" height="1" width="98" alt=""><br>
<div align="right"><font size="2">To</font></div></td><td width="100%"><img src="cid:30__=4DBBF9DFDFDC09FB8f9e8a93df93@philips.com" border="0" height="1" width="1" alt=""><br>
<font size="2">Dov Mayzlish/HFA/MS/PHILIPS@PHILIPS</font></td></tr>
<tr valign="top"><td width="1%"><img src="cid:30__=4DBBF9DFDFDC09FB8f9e8a93df93@philips.com" border="0" height="1" width="98" alt=""><br>
<div align="right"><font size="2">cc</font></div></td><td width="100%"><img src="cid:30__=4DBBF9DFDFDC09FB8f9e8a93df93@philips.com" border="0" height="1" width="1" alt=""><br>
<font size="2">vtkusers@vtk.org</font></td></tr>
<tr valign="top"><td width="1%"><img src="cid:30__=4DBBF9DFDFDC09FB8f9e8a93df93@philips.com" border="0" height="1" width="98" alt=""><br>
<div align="right"><font size="2">Subject</font></div></td><td width="100%"><img src="cid:30__=4DBBF9DFDFDC09FB8f9e8a93df93@philips.com" border="0" height="1" width="1" alt=""><br>
<font size="2">Re: [vtkusers] Need help for Offscreen rendering</font></td></tr>
<tr valign="top"><td width="1%" valign="middle"><img src="cid:30__=4DBBF9DFDFDC09FB8f9e8a93df93@philips.com" border="0" height="1" width="98" alt=""><br>
<div align="right"><font size="2">Classification</font></div></td><td width="100%" valign="middle"><img src="cid:30__=4DBBF9DFDFDC09FB8f9e8a93df93@philips.com" border="0" height="1" width="1" alt=""><br>
</td></tr>
</table>
<table border="0" cellspacing="0" cellpadding="0">
<tr valign="top"><td width="58"><img src="cid:30__=4DBBF9DFDFDC09FB8f9e8a93df93@philips.com" border="0" height="1" width="1" alt=""></td><td width="336"><img src="cid:30__=4DBBF9DFDFDC09FB8f9e8a93df93@philips.com" border="0" height="1" width="1" alt=""></td></tr>
</table>
</td></tr>
</table>
<br>
<tt>Dov,<br>
<br>
What version of VTK are you using? Support for hardware-accelerated<br>
offscreen rendering was added within the last year. Your graphics<br>
hardware must support framebuffer objects to use it, otherwise VTK<br>
will revert to software offscreen rendering. What graphics card are<br>
you using?<br>
<br>
Cheers,<br>
Cory<br>
<br>
On 9/4/07, Dov Mayzlish <dov.mayzlish@philips.com> wrote:<br>
><br>
><br>
> Hi,<br>
><br>
> I'm using vtk to render a scene into a buffer, which is then processed and<br>
> viewed interactively (i.e. zoom/pan/rotate) by my application.<br>
><br>
> While onscreen rendering is fast enough for my scene, when I set the<br>
> OffScreenRendering to 'On', rendering process is slow. I believe that<br>
> Offscreen rendering doesn't use graphics hardware acceleration, and cpu is<br>
> obviously slower.<br>
><br>
> Apparenty, when I use onscreen rendering, the WindowToImageFilter does<br>
> generate the image to the buffer (provided the vtk viewport is fully on the<br>
> screen). In this situation the rendering is fast and I get the image to my<br>
> buffer fast, but I am stuck with additional window (vtk viewport) on my<br>
> screen.<br>
><br>
> Is there a possibility to define Off-Screen rendering to use hardware<br>
> acceleration instead of cpu?<br>
> A sample of the code is attached at the bottom of the messege.<br>
><br>
> Thanks,<br>
> Dov<br>
><br>
> ------------------------------------------------------<br>
> this->renWin = vtkRenderWindow::New();<br>
> this->renWin->OffScreenRenderingOn();<br>
> this->renWin->AddRenderer(this->ren);<br>
> this->ren = vtkRenderer::New();<br>
> this->w2if = vtkWindowToImageFilter::New();<br>
> this->w2if->SetInput(renWin);<br>
><br>
><br>
> ......<br>
> this->renWin->Render();<br>
> this->w2if->Modified();<br>
> this->w2if->Update();<br>
><br>
> unsigned char *data = (unsigned char*)<br>
> w2if->GetOutput()->GetScalarPointer(0,0,0);<br>
><br>
><br>
> _______________________________________________<br>
> This is the private VTK discussion list.<br>
> Please keep messages on-topic. Check the FAQ at:<br>
> </tt><tt><a href="http://www.vtk.org/Wiki/VTK_FAQ">http://www.vtk.org/Wiki/VTK_FAQ</a></tt><tt><br>
> Follow this link to subscribe/unsubscribe:<br>
> </tt><tt><a href="http://www.vtk.org/mailman/listinfo/vtkusers">http://www.vtk.org/mailman/listinfo/vtkusers</a></tt><tt><br>
><br>
><br>
<br>
<br>
-- <br>
Cory Quammen<br>
Department of Computer Science<br>
University of North Carolina at Chapel Hill<br>
</tt><tt><a href="http://www.cs.unc.edu/~cquammen">http://www.cs.unc.edu/~cquammen</a></tt><tt><br>
</tt><br>
</body></html>