(not depth fade) Outline where objects touch (shore)

I’m looking for a way to emulate this effect from Spyro in which, in addition to the depth fade—which is easy to implement—there are outlines where objects come in contact with the water, nicely grounding the objects in space:

17027-spyroshoreline.jpg

If I were to add a lot of vertices, I could vertex paint the shore, which is quite possibly what Insomniac has done here. But, that would make iterating a massive pain. And, I’d like to avoid unnecessary vertices where possible. I suppose something could be done with ambient occlusion, but that sounds pretty hacktastic. Any suggestions?

Hey OhiraKyou -

This effect is entirely possible, but it does require the use of a translucent material and the Depth Fade node. Here is the very basic setup, excuse the Bump offset which is not necessary for the effect to work at all.

Thank You -

Eric Ketchum

That’s basically what I’m already doing. The problem is that depth fade is only visible when seeing an object through the water, and its visibility is determined (unsurprisingly) by the depth of the object. I’m looking for a shoreline effect that’s visible even when looking straight down. For example, if you were to place a cube in that water plane and look straight down on it, you wouldn’t see a shoreline. The same would be true if you were to raise the cube such that it were just slightly touching the surface; there would be no visible shoreline at all. Notice how the objects in the screenshot I posted have both a depth fade and an outline where they protrude from the surface and that the outline is unaffected by the object’s depth.

In addition, because depth increases with the viewing angle (because you are seeing through more water, you could say), a standard depth fade shoreline disappears as you get further away unless you simultaneously increase your altitude. At a moderate distance, shores created with depth fade disappear as the distance between the near pixels of the water and the far pixels of the protruding object become too great.

In other words, depth fade allows you to see an object beneath the water’s surface. But, what I’m looking for is a way to color the water surrounding the protruding object.

Hey OhiraKyou -

Currently without using Depth fade there is no way to call the intersection between one object and the another like a water plane.

Thank You

Eric Ketchum