[vtk-developers] vtkOpenGLGPUVolumeRayCastMapper fixes: the file.

AGPX agpxnet at yahoo.it
Thu Aug 12 17:43:00 EDT 2010


Yes, looks like that yours offset works fine too. However, in a dataset I use I 
have a range of about 1300. So you shift the plane of about 1.3 unit and this 
could be too much. Actually we only need to overcome floating point inaccuracy 
(theoretically the exact near plane is the plane you have to clip with), thus 
1.0e-3 could be sufficient for any application. After clipping, the convex 
polyhedra should not be clipped by frustum planes in the hardware pipeline, but 
instead this still occurs if you don't push the near plane a bit ahead.
The value 1.0e-3 could be too much if the range is < 1.0 (not likely, but 
possible). One can use the following then:

double eps=min(range/1000.0, 1.0e-3);

- AGPX




________________________________
Da: Francois Bertel <francois.bertel at kitware.com>
A: VTK Developers <vtk-developers at vtk.org>
Inviato: Gio 12 agosto 2010, 21:12:15
Oggetto: Re: [vtk-developers] vtkOpenGLGPUVolumeRayCastMapper fixes: the file.

Hi AGPX,

for the second bug about the near clipping plane and the offset, I had
actually some code I was working on. The difference with yours is the
offset is applied on a different coordinate system.

Can you try this on your dataset (my offsets instead of yours), and
tell me if it fixes the visual defect or not?

I'm still debating about which one is the correct one.


>   double range=camWorldRange[1]-camWorldRange[0];
>   double eps=range/1000.0;
>
3420,3422c3423,3425
<   camNearWorldPoint[0] = camWorldPos[0] +
camWorldRange[0]*camWorldDirection[0];
<   camNearWorldPoint[1] = camWorldPos[1] +
camWorldRange[0]*camWorldDirection[1];
<   camNearWorldPoint[2] = camWorldPos[2] +
camWorldRange[0]*camWorldDirection[2];
---
>   camNearWorldPoint[0] = camWorldPos[0] + 
>(camWorldRange[0]+eps)*camWorldDirection[0];
>   camNearWorldPoint[1] = camWorldPos[1] + 
>(camWorldRange[0]+eps)*camWorldDirection[1];
>   camNearWorldPoint[2] = camWorldPos[2] + 
>(camWorldRange[0]+eps)*camWorldDirection[2];

On Thu, Aug 12, 2010 at 12:56 PM, AGPX <agpxnet at yahoo.it> wrote:
> Hi,
>
> to speedup the patching process, I have attached to this email the file
> vtkOpenGLGPUVolumeRayCastMapper.cxx with my fixes (and with the slight
> modification done by Francois Bertel that check if the volume box have no
> points). You can search for all the modifications by finding the string
> "AGPX MODIFIED".
>
> - AGPX
>
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtk-developers
>
>
>



-- 
François Bertel, PhD  | Kitware Inc. Suite 204
1 (518) 371 3971 x113 | 28 Corporate Drive
                      | Clifton Park NY 12065, USA
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtk-developers


      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20100812/777b7294/attachment.html>


More information about the vtk-developers mailing list