Custom keyframes for Unity's timeline allow for easy interpolation of any custom data type including visual tools and a modular tooling system to creatively manipulate your data for use as input of generative animation and more
2021-11-18-110410-640p.mp4
- Custom keyframes (keyframe and interpolate any collection of types)
- Undo / Redo
- C# to compute shader binding
See videos below
This tool was originally developed to ease animating with code and give me some flexible and visual tools to control generative animation. It should be in a working state but still rough around the edges of e.g. UX, is not tested in production of any real project. Yet I think it can be useful and I hope to return to it one day to improve all the things that need attention (e.g. better documentation, improving the UI and UX for the modular tools, fixing of bugs, improving performance, finish implementation of C# β compute binding).
That being said: please open issues if you have problems or contribute by opening a PR π
A minimal sample is in projects/Timeline-2020_3/Assets
. More examples for getting started can be found in the playground repository. I'll try to cleanup and provide better samples soon
- Create a timeline, add a
Code Control
track to it. Right click in the control track to create aControl Track Asset
(same as AnimationClip but for custom data, it can be re-used multiple times in a timeline or other timelines) - Create script that implements the
IAnimated
interface or derives from theAnimated
class:
public class SimpleScript : Animated
{
// Here is a custom type that you can control via timeline
public class Point
{
// a field named position will automatically be detected by the spray tool to be painted in 3d space
public Vector3 Position;
// you may name fields as you like and add as many as you want. They will show up in the tool to be painted and individually manipulated
public float Radius = .1f;
}
// annotade any field that you want to animate via timeline with the Animate attribute:
[Animate]
public List<Point> MyList;
// this is just for the sake of visualizing the painted points:
private void OnDrawGizmos()
{
if (MyList == null) return;
foreach (var pt in MyList)
{
Gizmos.DrawSphere(pt.Position, pt.Radius);
}
}
}
- Add the script to your control track
- Open the
Tools/Timeline Tools
window - Open the curve views of the Control Track and click the record button for the field in your script, then start painting data.
Modular tooling system [tweet]:
2021-11-18-111754-yuv420p.mp4
2021-11-20-180226.mp4
2021-11-15-105628.mp4
2021-10-16-152532.mp4
Onion skin [tweet]:
2021-10-17-161607.mp4
2021-11-18-191818.mp4
Runtime support [tweet]:
2021-11-18-114430.mp4
Simulation mode [tweet]:
2021-10-15-000203.mp4
Easy to integrate (e.g. controlling keijiro's swarm)
2021-11-13-175756-640p.mp4
Works with compute + can automatically bind and dispatch C# members to ComputeShaders (tweet)
20220729-010730_Timeline-2021-URP_-_DrawLine_-_Windows._Mac._Linux.mp4
π΅ needle β tools for unity β’ @NeedleTools β’ @marcel_wiessler β’ @hybridherbst β’ Needle Discord