Skip to Content
DocumentationFeaturesVertex Animation

Vertex Animation

Vertex Animation displaces mesh vertices in the shader’s vertex stage, GPU-side, with zero CPU overhead. Genesis ships more than seventeen pre-built modes covering wind on foliage, pulses on magic crystals, jelly wobbles on slimes, and ripples on water surfaces, each maskable by vertex color or texture.

Video

A foliage patch swaying under the Wind mode while a nearby slime jiggles under the Jelly mode, both deforming smoothly with correctly relit normals.

features/vertex-animation/vertex-anim-overview.mp4

Wind sway on foliage and a Jelly wobble on a slime, both GPU-driven.

When to use it

  • Foliage and trees — wind sway driven by vertex color.
  • Magic crystals and runes — a pulsing scale or twist.
  • Water surfaces — ripple and wave modes on a plane.
  • Slimes and blobs — jelly and wobble for organic movement.

Modes

Genesis bundles more than seventeen modes. The most-used are Wind (gusting sway for foliage), Pulse (uniform scale oscillation), Wave (a sinusoidal traveling wave), Bounce (vertical periodic offset), Wobble, Jelly (spring-mass damped wobble), Ripple (radial wave from a point), Twist (axial rotation along height), Squash, and Bend. Sway, Vibrate, Flow, Wiggle, Breathe, Shake, and combinations round out the set.

Animated GIF

A grid of identical spheres each running a different vertex animation mode — Wind, Pulse, Wave, Bounce, Jelly, Ripple, Twist, Squash, Bend — looping so the distinct motion of each mode is visible, with mode names labelled.

features/vertex-animation/vertex-anim-modes.gif

A sampling of the built-in modes, each looping on an identical sphere.

Properties

Inspector labelShader propertyTypeDefaultDescription
Mode_VertexAnimModeEnumOffOff, Wind, Pulse, Wave, Bounce, Wobble, Jelly, Ripple, Twist, Squash, Bend, Sway, Vibrate, Flow, Wiggle, Breathe, or Shake.
Amplitude_VertexAnimAmplitudeFloat (0–2)0.05Displacement strength in world units.
Frequency_VertexAnimFrequencyFloat (0–10)1.0Oscillation rate in Hz.
Direction_VertexAnimDirectionVector4(0,1,0,0)Axis or seed direction (mode-dependent).
Mask Source_VertexAnimMaskEnumVertexRVertexR/G/B/A or a texture mask.
Mask Texture_VertexAnimMaskTexTexture2DwhiteOptional UV mask alternative to vertex color.
Phase Offset_VertexAnimPhaseFloat (0–1)0.0Per-instance phase offset; randomize via MaterialPropertyBlock.

Usage

  1. Pick a Mode that matches the desired motion.
  2. Paint vertex color R as the per-vertex amplitude, or assign a texture mask.
  3. Set Amplitude in world units and Frequency in Hz — wind around 0.1m at 0.5Hz, jelly around 0.05m at 3Hz.
  4. Vary Phase Offset per instance via MaterialPropertyBlock so a forest does not sway in lockstep.
material.SetFloat("_VertexAnimMode", 1); // Wind material.SetFloat("_VertexAnimAmplitude", 0.12f); material.SetFloat("_VertexAnimFrequency", 0.5f);

Tips & gotchas

  • Vertex animation runs after skinning, so it stacks on top of bone deformation; watch the amplitude on tight rigs.
  • Static batching strips per-renderer phase — use GPU instancing for forests.
  • Cost is 1–4 ALU per mode, cheap, but high-poly meshes amplify it.
  • Vertex animation is per-eye consistent in VR with no special handling.
Last updated on