tomviz icon indicating copy to clipboard operation
tomviz copied to clipboard

Volume rendering fails if an array dimension is larger than 2048

Open yijiang1 opened this issue 5 years ago • 2 comments

Describe the bug I get an error message when visualizing a dataset with size of 2500x2500x100. After some trials, it seems that the error occurs if an array dimension is >2048.

To Reproduce Steps to reproduce the behavior:

  1. Create a constant sample dataset with size of 2049 x 100 x 100.
  2. Click on 'volume' rendering button.
  3. An error shows up:

ERROR: In /Users/kitware/dashboards/buildbot-slave/tomviz-bigmac-osx-shared-release_clang_osx10_9_superbuild/build/paraview/src/paraview/VTK/Rendering/VolumeOpenGL2/vtkVolumeTexture.cxx, line 747 vtkVolumeTexture (0x7feb7a828ee0): Invalid texture dimensions [2049, 100, 100]

Expected behavior Volume rendering should work for such datasets.

Desktop (please complete the following information):

  • Operating system: [macOS 10.13.6]
  • Tomviz version: [1.5.1]
  • ParaView version: [1.3.0]

Hardware (please complete the following information):

  • Device: [e.g. Macbook Pro]
  • Graphics card: [Intel Iris Plus Graphics 655 1536 MB]

yijiang1 avatar Mar 12 '19 17:03 yijiang1

That error is here in VTK. The AreDimensionsValid() function checks to make sure that none of the dimensions exceed the max size of the texture, GL_MAX_3D_TEXTURE_SIZE, which I believe is defined by the GPU. So I think it is limited by the GPU itself (my GPU has a limit of 2048 as well).

psavery avatar Mar 12 '19 22:03 psavery

We should try to get the value of GL_MAX_3D_TEXTURE_SIZE so that we can warn of volumes that are too large to volume render (and give the size rather than force trial and error).

cryos avatar Apr 05 '19 14:04 cryos