โ† All examples

godot shaders

Melting mesh with drips and a spreading puddle

Melt a mesh from the top down: vertices sag below a rising melt amount, drips hang at hashed points around the outline, the base spreads into a puddle, and the surface becomes glossier as it melts.

Recorded render of Melting mesh with drips and a spreading puddle

What this component contains

  • ATTRIBUTION.md
  • LICENSE
  • README.md
  • component.json
  • demo.tscn
  • inspect_shader.py
  • material.tres
  • melt_drip_vertex.gdshader
  • preview.png
  • test_package.py
  • verification/native.json

How it works

Shader type
spatial
Parameters
albedo (vec4 = 0.95, 0.85, 0.62, 1), melted_color (vec4 = 0.98, 0.75, 0.45, 1), melt (float = 0.45), object_height (float = 1.2), sag (float = 0.35), drip_length (float = 0.25), drip_thickness (float = 0.05), drip_count (int = 9) and 2 more
Use it on
A mesh centred on its origin with enough height subdivisions; set `object_height`.
Result
A wax candle sagging at the top with drips running down its sides and a widened base.
Renderers
compatibility: compiled and rendered, forward plus: not verified, mobile: not verified
Placement
res://baltor/godot_shaders/melt_drip_vertex/

Recorded checks

godot 4.7.2.stable.official.ed1daf0bf

  • contract_static
  • engine_run
  • engine_log_clean
  • shader_in_scene
  • capture_written
  • render_not_uniform
  • shader_changes_pixels

Limits to consider

Normals are not recomputed, so lighting on the sagged shape is approximate. Volume is not conserved. Drips are placed by angle around the Y axis, which suits round objects best.