[vtkusers] get visible surface

David E DeMarle dave.demarle at kitware.com
Thu Aug 23 10:41:53 EDT 2012


Try it now. I made a change to the wiki to turn off antialiasing.

David E DeMarle
Kitware, Inc.
R&D Engineer
21 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-881-4909


On Thu, Aug 23, 2012 at 10:16 AM, David Doria <daviddoria at gmail.com> wrote:
> On Thu, Aug 23, 2012 at 8:09 AM, Lodron, Gerald
> <Gerald.Lodron at joanneum.at> wrote:
>> Thats funny, i copied my stuff from that example....
>>
>> I only have the problem that it only works on large rendererwindows like in my case on 1240 x 960. On 640 x 480 it does not work (result is completely empty then). So if you add
>>
>> renderWindow->SetSize(1240,960);
>>
>> before
>>
>> renderWindowInteractor->Start();
>>
>> the "broken" example should work (and of course disabling antialiasing and having a monitor with such a resolution). Another thing I did is that I use the
>>
>> extractSelection->PreserveTopologyOn();
>>
>> switch, but I think it also work without that line. The rest of my code is completely identical to your link...
>>
>> And I tested plugging out the monitor cable before starting my application (in this case without the key press stuff), then it crashes. I am thinking to produce a DUMMY monitor cable to solve the issue in my final system... (if the offline rendering switch will not work, not tested yet)
>
> Hm, this is what I see:
>
> Initial rendering:
> http://daviddoria.com/Uploads/vtk/1.jpg
>
> After selection:
> http://daviddoria.com/Uploads/vtk/2.jpg
>
> Rotating the selection:
> http://daviddoria.com/Uploads/vtk/3.jpg
>
> I thought what was happening is that the very corner of these "weird"
> triangles is seen from the original perspective, so it included in the
> selection, but to attempt to remedy this I made the triangles much
> smaller using:
>
>   sphereSource->SetThetaResolution(20);
>   sphereSource->SetPhiResolution(20);
>
> This time from the original viewpoint again all is well:
>
> http://daviddoria.com/Uploads/vtk/bad_1.jpg
>
> but after rotation, the pattern is clearly not just "the edge of the
> sphere from the original perspective" triangles:
>
> http://daviddoria.com/Uploads/vtk/bad_2.jpg
>
> Many of these triangles are on the opposite side of the sphere from
> the selection perspective. It really seems like a bug or something to
> me.
>
> David



More information about the vtkusers mailing list