<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 &quot;Cory Quammen&quot; &lt;cquammen@cs.unc.edu&gt;">&quot;Cory Quammen&quot; &lt;cquammen@cs.unc.edu&gt;<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">&quot;Cory Quammen&quot; &lt;cquammen@cs.unc.edu&gt;</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 &nbsp;graphics card are<br>
you using?<br>
<br>
Cheers,<br>
Cory<br>
<br>
On 9/4/07, Dov Mayzlish &lt;dov.mayzlish@philips.com&gt; wrote:<br>
&gt;<br>
&gt;<br>
&gt; Hi,<br>
&gt;<br>
&gt; &nbsp;I'm using vtk to render a scene into a buffer, which is then processed and<br>
&gt; viewed interactively (i.e. zoom/pan/rotate) by my application.<br>
&gt;<br>
&gt; &nbsp;While onscreen rendering is fast enough for my scene, when I set the<br>
&gt; OffScreenRendering to 'On', rendering process is slow. I believe that<br>
&gt; Offscreen rendering doesn't use graphics hardware acceleration, and cpu is<br>
&gt; obviously slower.<br>
&gt;<br>
&gt; &nbsp;Apparenty, when I use onscreen rendering, the WindowToImageFilter does<br>
&gt; generate the image to the buffer (provided the vtk viewport is fully on the<br>
&gt; screen). In this situation the rendering is fast and I get the image to my<br>
&gt; buffer fast, but I am stuck with additional window (vtk viewport) on my<br>
&gt; screen.<br>
&gt;<br>
&gt; &nbsp;Is there a possibility to define Off-Screen rendering to use hardware<br>
&gt; acceleration instead of cpu?<br>
&gt; &nbsp;A sample of the code is attached at the bottom of the messege.<br>
&gt;<br>
&gt; &nbsp;Thanks,<br>
&gt; &nbsp;Dov<br>
&gt;<br>
&gt; &nbsp;------------------------------------------------------<br>
&gt; &nbsp;this-&gt;renWin = vtkRenderWindow::New();<br>
&gt; &nbsp;this-&gt;renWin-&gt;OffScreenRenderingOn();<br>
&gt; &nbsp;this-&gt;renWin-&gt;AddRenderer(this-&gt;ren);<br>
&gt; &nbsp;this-&gt;ren = vtkRenderer::New();<br>
&gt; &nbsp;this-&gt;w2if = vtkWindowToImageFilter::New();<br>
&gt; &nbsp;this-&gt;w2if-&gt;SetInput(renWin);<br>
&gt;<br>
&gt;<br>
&gt; &nbsp;......<br>
&gt; &nbsp;this-&gt;renWin-&gt;Render();<br>
&gt; &nbsp;this-&gt;w2if-&gt;Modified();<br>
&gt; &nbsp;this-&gt;w2if-&gt;Update();<br>
&gt;<br>
&gt; &nbsp;unsigned char *data = (unsigned char*)<br>
&gt; w2if-&gt;GetOutput()-&gt;GetScalarPointer(0,0,0);<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; This is the private VTK discussion list.<br>
&gt; Please keep messages on-topic. Check the FAQ at:<br>
&gt; </tt><tt><a href="http://www.vtk.org/Wiki/VTK_FAQ">http://www.vtk.org/Wiki/VTK_FAQ</a></tt><tt><br>
&gt; Follow this link to subscribe/unsubscribe:<br>
&gt; </tt><tt><a href="http://www.vtk.org/mailman/listinfo/vtkusers">http://www.vtk.org/mailman/listinfo/vtkusers</a></tt><tt><br>
&gt;<br>
&gt;<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>