How to make an animated movie that's only 8KB?
The group '
How we made an animated movie in 8kB - Ctrl-Alt-Test
https://www.ctrl-alt-test.fr/2024/how-we-made-an-animated-movie-in-8kb/
The Sheep and the Flower - Razor 1911 & Ctrl-Alt-Test (8kB demo) - YouTube
In November 2022, Ctrl-Alt-Test set the challenge of creating a short animation under the constraints of 8 kilobytes. According to Ctrl-Alt-Test, the goal was to include high-quality graphics and animation, direction and camera work, and music to match them.
Ctrl-Alt-Test first used the method of ``covering the entire screen by drawing a rectangle consisting of two triangles'' (PDF file), which has been a standard approach since 2008 when rendering. .
Next, we use the programming language GLSL to run a GPU program called a shader on the rectangle. A program written in GLSL performs color calculations for each pixel and each frame. So the user has to write a function that takes coordinates as input and returns a color.
Therefore, we use a function called a signed distance function (SDF) to create cubes, cones, spheres, etc. We created a function related to the shape of the sheep by combining the body and wool made up of 3D noise functions.
In order to draw 3D images on the screen, ray marching was used, which uses SDF to draw objects of various shapes without using polygons. Rather than mathematically calculating the points of intersection of the lights as in racing, the drawing is done using the distance the light travels to hit the object.
Below is an initial rendered image using Ctrl-Alt-Test.
Given the 8 kilobyte limit, it is difficult to have multiple characters appear or make characters perform complex movements. But you have to tell the story to the viewer. So Ctrl-Alt-Test omitted things that weren't necessary for the story. Initially, Ctrl-Alt-Test was supposed to be a sheep walking in the desert, but the story didn't need a desert. Therefore, the animation was created with a pure white background without creating a desert or sky.
In addition, by narrowing down the scope of work, such as by eliminating the background, he was able to concentrate more on object details, camera work, and editing. Ctrl-Alt-Test says, 'Each shot was created by hand and went through many adjustments and adjustments to ensure the flow was just right.'
Furthermore, in order to create a story that resonates with the viewer, Ctrl-Alt-Test not only uses general story creation techniques, but also increases the walking speed to express the excited sheep. , using techniques such as violently moving its tail and head. In addition, by adding changes to the music during exciting scenes, they were able to convey a variety of emotions to viewers throughout the story.
To create this animation, we initially used a 3D animation tool called '
A synthesizer software called `` 4klang '' was used for the music for the animation. In order to compress the file size as much as possible, Ctrl-Alt-Test not only reduced the number of instrument types from 16 to 13, but also improved the compression rate by repeating the same phrase over and over again. I'm letting you do it.
Also, the sheep's eyes originally rendered by Ctrl-Alt-Test were black and featureless.
However, based on the idea that ``eyes are useful for expressing emotions,'' we added pupils and irises using a method called
In addition, by applying a calculation formula called the Fresnel relation to objects such as sheep's hooves, we are able to achieve realistic reflections against the lighting settings.
During the production stage of Ctrl-Alt-Test, we experimented with changing the video to monochrome and adding noise. But Ctrl-Alt-Test says, 'After much discussion, we decided to abandon this experiment and focus on a clean, modern look.'
Ctrl-Alt-Test compresses the data by encoding all of this data. Regarding music, we have digitized ``sheet music for performance'' and ``list of instructions for each instrument.'' A special compression tool called '
However, using Crinkler left us with a total of 42 kilobytes of shader source code . Therefore, additional steps are required to fit this shader into binary.
To further minify the shader source code, Ctrl-Alt-Test used a proprietary tool called ' Shader Minifier .'
As a result of working with Shader Minifier, we succeeded in compressing the shader source code, which was 42 kilobytes in total, to about 5 kilobytes. Ctrl-Alt-Test successfully managed to keep the data, including the music and C++ code for execution, within 8 kilobytes.
The source code of the work 'The Sheep and the Flower' produced by Ctrl-Alt-Test is available on GitHub.
GitHub - ctrl-alt-test/mouton
https://github.com/ctrl-alt-test/mouton
Related Posts:
in Software, Web Application, Video, Posted by log1r_ut