[vtkusers] Inconsistent rendering between debug and release
Tim Soper
tim_d_soper at yahoo.com
Fri Nov 2 19:06:03 EDT 2007
Hi-
I have an application where I optimize the camera location in a scene. At each camera location I convert the rendered scene to an image using the vtkWindowToImageFilter and compare it to a reference image. I am somewhat troubled in that the output images are not exactly the same for debug and release despite the fact that values for the camera (ie position, focus, view up, view angle, etc) are all the same. The snippet of code getting called by my optimizer is something like:
:
vtkCamera* cam = this->renWin->GetRenderers()->GetFirstRenderer()->GetActiveCamera();
cam->SetPosition( pos );
cam->SetFocalPoint( focus );
cam->SetViewUp( viewup );
this->renWin->Render();
this->w2i->Modified(); //Update the vtkWindowToImageFilter
:
The debug and release are exactly the same for several hundred iterations before they begin to deviate.
I isolated the iteration where the the release and debug change and wrote the images to file using vtkBMPWriter.
bmpWriter->SetInput( w2i->GetOutput() );
bmpWriter->Write();
There were several pixels in the images that were different despite having exactly the same camera position. There was a maximum difference of 9 on a 256 scale. Is there a reason the rendering would change that much between debug and release? Are there compiler options I haven't considered? Or could my graphics card (ATI 5100) be the culprit? - As a note, I have seen differences in release versions before owing to round-off error which were fixed by setting the compiler optimization flag /Op for "Improved Floating Point Consistency". This did not fix the problem.
Any insights would be very, very helpful.
Tim Soper
Research Assistant
University of Washington
Department of Bioengineering
Box 352142
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
More information about the vtkusers
mailing list