tomviz
tomviz copied to clipboard
Volume rendering fails if an array dimension is larger than 2048
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:
- Create a constant sample dataset with size of 2049 x 100 x 100.
- Click on 'volume' rendering button.
- 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]
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).
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).