View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007111VTK(No Category)public2008-05-28 09:282016-08-12 09:54
ReporterJulian Ibarz 
Assigned ToDave DeMarle 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionmoved 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0007111: Performance problem when picking very large polydatas with vtkVisibleCellSelector
DescriptionI'm drawing a polydata that contains about 1 million of triangles. I want to select some triangles, I use vtkVisibleCellSelector. Actually VTK works as follow :

First rendering :
Compiling the display list for each actors. (for 1M triangles it takes about 8-10 seconds in my computer).
Call the display lists (it takes under 1 second).
Time to render : about 10 seconds.

Second rendering :
Call the display lists (it takes under 1 second).
Time to render : under 1 second.

etc.

Picking :
Rendering the actors modifying the coloring to make pick color.
It takes 0 seconds if the rectangle selection is very little and maximum about 2 seconds if the rectangle contains the entire object.

Rendering after a picking :
It recompiles the display lists because the polydatas have been changed when picking.

So in the point of view of the user when he makes a rubberband selection (even if the selection is very little) it tooks : 0-2 seconds to pick + 7 seconds to recompile the display list + 1 second to render so it takes more than 8 seconds to make a picking !

I made a patch that disable the recompilation of the display lists after a picking so instead of taking 8 seconds it takes only 2 seconds for a little selection and 4-5 seconds for a big selection.

So more the scene drawing is complex more the picking take times. With my fix, the time is in function of the size of the selection and is more than two times faster than the actual picking of VTK. And for a point picking (like selection one cell), this patch permits to vtkVisibleCellSelector to be more efficient than vtkCellPicker ! On 1M triangle a cell picking using vtkVisibleCellSelector take about 1-2 seconds and a vtkCellPicker take about 3 seconds on my computer.
Additional InformationThe patch works as follow :

A vtkInformation key is append to the class vtkPainter (vtkPainter::PREVIOUS_RENDERING_FOR_SELECTION). When a rendering selection is made this information is added to the painters and becomes true. And on the end of a rendering of a painter this information is removed.

So in vtkOpenGLDisplayListPainter, if the PREVIOUS_RENDERING_FOR_SELECTION exist and is true, the compilation of the display list is skipped.
TagsNo tags attached.
Project
Type
Attached Filespatch file icon picking.patch [^] (6,253 bytes) 2008-05-28 09:28 [Show Content]

 Relationships

  Notes
(0012818)
Julian Ibarz (reporter)
2008-07-25 05:25

I made another patch more cleaned and works with 5.2 branch of VTK. Not sure it works with the last cvs version.
(0036979)
Kitware Robot (administrator)
2016-08-12 09:54

Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current VTK Issues page linked in the banner at the top of this page.

 Issue History
Date Modified Username Field Change
2008-05-28 09:28 Julian Ibarz New Issue
2008-05-28 09:28 Julian Ibarz File Added: picking.patch
2008-07-25 05:25 Julian Ibarz Note Added: 0012818
2008-07-25 07:23 François Bertel Status backlog => tabled
2008-07-25 07:23 François Bertel Assigned To => Dave DeMarle
2011-06-16 13:11 Zack Galbreath Category => (No Category)
2016-08-12 09:54 Kitware Robot Note Added: 0036979
2016-08-12 09:54 Kitware Robot Status expired => closed
2016-08-12 09:54 Kitware Robot Resolution open => moved


Copyright © 2000 - 2018 MantisBT Team