# glTF texture export error

**URL:** https://discourse.vtk.org/t/gltf-texture-export-error/5300
**Category:** Development
**Tags:** file-formats
**Created:** [March 2, 2021, 7:51pm UTC](https://discourse.vtk.org/t/gltf-texture-export-error/5300 "2021-03-02T19:51:20Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![mostapha](https://discourse.vtk.org/user_avatar/discourse.vtk.org/mostapha/32/3092_2.png) [@mostapha](https://discourse.vtk.org/u/mostapha)
#### Post date: [March 2, 2021, 10:52pm UTC](https://discourse.vtk.org/t/gltf-texture-export-error/5300/3 "2021-03-02T22:52:48Z")

</div>

> [@mostapha](#):
>
> I suspect that I need to map the `CellData` to `PointData` before exporting to glTF but I’m not sure how to try that.

That was correct! After adding “CellData to PointData” filter in ParaView I could export the scene correctly.

 ![image](https://discourse.vtk.org/uploads/default/original/2X/7/7783978465295278b0fa5bb5ae8be41c4262c686.jpeg)

~~I will update this post and add the code once I figure out how to do it using [vtkCellDataToPointData](https://vtk.org/doc/nightly/html/classvtkCellDataToPointData.html) class.~~ 😃

```python
import vtk

cell_to_point = vtk.vtkCellDataToPointData()
cell_to_point.SetInputData(polydata)
data = cell_to_point.GetOutputPort()

# you can use this data now to set up the mapper
mapper = vtk.vtkPolyDataMapper()
mapper.SetInputConnection(data )
mapper.SetColorModeToMapScalars()
mapper.SetScalarModeToUsePointData()
mapper.SetScalarVisibility(True)
# ... more code to set-up the mapper as you need
# ...
# update mapper - I'm not sure if this is required but I'll do it to be safe!
mapper.Update()

```

---

_[View the full topic](https://discourse.vtk.org/t/gltf-texture-export-error/5300)._
