Skip to content

custom keyframes for Unity's timeline 🎞 (interpolate lists of anything) with visual tools πŸ–Œ and C# to computeshader binding

Notifications You must be signed in to change notification settings

needle-tools/custom-timeline-editor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

colorbar

Custom Timeline Keyframes and Data Painter Tools

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

Features

  • Custom keyframes (keyframe and interpolate any collection of types)
  • Undo / Redo
  • C# to compute shader binding

See videos below

State of the project

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 πŸ™

Samples

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

Dependencies

Getting started

image

  1. Create a timeline, add a Code Control track to it. Right click in the control track to create a Control Track Asset (same as AnimationClip but for custom data, it can be re-used multiple times in a timeline or other timelines)
  2. Create script that implements the IAnimated interface or derives from the Animated 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);
        }
    }
}
  1. Add the script to your control track
  2. Open the Tools/Timeline Tools window
  3. Open the curve views of the Control Track and click the record button for the field in your script, then start painting data.

Videos:

Modular tooling system [tweet]:

2021-11-18-111754-yuv420p.mp4
2021-11-20-180226.mp4

Any data type: control, paint and interpolate:

2021-11-15-105628.mp4
2021-10-16-152532.mp4

Onion skin [tweet]:

2021-10-17-161607.mp4

Edit mode support:

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

Contact βœ’οΈ

🌡 needle β€” tools for unity β€’ @NeedleTools β€’ @marcel_wiessler β€’ @hybridherbst β€’ Needle Discord

About

custom keyframes for Unity's timeline 🎞 (interpolate lists of anything) with visual tools πŸ–Œ and C# to computeshader binding

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages