Skip to content

Sequencing

Aron Nopanen edited this page Mar 31, 2018 · 1 revision

One of the more complex aspects of animations is how to orchestrate sequences across the entire model. The model consists of a number of discrete elements, each corresponding to a 'universe' in the terms of the animation engine. Playing an effect or sequence of effects on a single universe is straightforward; orchestrating a set of effects across many or all universes is more complex. That's what the topic of sequencing covers.

This page contains some mix of brainstorming on the topic morphing over time into a proper design.

Some Terminology

The lighthouse model contains a bunch of LEDs. These LEDs can be subdivided into groups that each form a visually-meaningful portion of the model; each of these groups is referred to as a universe (a term loosely borrowed from the ACN/E1.31 world of LED sequencing). A universe represents the finest level of element that can be animated independently. Universes in the lighthouse model include:

  • Each window on the base section, representing the resonators on the portal
  • Each window on the lighthouse 'shaft', used to indicate portal ownership and level and whatever else
  • The beam at the top of the lighthouse

At a higher level, it's useful to partition these universes into a set of domains, representing portions of the model serving different semantic purposes. The idea is that a particular portal state transition would affect an entire domain (or possibly multiple domains). The domains as I see them are:

  • The 'resonator' domain, containing the universes for all base windows, representing resonator status
  • The 'level' domain, containing the universes for the 'shaft' windows and the beam at the top, representing portal ownership and level

(Should the beam and the shaft windows be separate domains? Does domain end up having a concrete representation in code?)

Concepts

We are applying effects to universes. An effect is a time-bounded animation of the universe representing a discrete visual transition, such as a fade or an interpolation from one color to another. Effects for a universe can be queued up; an effect or series of effects can be repeated indefinitely or played through and stopped.

Sequencing involves orchestration of effects across all universes in the model. We might need to schedule effects to start at a particular time, or perhaps set a new effect on one universe after an effect on a different universe completes.

Stuff we need to accommodate

We need to be reactive to changing portal state, which can happen in the middle of an ongoing sequence. We need to be able to gracefully stop the sequence in the middle and move on to something else.

A newly-applied effect might need to take into account current pixel states as left by a previous effect. E.g., we might want to smoothly interpolate from what's currently being shown on a universe to some other state.

Clone this wiki locally