# spotty colors after saving .vtu to .vtp

**URL:** https://discourse.paraview.org/t/spotty-colors-after-saving-vtu-to-vtp/16211
**Category:** ParaView Support
**Created:** [February 21, 2025, 11:22am UTC](https://discourse.paraview.org/t/spotty-colors-after-saving-vtu-to-vtp/16211 "2025-02-21T11:22:12Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Bernward\_Platz](https://discourse.paraview.org/user_avatar/discourse.paraview.org/bernward_platz/32/16037_2.png) [@Bernward\_Platz](https://discourse.paraview.org/u/Bernward_Platz)
#### Post date: [February 21, 2025, 11:22am UTC](https://discourse.paraview.org/t/spotty-colors-after-saving-vtu-to-vtp/16211/1 "2025-02-21T11:22:12Z")

</div>

[rodsolid.vtu](https://discourse.paraview.org/uploads/short-url/cTAA9TQDWdn7SvMzjo6gOuixIBJ.vtu) (2.3 MB)

 ![Bildschirmfoto 2025-02-21 um 12.15.52](https://discourse.paraview.org/uploads/default/original/3X/0/c/0ceae772a1965da35a2c665b61f0526b136bb1b5.png)  
 ![Bildschirmfoto 2025-02-21 um 12.16.25](https://discourse.paraview.org/uploads/default/original/3X/0/8/08b2efa3cf6f6db652a2c21de802977ceb10e153.jpeg)

Hi,

I saved a .vtu file as .vtp in ParaView. After loading the .vtp file, the color gradient appears patchy when displaying the displacements. Probably a total beginner question. Sorry.

Thanks for help

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [February 21, 2025, 11:46am UTC](https://discourse.paraview.org/t/spotty-colors-after-saving-vtu-to-vtp/16211/2 "2025-02-21T11:46:33Z")

</div>

Hi @Bernward_Platz

> [@Bernward\_Platz](#):
>
> I saved a .vtu file as .vtp in ParaView.

You cannot save an unstructured grid as a .vtp without first converting it to a polydata (eg using ExtractSurface).

Please clarify your steps 🙂

Best,

---

<div class="post-metadata">

### Author: ![Bernward\_Platz](https://discourse.paraview.org/user_avatar/discourse.paraview.org/bernward_platz/32/16037_2.png) [@Bernward\_Platz](https://discourse.paraview.org/u/Bernward_Platz)
#### Post date: [February 21, 2025, 1:21pm UTC](https://discourse.paraview.org/t/spotty-colors-after-saving-vtu-to-vtp/16211/3 "2025-02-21T13:21:57Z")

</div>

I attached the py-Script that converts the file.

[vtu2vtp\_3.py](https://discourse.paraview.org/uploads/short-url/qAlbBJg10LlVIvntw0BGiXTektr.py) (1.7 KB)

---

<div class="post-metadata">

### Author: ![Bernward\_Platz](https://discourse.paraview.org/user_avatar/discourse.paraview.org/bernward_platz/32/16037_2.png) [@Bernward\_Platz](https://discourse.paraview.org/u/Bernward_Platz)
#### Post date: [February 21, 2025, 1:26pm UTC](https://discourse.paraview.org/t/spotty-colors-after-saving-vtu-to-vtp/16211/4 "2025-02-21T13:26:01Z")

</div>

The goal is to display the .vtu in WEB. Perhaps there are better possibilties than converting it to .vtp

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [February 21, 2025, 1:42pm UTC](https://discourse.paraview.org/t/spotty-colors-after-saving-vtu-to-vtp/16211/5 "2025-02-21T13:42:43Z")

</div>

Indeed, you are extracting the surface using vtkPython, that should work.

> The goal is to display the .vtu in WEB

The simplest way to do that is to use File → ExportScene → .vtkjs and then to use glance HTML to visualize.

---

<div class="post-metadata">

### Author: ![jourdain](https://discourse.paraview.org/user_avatar/discourse.paraview.org/jourdain/32/11_2.png) [@jourdain](https://discourse.paraview.org/u/jourdain)
#### Post date: [February 21, 2025, 3:58pm UTC](https://discourse.paraview.org/t/spotty-colors-after-saving-vtu-to-vtp/16211/6 "2025-02-21T15:58:12Z")

</div>

The step 3 in your script is not needed, the geometry filter should keep those arrays.

---

<div class="post-metadata">

### Author: ![Bernward\_Platz](https://discourse.paraview.org/user_avatar/discourse.paraview.org/bernward_platz/32/16037_2.png) [@Bernward\_Platz](https://discourse.paraview.org/u/Bernward_Platz)
#### Post date: [February 21, 2025, 4:33pm UTC](https://discourse.paraview.org/t/spotty-colors-after-saving-vtu-to-vtp/16211/7 "2025-02-21T16:33:13Z")

</div>

Because I have still problems with the colors in my .vtp I switched to Paraview Glance and loading the .vtu directly. Then I have no problems. Thanks a lot for all answers.
