I'm running into this problem and thought it may have been something with my setup but your patches fixed my issues!<br>Did these ever get accepted into vtk? I'm still using 5.2 at the moment.<br>Gerrick<br><br><div class="gmail_quote">
On Fri, Oct 17, 2008 at 11:43 AM, Serge Lalonde <span dir="ltr"><<a href="mailto:serge@infolytica.com" target="_blank">serge@infolytica.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div bgcolor="#ffffff" text="#000000">
Hi Ben,<br>
<br>
No, I haven't seen these artifacts yet. However, I am still in the
prototyping stage and my models are pretty simple (a cube made up of 5
tetrahedra and a vtkConeSource). I'll let you know if I run into this
when I move on to some real models.<br>
<br>
Thanks.<br>
<br>
Ben Held wrote:
<blockquote type="cite">
<pre>Serge,
We have been having trouble with this as well and implemented something
similar to what you did and found that if the near clipping plane value gets
too small one starts to see strange visual artifacts (shading, lighting,
etc). Have you noticed any such problems?
Ben
-----Original Message-----
From: <a href="mailto:vtkusers-bounces@vtk.org" target="_blank">vtkusers-bounces@vtk.org</a> [<a href="mailto:vtkusers-bounces@vtk.org" target="_blank">mailto:vtkusers-bounces@vtk.org</a>] On Behalf
Of Serge Lalonde
Sent: Friday, October 17, 2008 10:10 AM
To: VTK Users
Subject: [vtkusers] Near plane clipping problem
Has anyone ever noticed that it is very easy to cause the near clipping
plane to cut-off the model when in parallel projection mode?
I ran into this recently when adding a vtkBoxWidget and scaling a simple
cube a few times after rotating it so that one of the corners points towards
the viewer.
I tried calling vtkRenderer::ResetCameraClippingRange() to no avail.
vtkRenderer::ResetCamera() fixed the problem, but would lose my camera
setting.
After searching fruitlessly in the vtkusers archives, I decided to trace
into the code and I discovered that there is code in
vtkRenderer::ResetCameraClippingRange() and
vtkCamera::SetClippingRange() that modifies the near plane value to "fix"
potential camera and depth buffer problems. In my opinion, these fixes are
valid, but only for perspective projections. For parallel projections, they
are unnecessary and in fact cause the clipping problem I was encountering.
To test this, I modified the code and rebuilt and lo and behold, no more
near plane clipping!
I decided to document this in the vtkusers list in case others have run into
this problem. Attached is my modified version of vtkCamera.cxx and
vtkRenderer.cxx along with the patch files relative to version 5.2.0 (only
vtkCamera.cxx has changed since then). The changes are small and localized.
If anyone tries them, let me know if you run into any problems (or even if
you don't). I will submit them to Kitware for consideration also.
Thanks.
</pre>
</blockquote>
<br><font color="#888888">
<div>-- <br>
<a href="http:://www.infolytica.com" target="_blank">www.infolytica.com </a><br>
300 Leo Pariseau, Suite 2222, Montreal, QC, Canada, H2X 4B3<br>
(514) 849-8752 x236, Fax: (514) 849-4239
</div>
</font></div>
<br>_______________________________________________<br>
This is the private VTK discussion list.<br>
Please keep messages on-topic. Check the FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br>