[vtkusers] vtkRenderWindow DoFdRender causes camera vibration

David E DeMarle dave.demarle at kitware.com
Tue Jul 10 10:07:59 EDT 2012


I'ld change vtkRenderWindow itself. Add an ivar that when changed from the
default enables your new behavior. If you submit a patch via gerrit we can
get it into future versions of VTK.

David E DeMarle
Kitware, Inc.
R&D Engineer
21 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-881-4909


On Tue, Jul 10, 2012 at 8:58 AM, Zsolt V <vtkzsolt at gmail.com> wrote:

> Hi,
>
> rendering focal depth frames is a great feature of VTK. However, the
> random offsets in vtkRenderWindow::DoFDRender() add a very annoying
> vibration to it. Let's say we would like to create a simple video of moving
> the focal point smoothly from a frontal object to an object in the
> background. At the beginning the frontal object is sharp, the background is
> blurred, while at the end it is swapped. It should be easily done in VTK by
> focal depth rendering and changing only the distance of the focal point.
> But due to the fact that for each rendered frames new random offsets are
> calculated for radius and angle ( in vtkRenderWindow::DoFDRender() ), the
> result is a camera vibrating.
>
> More simply: when focal depth rendering is turned on, each rendering
> yields a different image, even if camera and scene do not change at all.
>
> I would change vtkRenderWindow to calculate these random numbers only when
> the SetFDFrames method is invoked, and store them for each FDFrames
> separately. In DoFDRender these pre-generated random numbers can be used,
> hence they won't vary each time the method Render() is called.
>
> My problem is that I don't know how to create a subclass of
> vtkRenderWindow without loosing all the methods re-implemented in its
> subclasses (vtkOpenGLRenderWindow, and so on). I want my code to be
> portable, so it is not sufficient to create a subclass of
> vtkXOpenGLRenderWindow, for example. But if a class inherits
> vtkRenderWindow, all specific classes will not be its subclass any longer.
>
> Is there a solution for it without subclassing all RenderWindow classes?
>
> Thanks,
> Zsolt
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120710/538883d6/attachment.htm>


More information about the vtkusers mailing list