[vtkusers] Textured IcicleView & Hardware Selector

Eric E. Monson emonson at cs.duke.edu
Tue Mar 30 09:32:40 EDT 2010


Hey Jeff,

This Python script (and four images) is the simplest case I could come up with using "off the shelf" VTK. 

I posted a bug on the tracker, and put the following text in the "Steps to Reproduce":

http://www.cmake.org/Bug/view.php?id=10487

You need to set the path for the images and VTK source in the script, and then uncomment which image you want to use for the test. Then, you click on the rectangles of the icicle view (not really using vtkIcicleView here, just a pipeline and a vtkRenderView) and look at the terminal for a printout of the cell IDs that the hardware selector reports.

The comments at the beginning of the script summarize what you should see:

# IDs in tree should be (and are reported with Good image as):
# 
# 0 0 0 0 0 0 0 0 0
# 1 2 3 4 4 4 8 9 10
# 5 6 7

# Unreliable reports them as:
#
# 0 0 0 0 0 0 0 0 0
# 0 1 2 3 3 3 6 6 7
# 3 4 5

# Bad can't see any nodes to select at all

Thanks,
-Eric

-------------- next part --------------
A non-text attachment was scrubbed...
Name: HardwareSelectorTest.zip
Type: application/zip
Size: 28756 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100330/b5f05bd2/attachment.zip>
-------------- next part --------------


On Mar 29, 2010, at 3:03 PM, Jeff Baumes wrote:

> This sounds like a bug in the hardware selector. Can you create a bug
> report with a simple test case attached to reproduce?
> 
> Thanks,
> Jeff
> 
> On Mon, Mar 29, 2010 at 9:44 AM, Eric E. Monson <emonson at cs.duke.edu> wrote:
>> Hello,
>> 
>> Last week I worked up a modified version of the Icicle View which displays a texture image over the polygons. I thought I was doing something wrong because selections would sometimes highlight the correct tree elements, and sometimes not, in a seemingly random way, and depending on the texture image I used.
>> 
>> After a week of bashing my head against it, I finally figured out that since the vtkRenderView classes use the hardware selector I was getting unreliable results when the image I was using as a texture was too dark. As long as I have at least a small band of white all around the perimeter of my image the selector returns the correct cell IDs, and if not, then I get unpredictable results.
>> 
>> Is this the expected behavior? The doxygen for vtkHardwareSelector mentions invalid results when using anti-aliasing, but should it also mention potential problems with textured PolyData? Or, is there something I could do to get reliable results with textured polydata? I'm too ignorant of the OpenGL inner workings to understand why this is happening or how to get around it.
>> 
>> Thanks for the help,
>> -Eric
>> 
>> ------------------------------------------------------
>> Eric E Monson
>> Duke Visualization Technology Group
>> 
>> 
>> _______________________________________________
>> 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