1

I am developing a QT C++ application that uses VTK for visualizing objects. I've realized that when the objects is very complex (involves a huge number of nodes) when the user interacts with the windows through the mouse pointer (for instance, in order to rotate the object) the application responds slowly, the object does not move and it takes a while before rendering it in the final position.

Of course, it can be improved with better hardware (concretely a more decent GPU), nevertheless, if I load the same object in Paraview the interaction with it is more fluent. I realized that during transitions (for instance, when I hold the mouse pointer in roder to rotate the object), the object is rendered with fewer nodes, in other words, it shows a simplified representation of the object during the interaction. Finally, when the pointer is released, the object is fully rendered.

I would like to know what methods VTK offers to implement this kind of behavior and be, finally, able to give fluency to my application.

Bub Espinja
  • 4,029
  • 2
  • 29
  • 46
  • https://blog.kitware.com/multi-resolution-streaming-in-vtk-and-paraview/ I think this is a start for what you are looking for - what type and number of data are you trying to render. The other thing is your build in release? – g.stevo Jun 06 '19 at 01:37
  • @g.stevo Thanks! I'll check the link. And yes, I build in release mode. – Bub Espinja Jun 06 '19 at 07:07
  • You could go for a ParaView based application instead, all this would be free. – Mathieu Westphal Jun 06 '19 at 07:54

1 Answers1

4

Streaming data (as suggested in comments) is generally for cases where dataset is too large to load in memory.

For interaction, which is what your question seems to concern, have a look at vtkLODActor (Level-Of-Detail actor) https://vtk.org/doc/nightly/html/classvtkLODActor.html#details which is the prop to use to improve interaction.

Other performance-related things to watch out for:

  • Depth peeling (fairly expensive, necessary only if you need to render overlapping translucent geometry accurately)
  • Antialiasing

Although these are off by default. Not sure what data exactly are you working with, but in my experience with polygonal geometries (vtkPolyData), decimating the models to a reasonable number of polygons ( <30k cells is enough for many applications) is a usual post-processing step. See e.g. vtkDecimatePro filter.

Also make sure you have recent graphics driver for your hardware installed.

mirni
  • 695
  • 3
  • 6