Hey! For anyone interested, I found a solution that works.
I started by creating a "sensor" (a small sphere) and constraining to the ship.
Next I used an Extract Centroid SOP, with Detail for Run Over, Center of Mass for Method, Attribute (called "centroid") for Output.
Next, I added an Object Merge SOP, to merge the sea surface.
I then dropped a Python SOP and attached the sensor to Input 1 and the sea surface merge into Input 2.
I wanted to export a csv with depths for the entire frame range. Works great as long as the sensor is always under the surface. Would need to tweak the equation for depth on line 24.
node = hou.pwd()
hipFile = hou.hipFile
path = hipFile.path()
filename = path.replace(hipFile.basename(), node.parent().name() + ".csv")
inputs = node.inputs()
sensor_geo = inputs.geometry()
sea_surface_geo = inputs.geometry()
if (hou.intFrame() == 1):
file = open(filename, "w+")
file = open(filename, "a")
print("ermagerd! ferl errr!")
position = hou.Vector3()
normal = hou.Vector3()
uvw = hou.Vector3()
ray_origin = hou.Vector3(geo.attribValue("centroid"))
ray_dir = hou.Vector3(0,100,0)
intersected = sea_surface_geo.intersect(ray_origin, ray_dir, position, normal, uvw)
depth = position - ray_origin
file.write(str1 + "\n")
fend = hou.playbar.frameRange()
if (hou.intFrame() == fend):