π Shader-based Animation
A Deep-sea Demo
Fishy Vertex math
Shader-driven Swim-cycles
ππ π
[ T H I S P O S T I S W I P ]
Full Unity shader code visible here
An aquarium I made (in 2019) while teaching myself C# & GLSLβa continuation of shader-driven animation explorations I began while developing InnerSpace.
As part of the shader-centric art pipeline I developed for InnerSpace, I found myself using vertex-animation to drive simple motions, affording a fast & cheap impression of life. As a result, naturalistic foliage, wind & water motion, breathing, attraction & repulsion, dynamism, and more were unlocked without the workflow-overhead & rendering-complexity of traditional: rigging, paint-weighting, rig-based animation, and skeletal-mesh rendering.
Further, by foregoing these traditional animation workflows, I was able to leverage GPU instancing for huge performance gains, enabling: massive flocks of dynamic & individually animated fish/birds, dynamic & interactive vegetation (on a per-leaf basis!), and much more.
Shader-driven vertex animation was used to add life & motion to the Sunfish boss from my game: INNERSPACE
While not very nuanced, the early application of shader-based motion to my models felt like magic & helped me understand just how much βlifeβ even simple motion adds. It transformed my work from unmoving objects to living, breathing creatures.
(Even while knowing traditional rigging & animation, the basic utility & often counter-intuitive benefits of animating with shaders & math are huge).
Project Goals
Generalizability: Support support multiple body, creature, & morphology types via a highly flexible shader & user-tunable parameters.
Mobile Friendly: Leverage GPU Instancing for massive on-screen numbers & mobile application.
An example of the same shader applied to a different kind of sea-creature. The shader can also be used to drive wing-flapping for bird-like creatures, along with many other forms.
A swim cycle driven entirely through shader-based animation. Includes: Side-to-side wave, Axis-oriented βtwistβ wave, side-to-side object offset, proper normal transformations (for accurate shading) across all these vertex transformations, phase offset, and much more.
An exaggerated visualization of 3D noise. Used to to simulate the motion & displacement of dynamic volumes (like water or air), acting upon soft, flexible bodies moving through them.
References & Links
Creating the Art of ABZU by Matt Nava
Unity Steer by Ricardo Mendez
Additional Resources:
Relevant info & further reading β stuff I wish I had when I was creating this project.
Coding Adventure: Boids by Sebastian Lague
WIP Links for related media: