[vtkusers] Clipping planes

John Biddiscombe jbiddiscombe at skippingmouse.co.uk
Mon Nov 18 12:19:37 EST 2002


Jim,

Yes I understand both your problems. The near plane could be altered with a
float factor option as you suggest. One caveat that springs to mind is that
I seem to recall OpenGl doing sommething funny if the near plane has high
resolution
near     far
0.1       5
0.000001  5
you ought to get very similar (roughly 5/65536 or 5/(2^32) if you have 32
bits) resolution (because far-near is almost the same), but something odd
happens with the second case (I may be mistaken, I think Lisa knows the
correct answer).

RE. Zooming. Yes, inside the interactor code there's a zoom factor which is
proportional to your distance to the focus or something (because the focus
is fixed when using trackball or joystick camera mode). It's a while since
I've looked at this, but it is annoying sometimes. There's no flag to
control it, but if you think of the way you want it changed/fixed under some
flag control, there's no reason why it can't be accomodated I'm sure.

JB


----- Original Message -----
From: "James C. Robinson" <j.robinson at kepler.ie>
To: "John Biddiscombe" <jbiddiscombe at skippingmouse.co.uk>
Cc: "Vtkusers at Public. Kitware. Com" <vtkusers at public.kitware.com>
Sent: Monday, November 18, 2002 3:41 PM
Subject: RE: [vtkusers] Clipping planes


> John,
>
> I still haven't resolved the clipping plane problem. If I turn off the
auto
> adjust clipping plane and try to do it myself it is clunky during
rotation,
> zooming etc. The problem is that the near clipping plane is being set to
be
> a minimum of 10% of the far clipping value. This seems like a strange
> approach in that it must result in the problem that I am having for a lot
of
> situations. It strikes me that the easiest way to resolve this would be
that
> the object would have a protected float minClippingNearPlaneFactor that
> would be 10% by default, but that could be adjusted via a public method.
> This value would then be used in ResetClippingRange. It would allow people
> in my situation to override the default but result in no flickering etc.
>
> Related to this is the fact that the zoom speed (and pan speed) seem to be
> affected by a similar factor. As I zoom in closer, the dolly speed slows
> down dramatically (as does the pan speed). If I remove all props, save one
> that is the size of the volume to which I want to zoom and then
ResetCamera,
> then the zoom (and pan) speed are increased and the view manipulation is
> improved. Is there any flag, value that controls this?
>
> Regards,
>
> Jim
>
> ______________________
>
> James C. Robinson, PhD,
> Chartered Engineer,
> Kepler Engineering Software Ltd.,
> 42 Rivergrove,
> Glanmire, Co. Cork,
> Eire
>
> Tel:         +353-21-4822028
> Tel:         +353-87-2393010
> Fax:        +353-21-4822721
> E-mail:     j.robinson at kepler.ie
> ______________________
>
>  -----Original Message-----
> From: John Biddiscombe [mailto:jbiddiscombe at skippingmouse.co.uk]
> Sent: 04 November 2002 14:34
> To: j.robinson at kepler.ie; Vtkusers at Public. Kitware. Com
> Subject: Re: [vtkusers] Clipping planes
>
> Have a look at (eg) InteractorStyleTrackballCamera and you'll see
>
>   if (this->AutoAdjustCameraClippingRange)
>     {
>     this->CurrentRenderer->ResetCameraClippingRange();
>     }
>
> after each movement you make. This continually resets the clippping planes
> to be "a good fit". In your case the bounds of the dataset probably
overlap
> the front view plane or something and so a default min distance is used.
> Turn off the auto adjust in the interactorstyle and manage your own
clipping
> ranges and see if it gets better.
>
> JB
>
>
> ----- Original Message -----
> From: "James C. Robinson" <j.robinson at kepler.ie>
> To: "Vtkusers at Public. Kitware. Com" <vtkusers at public.kitware.com>
> Sent: Monday, November 04, 2002 1:28 PM
> Subject: [vtkusers] Clipping planes
>
>
> > Dear All,
> >
> > I have written an application to view finite element results. The mesh
can
> > be of the order of 2000m in width/depth but may be only 10-30m thick. It

> > also may have an important feature with a dimension of the order of less
> > than 1m to view. My problem is that when I zoom in (using a vtkCamera)
the
> > near clipping plane is too far from the camera and part of the mesh is
cut
> > (clipped) away. I have tried resetting both the near & far values (using
> > SetClippingRange & SetThickness) but to no avail.
> >
> > I have noticed that, if I set the majority of the mesh to be invisible,
> but
> > leave an object of the small dimension required, the zooming works fine.
I
> > can then set the overall mesh to be visible and the image looks fine.
> > However, as soon as I move the camera position, a lot of the mesh is
again
> > clipped away. What is happening is that the clipping range is set to
> values
> > (automatically) that are suitable to zoom in on the small object when it
> is
> > on its own, but are reset to unsuitable values a soon as the whole
> (larger)
> > object (mesh) is visible.
> >
> > Has anybody any suggestion?
> >
> > Regards,
> >
> > Jim
> > ______________________
> >
> > James C. Robinson, PhD,
> > Chartered Engineer,
> > Kepler Engineering Software Ltd.,
> > 42 Rivergrove,
> > Glanmire, Co. Cork,
> > Eire
> >
> > Tel:         +353-21-4822028
> > Tel:         +353-87-2393010
> > Fax:        +353-21-4822721
> > E-mail:     j.robinson at kepler.ie
> > ______________________
> >
> >
> > _______________________________________________
> > This is the private VTK discussion list.
> > Please keep messages on-topic. Check the FAQ at:
> <http://public.kitware.com/cgi-bin/vtkfaq>
> > Follow this link to subscribe/unsubscribe:
> > http://public.kitware.com/mailman/listinfo/vtkusers
>
>
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
<http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers




More information about the vtkusers mailing list