Day and night in one shader
A custom material mixes the day and night images by how much each point faces the sun. City lights come from the night image, and the oceans catch a soft sun glint using a water mask.
A 30-second film with no video file. Every frame is code: Earth, day and night, clouds, and light arcs from New Delhi to nine cities.
Open it full screen ↗Show what real-time 3D can do for a brand, without asking the visitor to download a video. One scene, one story, small enough to load on a phone.
A film, made of code.
Most “3D intros” on the web are a rendered video wearing a costume. This one is not. The planet, the clouds, the stars, the sunset line and the light arcs are all drawn by the visitor's graphics chip, thirty frames or more every second, from three image files and about 700 lines of code.
That matters for clients. A live scene can react to the pointer, change copy with the story, be paused, replayed and explored, and it can show your own data: your cities, your stores, your customers. A video can only be watched.
We built it as a study for ourselves first, so every choice could be made for the picture and not for a deadline. The same building blocks now go into product viewers and hero scenes for client sites.
Small on purpose.
One timeline drives the camera, the sun, the copy and the effects.
The camera starts far out and eases in while the day and night line sweeps across the planet. Headline: “Motion that feels like film.”
A fast, smooth dive onto India. A latitude and longitude grid fades in, then a light beam and pulsing rings mark New Delhi.
Nine arcs of light draw from Delhi to Dubai, Singapore, London, Berlin, Tokyo, New York, Toronto, Sydney and San Francisco. Markers pop at each end.
A wave spreads across the globe and turns the city lights from warm orange to the studio's emerald. The call to action appears, then the camera pulls back and the loop restarts.
Six pieces, each one a few dozen lines.
A custom material mixes the day and night images by how much each point faces the sun. City lights come from the night image, and the oceans catch a soft sun glint using a water mask.
Clouds are made from layered noise inside a shader. They drift slowly, thin out as the camera gets close, and glow orange along the sunset line.
A slightly larger sphere, drawn from the inside with additive blending, gives the blue rim of air. A canvas-drawn sprite adds the sun's glare.
One draw call. Every star has its own size, colour and twinkle phase, and the field turns a little as the globe turns.
Each route is a curved tube lifted above the surface. A shader reveals it along its length with a bright moving head and a fading tail.
A post-processing pass makes bright things glow: the arcs, the markers and the sun. It is the difference between “3D” and “film”.
No build step and no bundler. One HTML file, three images, two libraries loaded from a CDN.
Pause the film and drag to rotate, scroll or pinch to zoom. Press Explore again and the film resumes from the chapter you were in.
The pixel density is capped lower on phones, and the globe moves up to leave room for the headline.
If the visitor asks their device for less motion, the pointer parallax is turned off and the film plays at three-quarter speed.
If the browser cannot run WebGL, the page says so in plain words instead of showing a blank screen.
The full walk-through, with the shader code.
Live and public. The nine cities are placeholders for now; for a client they become real stores, offices or customer locations.
Tell us about your project and we will tell you how we would approach it.