Home Artists Posts Import Register

Content

I've been experimenting with my idea for shoreline foam. It looks like it'll be pretty straightforward to implement, except for the foam texture. In this screenshot, the foam is pure white, untextured.

The foam image will have to be stored in an additional layer of the texture. And since liquids with glowmaps already uses the two layers specified in the texture format, it seems that the texture format will have to be modified. Which opens up another question: should foam have glowmaps?

Anyway, I'll keep improving the other aspects of the foam (depth, curve shape, inner rasterization optimizations) before deciding on what to do about texturing it.

The main limitation of this shoreline foam technique, as can be seen on the pillar on the right, is that the foam doesn't extend orthogonally to walls. However, this is barely noticeable during gameplay.

And the advantages are numerous over other shoreline foam techniques:

  • No extra geometry.
  • No extra rendering passes.
  • No extra overdraw.
  • It conforms to the shape of all submerged objects, including players and enemies.
  • It's fully integrated with the wavy shorelines, ondulating together in sync.

Sure, it'll make liquids a bit slower to render, but it will still be much faster than any other technique.

Files

Comments

Matt Proud

Is it possible to randomize the foam‘s parameters: whether it exists, depth+body, colorization, and maybe even presence of materials or chunks of debris?

mankrip

The depth and the curve will be customizable. The foam will be textured, and this will give it all the visual freedom and advantages of liquid textures, including animated texture frames for the foam. Useful for artists wanting to make foam with bubbles popping, etc. To enable it, the liquid texture will have to have a foam layer, so its usage will be defined by the texture artist. But additional methods to disable it may be implemented, such as entity fields.