# vtkUnstructuredGrid Cell Blanking/Hiding

**URL:** https://discourse.paraview.org/t/vtkunstructuredgrid-cell-blanking-hiding/4933
**Category:** ParaView Support
**Created:** [July 23, 2020, 12:38pm UTC](https://discourse.paraview.org/t/vtkunstructuredgrid-cell-blanking-hiding/4933 "2020-07-23T12:38:36Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![ajp](https://discourse.paraview.org/user_avatar/discourse.paraview.org/ajp/32/3516_2.png) [@ajp](https://discourse.paraview.org/u/ajp)
#### Post date: [July 23, 2020, 12:38pm UTC](https://discourse.paraview.org/t/vtkunstructuredgrid-cell-blanking-hiding/4933/1 "2020-07-23T12:38:36Z")

</div>

Is it possible to omit cells from visualisation within an ugrid, by using:

```auto
ghostCells->SetValue(cellId, ghostCells->GetValue(cellId) | vtkDataSetAttributes::HIDDENCELL);

```

When I output a simple pure triangular mesh, where two cells have been refined, producing 4 child cells, the original two parent triangles are not omitted from the cell count in the Inspector view at the bottom, and nor are they removed, for example from the normal glyph filter; a normal is still drawn at the centre of that two original parent cells. How do I mark them accordingly so they are blanked, I tried REFINEDCELL also.

Thanks,  
Andy

---

<div class="post-metadata">

### Author: ![danlipsa](https://discourse.paraview.org/user_avatar/discourse.paraview.org/danlipsa/32/1563_2.png) [@danlipsa](https://discourse.paraview.org/u/danlipsa)
#### Post date: [July 23, 2020, 2:21pm UTC](https://discourse.paraview.org/t/vtkunstructuredgrid-cell-blanking-hiding/4933/2 "2020-07-23T14:21:09Z")

</div>

Andy,  
Blanking is not supported for unstructured grids. Only for vtkStructuredGrid and vtkUniformGrids

See  
[https://blog.kitware.com/ghost-and-blanking-visibility-changes/](https://blog.kitware.com/ghost-and-blanking-visibility-changes/)

Dan

---

<div class="post-metadata">

### Author: ![ajp](https://discourse.paraview.org/user_avatar/discourse.paraview.org/ajp/32/3516_2.png) [@ajp](https://discourse.paraview.org/u/ajp)
#### Post date: [July 23, 2020, 2:24pm UTC](https://discourse.paraview.org/t/vtkunstructuredgrid-cell-blanking-hiding/4933/3 "2020-07-23T14:24:02Z")

</div>

Any advice how to get round this as a hack short of having to generate a copy of the whole mesh minus the cells I want to hide before writing?

---

<div class="post-metadata">

### Author: ![danlipsa](https://discourse.paraview.org/user_avatar/discourse.paraview.org/danlipsa/32/1563_2.png) [@danlipsa](https://discourse.paraview.org/u/danlipsa)
#### Post date: [July 23, 2020, 2:36pm UTC](https://discourse.paraview.org/t/vtkunstructuredgrid-cell-blanking-hiding/4933/4 "2020-07-23T14:36:23Z")

</div>

You can generate a cell scalar with a special value (very large or very small) for the cells you want to be hidden. Then you can ‘Enable opacity mapping for surfaces’ and manipulate the Opacity curve in the Color Map Editor so that those cells are transparent.

---

<div class="post-metadata">

### Author: ![ajp](https://discourse.paraview.org/user_avatar/discourse.paraview.org/ajp/32/3516_2.png) [@ajp](https://discourse.paraview.org/u/ajp)
#### Post date: [July 23, 2020, 2:38pm UTC](https://discourse.paraview.org/t/vtkunstructuredgrid-cell-blanking-hiding/4933/5 "2020-07-23T14:38:33Z")

</div>

Thanks. That immediately made me think of another way. Negative integer for hidden cells and then just apply a threshold first in the pipeline on the read in mesh?

---

<div class="post-metadata">

### Author: ![danlipsa](https://discourse.paraview.org/user_avatar/discourse.paraview.org/danlipsa/32/1563_2.png) [@danlipsa](https://discourse.paraview.org/u/danlipsa)
#### Post date: [July 23, 2020, 2:41pm UTC](https://discourse.paraview.org/t/vtkunstructuredgrid-cell-blanking-hiding/4933/6 "2020-07-23T14:41:54Z")

</div>

Yes, that would work as well.

---

<div class="post-metadata">

### Author: ![rockydut](https://discourse.paraview.org/user_avatar/discourse.paraview.org/rockydut/32/13190_2.png) [@rockydut](https://discourse.paraview.org/u/rockydut)
#### Post date: [December 22, 2023, 4:27am UTC](https://discourse.paraview.org/t/vtkunstructuredgrid-cell-blanking-hiding/4933/7 "2023-12-22T04:27:45Z")

</div>

Could you paste an example of how to hide vtkUnstructuredGrid cell?
