vtkRendering issue

Hi,

I have a cylindrical shell inside which a quadrilateral is located as shown in the figure. When I keep my camera on the quad and view direction as shown and render in perspective projection, I am getting a false view to the background (space). Does it have to do with near plane clipping range?
When I probed further, the near plane is set at a distance at 4 and far plane at 4000 . I used the ResetClippingRange function. It seems the far plane clipping range is set based on bounds of the geometry and the near plane is set at 0.001 times the far plane distance. The trouble is the quadrilateral is very close to the cylinder (~1). How should I do the rendering so as not to get a false view to space? The geometry is stored as vtkPolyData and rendering is done through a single actor.
This work is to estimate view factor between objects


using the Hemicube method with rendering done by VTK.

Regards,

Philip

You can try playing with the clipping range directly via

renderer->GetActiveCamera()->SetClippingRange(0.5,4000);

If you use an interactor it will reset it once you interact with the window (rotate/zoom etc) but for initial testing of the issue I would try explicitly setting it as above and see if the rendering issue goes away.

Thanks for the reply Ken. It does work if I reset the near clipping range to a smaller value. I have set the near plane tolerance to 0.0005 instead of 0.001. But like I said this work is for view factor computation between objects. The question remains if this will work for any arbitrary orientation of objects.

Does camera focal point play any role other than setting the view direction? Does it have to be within the clipping range?

Regards,

Philip.

The focal point is mainly used to set view direction. Interactor styles often use it to be the center of rotation as well. I’m pretty sure it does not have to be within the clipping range.