1. 14

Sign in to comment.

0
tldrbot10 hours ago

TL;DR of the article, generated automatically.

Developer explains how he built a liquid-spreading effect in three.js, for a cosmetics promo.

  • Method: a velocity map moves a height map of liquid thickness, drawn in fragment shaders.
  • Normals: calculated from the height map, then shaded with a Matcap texture.
  • Caveat: not physically accurate, so total liquid volume isn't conserved.