Motion
Get Motion

ReferenceMaterial nodesTime

Day Progress

How far through the day it is (0 at midnight, 1 at the next), and how light it is outside: 1 between Sunrise and Sunset, fading over an hour.

TimedayProgress

Inputs

PinTypeStarts atNotes
Sunrisesunrisefloat6–
Sunsetsunsetfloat20–

Outputs

PinType
Day Fractiondayfloat
Daylightlightfloat

The code it becomes

What Studio writes for the graph below: a few lines of the material's shader, worked out for every pixel.

void mainImage(out vec4 fragColor, in vec2 fragCoord){    float n2_day = (iDate.w / 86400.0);    float n2_light = (smoothstep(6.0 - 0.5, 6.0 + 0.5, (iDate.w / 3600.0)) * (1.0 - smoothstep(20.0 - 0.5, 20.0 + 0.5, (iDate.w / 3600.0))));    fragColor = vec4(vec3(n2_day), 1.0);}

In a graph

Texture coordinates into the node, and the node into the material, as Studio draws them.