[vtkusers] depth peeling and screenshots

David Feng dfeng at cs.unc.edu
Thu Mar 29 08:36:52 EDT 2007


I'm noticing some odd behavior when I try to use vtkWindowToImageFilter 
to save a screenshot when depth peeling is enabled on my renderer.  
Here's the code:

mFilter->SetInputConnection(mRenWin->GetOutputPort());
mFilter->Modified();

mWriter->SetFileName(str);
mWriter->Write();

...nothing complicated.  All subsequent calls to Render() seem to render 
each depth peel in z order on the screen (for maybe .3 sec each) and 
then finally render the composited image.  If I take another screenshot 
after that, the output image file is fine, but it again exhibits that 
strange rendering behavior.  It's almost as if each depth peel is 
getting written to the file individually before the final composited 
image is written.  I'm trying to save an animation with hundreds of 
frames, so what should be taking a minute or two is actually taking 20-30. 

Any ideas?

Thanks,
David




More information about the vtkusers mailing list