[vtkusers] vtkHardwareSelection produces bad a bad result

s61500 at htw-dresden.de s61500 at htw-dresden.de
Mon Oct 18 10:58:32 EDT 2010


Ok, the only way to get all triangles is to set the size of the render
window high enough. Is there a possibility to set the size of the renderer
without the using of the render window? Because when I set the size of
[10000,10000] the window get only the size of the monitor and the
functionality doesn't need a window, because the functionality will be
realized in a console application.

> This is an inherent limitation in the algorithm.
>
> The hardware selector, and it predecessor vtkVisibleCellSelector, render
> an
> image and determine what cell was drawn behind each pixel. I said cell not
> cells because there is no way to recover more than one cell from the color
> of any given pixel. The only workaround I know of is to increase the
> screen
> size as you are already doing.
>
> There might be some sort of topological walk algorithm that would produce
> an
> exact result but I am not aware of one and suspect that it will be orders
> of
> magnitude slower than the rendering based algorithm we have now. A frustum
> selection will produce an exact result and do it fairly quickly, but it
> does
> not and can not determine which cells are visible and which are not.
>
> David E DeMarle
> Kitware, Inc.
> R&D Engineer
> 28 Corporate Drive
> Clifton Park, NY 12065-8662
> Phone: 518-371-3971 x109
>
>
> On Mon, Oct 18, 2010 at 9:10 AM, <s61500 at htw-dresden.de> wrote:
>
>> I think pictures will be the best illustration of the problem.
>>
>> http://www2.htw-dresden.de/~s61500/example_sphere.png<http://www2.htw-dresden.de/%7Es61500/example_sphere.png>
>>
>> 1. window --> viewport
>> 2. window --> result with RenderWindow size of [300, 300]
>> 3. window --> result with RenderWindow size of [1000, 1000]
>> 4. window --> result with RenderWindow size of [1000, 1000]
>>
>> http://www2.htw-dresden.de/~s61500/example_testobject.png<http://www2.htw-dresden.de/%7Es61500/example_testobject.png>
>>
>> 1. window --> viewport
>> 1. row --> result with RenderWindow size of [300, 300]
>> 2. row --> result with RenderWindow size of [1000, 1000]
>>
>> http://www2.htw-dresden.de/~s61500/example_testobject2.png<http://www2.htw-dresden.de/%7Es61500/example_testobject2.png>
>>
>> - detailed view of the problem
>>
>> I hope that the screenshots clarify the problem in the best way.
>>
>> Stefan
>>
>> > Can you clarify what you mean by the result isn't right?
>> >
>> > David E DeMarle
>> > Kitware, Inc.
>> > R&D Engineer
>> > 28 Corporate Drive
>> > Clifton Park, NY 12065-8662
>> > Phone: 518-371-3971 x109
>> >
>> >
>> > On Sun, Oct 17, 2010 at 1:12 PM, <s61500 at htw-dresden.de> wrote:
>> >
>> >> Hi,
>> >>
>> >> upon finding the error in the example code I noted that the result
>> isn't right.
>> >>
>> >> The example code can you find here:
>> >>
>> >>
>> http://www.vtk.org/Wiki/VTK/Examples/Cxx/Broken/Filtering/ExtractVisibleCells
>> >>
>> >> I find out that you get a better result when you set the size of the
>> vtkRenderWindow higher.
>> >> But with a size of [1000,1000] I don't get a perfect result by my
>> test
>> sphere object with 27.000 triangles. To set the window size high enough
>> couldn't be the right way, because the program will work with nets of 1
>> million triangles.
>> >>
>> >> So my question, is there another way to get a better result without
>> set
>> the window size higher?
>> >>
>> >> Stefan
>> >>
>> >> _______________________________________________
>> >> 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
>> >>
>> >
>>
>>
>>
>>
>





More information about the vtkusers mailing list