I am trying to render 58M cylinders, but it seems to have an access error during the vtkrenderwindow->render procedure. It produces the window and begins to render and at some point has a memory access error. After this time it throws the exception on the first access of memory after that command and the render window never shows up. I have begun seeing the error larger than 22M elements (I tried smaller versions of the same dataset).
I have also cut the dataset in half and rendered each half successfully, so I know it is not the input dataset.
I have traced the problem entirely to this function, none of the rest of the code throws an error. Also, it does not matter if I put all the cylinders in a single actor or multiple actors.
I’m not sure how using a different data filter will help the rendering bug with memory access, would that be a difference in internal rendering that somehow is better at handling internal object memory?
I am using the last release (8.2) which doesn’t have vtkGroupDataSetsFilter. Is there any alternative fix that doesn’t involve the arduous process of re-building VTK and my project using my current release?
If it helps, here is the error: Exception thrown at 0x00007FFC836463B7 (vtkRenderingOpenGL2-8.2.dll) in grantCylinderViewer.exe: 0xC0000005: Access violation writing location 0x0000020A5EAF1000.
More information:
I am storing each cylinder in a vtkCellArray (for the endpoints and the connections). I thin convert to a vtkPolyData by setting the points and connections and the point data of radii and color. Because of internal errors I could not previously debug, each cylinder has unique endpoints, so the points are duplicated as many times as need be. This was then piped into a vtkTubeFilter, then piped to a vtkPolyDataMapper and finally to a vtkActor before sending to the renderer and renderwindow.
Okay so after a lot of playing around I found a workaround. I use cell data for coloration instead of point data and reduce the number of sides of the tubefilter from 8 to 4 (resolution is not a big deal for this many vessels). now I am seeing how it scales, but so far it has gone up to 28M vessels without a problem