# clipping box to recreate water column

**URL:** https://discourse.paraview.org/t/clipping-box-to-recreate-water-column/14882
**Category:** ParaView Support
**Created:** [June 19, 2024, 8:03am UTC](https://discourse.paraview.org/t/clipping-box-to-recreate-water-column/14882 "2024-06-19T08:03:13Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![\_Marco](https://discourse.paraview.org/user_avatar/discourse.paraview.org/_marco/32/5242_2.png) [@\_Marco](https://discourse.paraview.org/u/_Marco)
#### Post date: [June 19, 2024, 8:03am UTC](https://discourse.paraview.org/t/clipping-box-to-recreate-water-column/14882/1 "2024-06-19T08:03:13Z")

</div>

Hi there.

I am probably overthinking this, and most likely there is a very trivial way of achieving this. However, here is my question:

I am attempting to recreate a similar image using PV, where a parametric water column (i.e. a semi-transparent box) is clipped at the bottom using the sea floor (which I have in a netcdf, as lat, lon, depth).  
 ![Screenshot from 2024-06-19 10-51-52](https://discourse.paraview.org/uploads/default/original/2X/4/4931253460e8862c928ef9a4c2997840f480f55a.png)

When extruding the sea floor (wrap by scalar) I get the bottom, now I am failing when attempting to “fill” that rectangle with water.

The idea I had, was to add a box (representing water column), and then somehow persuade PV to only show the part of that box that is ABOVE my seafloor. Something along these lines:

 ![PV_post](https://discourse.paraview.org/uploads/default/original/2X/3/315432b5d8bae951921600b0c20ad95e7034d8ef.jpeg)

Would this be possible?  
Is this the best way to go?  
Any other ideas?

Thank you for your constructive comments.

---

<div class="post-metadata">

### Author: ![Kenneth\_Moreland](https://discourse.paraview.org/user_avatar/discourse.paraview.org/kenneth_moreland/32/15033_2.png) [@Kenneth\_Moreland](https://discourse.paraview.org/u/Kenneth_Moreland)
#### Post date: [June 19, 2024, 11:38am UTC](https://discourse.paraview.org/t/clipping-box-to-recreate-water-column/14882/2 "2024-06-19T11:38:35Z")

</div>

I am a bit confused by what you are asking. You can create a `Box` source, size and locate it so that it fills the region above your surface, and make your desired color with a low opacity.

 ![Screenshot 2024-06-19 at 7.28.42 AM](https://discourse.paraview.org/uploads/default/original/2X/8/811d74cf5f615e5482aad03ce683e2302d96f991.jpeg)

The surface is opaque, so it will naturally hide the part below so you only really see the part above. Perhaps you don’t want to see that little bit on the side where the box extends past the bottom of the surface. That part is a bit tricky, but you can start by using the `Linear Extrusion` filter on the surface. Make the extrusion go in the “down” direction, which is probably in the negative Z direction.

 ![Screenshot 2024-06-19 at 7.32.46 AM](https://discourse.paraview.org/uploads/default/original/2X/1/13784d20949ee20c10942a69de3fe12e356a0ed1.jpeg)

You might find some Z-buffer fighting in that region where the box and extruded surface overlap (as you see in this example). This can be fixed by making the box slightly smaller so that it lies behind the extruded surface but not enough to otherwise be noticeable.

 ![Screenshot 2024-06-19 at 7.34.39 AM](https://discourse.paraview.org/uploads/default/original/2X/8/82e249f9d739594f147a9292b24d8c61c8a0abbf.jpeg)

Finally, you might want a flat surface on the bottom. You can get that by clipping the linear extrusion.

 ![Screenshot 2024-06-19 at 7.36.49 AM](https://discourse.paraview.org/uploads/default/original/2X/3/391fbe2f777a4e6db7eac75186a4267d8660e46d.jpeg)

Here is a state file to create this vis (with this synthetic data):  
[water-box.pvsm](https://discourse.paraview.org/uploads/short-url/A34va0d5oOWvgzkzaOP3Ad8icmh.pvsm) (778.7 KB)

---

<div class="post-metadata">

### Author: ![\_Marco](https://discourse.paraview.org/user_avatar/discourse.paraview.org/_marco/32/5242_2.png) [@\_Marco](https://discourse.paraview.org/u/_Marco)
#### Post date: [June 19, 2024, 12:20pm UTC](https://discourse.paraview.org/t/clipping-box-to-recreate-water-column/14882/3 "2024-06-19T12:20:15Z")

</div>

Hi Kenneth.

Thank you so much for your precious contribution. This looks already very close to what I want to achieve.

Instead of the wavelet, I am using some netcdf file (attached). The state file you have so kindly enclosed, is very helpful.

Will post my results here, if and when, I will have successfully accomplished my goal.

Thanks again  
[gebco\_2023\_n36.75\_s32.75\_w30.6299\_e35.9.nc](https://discourse.paraview.org/uploads/short-url/darqN3EV1HJkHwl2whHZq5ikTQw.nc) (2.3 MB)

---

<div class="post-metadata">

### Author: ![Kenneth\_Moreland](https://discourse.paraview.org/user_avatar/discourse.paraview.org/kenneth_moreland/32/15033_2.png) [@Kenneth\_Moreland](https://discourse.paraview.org/u/Kenneth_Moreland)
#### Post date: [June 19, 2024, 12:42pm UTC](https://discourse.paraview.org/t/clipping-box-to-recreate-water-column/14882/4 "2024-06-19T12:42:55Z")

</div>

Here is the same idea applied to your terrain data. (I turned on ray tracing and shadows to make the floor features more distinct.)

[water-box-terrain.pvsm](https://discourse.paraview.org/uploads/short-url/q3XEIEzqSupS8KDpEL4E2Psdreu.pvsm) (770.9 KB)

 ![Screenshot 2024-06-19 at 8.41.16 AM](https://discourse.paraview.org/uploads/default/original/2X/8/84c371ca8974b789cfef27b8b1f03572360db807.jpeg)

---

<div class="post-metadata">

### Author: ![\_Marco](https://discourse.paraview.org/user_avatar/discourse.paraview.org/_marco/32/5242_2.png) [@\_Marco](https://discourse.paraview.org/u/_Marco)
#### Post date: [June 19, 2024, 1:30pm UTC](https://discourse.paraview.org/t/clipping-box-to-recreate-water-column/14882/5 "2024-06-19T13:30:43Z")

</div>

Kenneth!!! Thank you! This is precisely what I was aiming at.

> Will post my results here, if and when, I will have successfully accomplished my goal.

Well, you were faster!

Thanks again!

---

<div class="post-metadata">

### Author: ![Kenneth\_Moreland](https://discourse.paraview.org/user_avatar/discourse.paraview.org/kenneth_moreland/32/15033_2.png) [@Kenneth\_Moreland](https://discourse.paraview.org/u/Kenneth_Moreland)
#### Post date: [June 19, 2024, 1:41pm UTC](https://discourse.paraview.org/t/clipping-box-to-recreate-water-column/14882/6 "2024-06-19T13:41:04Z")

</div>

I’m glad it worked for you.
