I'm trying to create a smarter heigthfield mask expand node but I'm struggling to find a good solution.
What I basically want is a mask expand that also considers height distance instead of only 2d distance.
e.g. I expand a mask by 10 meters but I don't want it to creep up all the way on a steep slope.
The closest I got was clipping away the mask when its height was larger than a set maxheight. In this case it was the max height of the masked area which I managed to get by doing:
setdetailattrib(0,"minHeight", @height*@mask, "min"); setdetailattrib(0,"maxHeight", @height*@mask, "max");
I think the main reason I'm stuck is that I'm more familiar working with points etc than heightfields or volumes. The built-in volume expand function is also a compiled node I can't open to read the code.
I thought this was going to be an easy function to add but Houdini proved me wrong!
Anyone have any ideas that might help me?