🌈Gradients & Curves

Interpolation based maths and how they apply in COZY

Many things that move/change color in COZY Weather use gradients and curves to allow for easy and intuitive editing. As it turns out, unless you have a thorough understanding of both COZY and interpolation based mathematics, gradients & curves are slightly less intuitive than one would hope. This article aims to remedy this problem and should make your transition into the COZY system even easier.

Why Gradients & Curves

Curves are useful because they store information in a Two Dimensional method instead of a One Dimensional vector. Now that I've cleared this up sufficiently.......I'm kidding.

Curves are essentially just like floats. The only difference is that they store interpolated versions of the float data type. In more simple language, a curve stores a series of floats along with a key for each that determines where on the curve this data is placed (more practically known as the time). Along with this data, the rest of the curve is filled in with interpolations between the keys so that your curve is completely filled with data. This curve can then be evaluated from 0-1 and the value of the curve at that time is returned.

For more information on how animation curves work, please read this blog post by Eduardo Oriz & Christo Nobbs.

Using Gradients & Curves Practically in COZY Weather

In practicality, this is an incredibly helpful tool to use within COZY's editor. Due to the property of Meridiem Time that allows it to condense to a single 0-1 float, the time of day will perfectly match up to a curve.

If you think of both ends of the curve as midnight, the sun will rise at values around 0.25, noon will fall around 0.5, the sun will set again around 0.75, and the cycle repeats with midnight at values of 1.

Last updated