Hello VTK gurus,<br>
<br>
I have just encountered a strange problem with vtkArrowSource. It seems
that the color (or is it the light?) of these glyphs is not correct
when I use offscreen rendering. I am running VTK 4.4. on Windows,
compiled with <a href="http://vs.net/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">VS.NET</a> 2003. I have included two images that illustrate
the problem, the first one is a snapshot made without using offscreen
rendering, and the second one is a snapshot when using offscreen
rendering.<br>
<br>
The image has 4 large arrows that are vtkArrowSource fed through
vtkGlyph3D. The smaller arrows are on a plane below the 4 large arrows,
and are also glyphs using vtkGlyph3D, but are using a different source
that I wrote myself. You'll notice that the thin arrows, as well as the
other objects in the scene, are rendered properly in both images. It
seems that only the vtkArrowSource arrows do not get the right 'light'
on them.<br>
<br>
I display these using calls like:<br>
<br>
this->pGlyphSource = vtkArrowSource::New();<br>
this->pGlyph = vtkGlyph3D::New();<br>
<br>
this->pGlyph->SetSource(this-
<div id="mb_0">>pGlyphSource->GetOutput());<br>
this->pGlyph->SetVectorModeToUseVector();<br>
this->pGlyph->SetScaleModeToScaleByVector();<br>
this->pGlyph->SetColorModeToColorByVector();<br>
this->pGlyph->ClampingOff();<br>
<br>
The calls are exactly the same for the thin arrows. <br>
<br>
The switch to offscreen rendering is done this way:<br>
<br>
this->pWinRenderWindow = vtkWin32OpenGLRenderWindow::New();<br>
this->pWinRenderWindow->SetOffScreenRendering(1);<br>
this->iOffscreenHeight = 480;<br>
this->iOffscreenWidth = 640;<br>
<br>
this->pWinRenderWindow->AddRenderer(this->pRenderer);<br>
// Connect the W2I filter<br>
this->pW2I->SetInput(this->pWinRenderWindow);<br>
// Set the size<br>
this->pWinRenderWindow->SetSize(this->iOffscreenWidth,
this->iOffscreenHeight);<br>
<br>
(this->pW2I is a vtkWindowToImageFilter that writes the PNG files to disk)<br>
<br>
What is really puzzling me is that the other glyphs in the scene seem to be colored properly..<br>
<br>
Any ideas, help? I would gladly welcome any suggestions.<br>
<br>
Thank you,<br><span class="sg">
<br>
Charles Boivin<br>
<br>
P.S. Sorry about the poor quality JPEGs, but I wanted to keep the size small. Thank you.<br>
</span></div>