clipping box to recreate water column

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

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:

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

Thank you for your constructive comments.

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.

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.

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.

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

Here is a state file to create this vis (with this synthetic data):
water-box.pvsm (778.7 KB)

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 (2.3 MB)

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 (770.9 KB)

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!

1 Like

I’m glad it worked for you.