# How to get the max 3D Texture size from a vtkSmartVolumeMapper

**URL:** https://discourse.vtk.org/t/how-to-get-the-max-3d-texture-size-from-a-vtksmartvolumemapper/16289
**Category:** Development
**Created:** [February 12, 2026, 5:45pm UTC](https://discourse.vtk.org/t/how-to-get-the-max-3d-texture-size-from-a-vtksmartvolumemapper/16289 "2026-02-12T17:45:16Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Michael\_Jackson](https://discourse.vtk.org/user_avatar/discourse.vtk.org/michael_jackson/32/61_2.png) [@Michael\_Jackson](https://discourse.vtk.org/u/Michael_Jackson)
#### Post date: [February 12, 2026, 5:45pm UTC](https://discourse.vtk.org/t/how-to-get-the-max-3d-texture-size-from-a-vtksmartvolumemapper/16289/1 "2026-02-12T17:45:16Z")

</div>

Hello,

When trying to volume render a data set that is 2300 x 2300 x 750 I am getting the following error:

```auto
ERROR: OpenGL MAX_3D_TEXTURE_SIZE is 2048
2026-02-12 12:39:14.555 ( 93.864s) [4F6000E] vtkVolumeTexture.cxx:954 ERR| vtkVolumeTexture (0x1323c73b0): Invalid texture dimensions [2350, 2350, 11]
UNSUPPORTED (log once): POSSIBLE ISSUE: unit 1 GLD_TEXTURE_INDEX_3D is unloadable and bound to sampler type (Float) - using zero texture because texture unloadable

```

I completely understand the error. My question is what code path should I use in VTK to figure out ahead of time that the dataset will be too large for a clients hardware? Currently in our class we have access to the folowing:

```auto
  vtkNew<vtkVolume> m_VolumeActor;
  vtkNew<vtkSmartVolumeMapper> m_VolumeMapper;
  vtkNew<vtkVolumeProperty> m_VolumeProperty;
vtkWeakPointer<vtkRenderWindowInteractor> m_ObservedInteractor;

```

I know I need to use vtkTextureObject? I also dug around in the Vtk source code to see the code that surrounds the error message and inside of vtkVolumeTexture there is a protected function:

```auto
bool vtkVolumeTexture::AreDimensionsValid(
  vtkTextureObject* texture, int width, int height, int depth)
{
  int const maxSize = texture->GetMaximumTextureSize3D();
  if (width > maxSize || height > maxSize || depth > maxSize)
  {
    std::cout << "ERROR: OpenGL MAX_3D_TEXTURE_SIZE is " << maxSize << "\n";
    return false;
  }

  return true;
}

```

Which seems promising but I’m not sure how to get to it.

Any help would be appreciated.

–

Mike Jackson
