# How to load texture with GLTFReader

**URL:** https://discourse.vtk.org/t/how-to-load-texture-with-gltfreader/12515
**Category:** Support
**Tags:** python
**Created:** [October 20, 2023, 8:50am UTC](https://discourse.vtk.org/t/how-to-load-texture-with-gltfreader/12515 "2023-10-20T08:50:18Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Theodliu](https://discourse.vtk.org/user_avatar/discourse.vtk.org/theodliu/32/7849_2.png) [@Theodliu](https://discourse.vtk.org/u/Theodliu)
#### Post date: [October 20, 2023, 8:50am UTC](https://discourse.vtk.org/t/how-to-load-texture-with-gltfreader/12515/1 "2023-10-20T08:50:18Z")

</div>

Hi I’m trying to load gltf model. But can I load animation and texture at the same time? I refer to [GLTFReader + texture](https://discourse.vtk.org/t/gltfreader-texture/4455) and [VTK: vtkGLTFReader Class Reference](https://vtk.org/doc/nightly/html/classvtkGLTFReader.html). vtkGLTFReader can load animations but it can’t load texture. vtkGLTFImporter can load texture but it can’t load animations, morphing or skinning.

Thanks.

---

<div class="post-metadata">

### Author: ![Jens\_Munk\_Hansen](https://discourse.vtk.org/user_avatar/discourse.vtk.org/jens_munk_hansen/32/1215_2.png) [@Jens\_Munk\_Hansen](https://discourse.vtk.org/u/Jens_Munk_Hansen)
#### Post date: [October 21, 2023, 7:25am UTC](https://discourse.vtk.org/t/how-to-load-texture-with-gltfreader/12515/2 "2023-10-21T07:25:21Z")

</div>

The `vtkGLTFReader` can read textures using `vtkGLTFReader::GLTFTexture vtkGLTFReader::GetGLTFTexture(int index)`, but this functionality is not exposed to Python. The `GLTFTexture` contains a `vtkImageData`. It would be a small change to the `C++`-code to add a method for accessing the texture as a `vtkImageData`, which is known by Python. Perhaps, a change request should be made.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.vtk.org/user_avatar/discourse.vtk.org/mwestphal/32/19_2.png) [@mwestphal](https://discourse.vtk.org/u/mwestphal)
#### Post date: [October 23, 2023, 9:26am UTC](https://discourse.vtk.org/t/how-to-load-texture-with-gltfreader/12515/3 "2023-10-23T09:26:31Z")

</div>

You may want to look into the F3D projet, it supports morphing and skinning on GPU with the vtkGLTFImporter:

> **[GitHub - f3d-app/f3d: Fast and minimalist 3D viewer.](https://github.com/f3d-app/f3d)**
>
> Fast and minimalist 3D viewer. Contribute to f3d-app/f3d development by creating an account on GitHub.

---

<div class="post-metadata">

### Author: ![Pancake\_Z](https://discourse.vtk.org/user_avatar/discourse.vtk.org/pancake_z/32/7310_2.png) [@Pancake\_Z](https://discourse.vtk.org/u/Pancake_Z)
#### Post date: [December 12, 2024, 3:09pm UTC](https://discourse.vtk.org/t/how-to-load-texture-with-gltfreader/12515/4 "2024-12-12T15:09:34Z")

</div>

Can you provide the code for running animations?

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.vtk.org/user_avatar/discourse.vtk.org/mwestphal/32/19_2.png) [@mwestphal](https://discourse.vtk.org/u/mwestphal)
#### Post date: [December 12, 2024, 3:14pm UTC](https://discourse.vtk.org/t/how-to-load-texture-with-gltfreader/12515/5 "2024-12-12T15:14:05Z")

</div>

Please open your own topic @Pancake_Z
