Addon to record a viewport in Godot and automatically convert the recording into an animation.
Download the plugin from the Godot Asset Library and enable it in the project settings.
Add the Recorder-Node to your main scene (or any other scene, doesn't really matter).
The R-Key is used to start/stop the recording by default. This can be changed in the Trigger-properties.
The framerate of the recording. Make sure to pick a value thats actually possible to record. (If you're using a framerate higher than the one your game is running at, you will get strange results. Also GIF allows maximal Framerate of 50) Higher framerate will give you smoother animations but will also make the filesize larger.
Currently there are two available formats to export an animation to:
Produces a GIF of the recording. Support on basically every platforms and probably the format you want to go for.
The resulting file is an animated PNG. Animated PNGs are supported by all modern browsers.
Animation is stored as a series of PNG-images. The filenames are extended with the index of the animation (e.g _0001.png, _0002.png, ...).
You can choose between four color types.
Color type | Color | Transparent | Byte/Pixel |
---|---|---|---|
Greyscale | 1 | ||
Greyscale Alpha | x | 2 | |
Truecolor | x | 3 | |
Truecolor Alpha | x | x | 4 |
On way to make use of of the transparent types (Alpha), is to make the background of the viewport transparent. (get_viewport().transparent_bg = true
in GDScript)
Note that this won't work for GIFs as the library used only supports RBGA Input but ignores the transparency value (A). You may still choose to use Greyscale color type, which will record the frames in greyscale.
This option sets the event which starts/stops the recording.
It can be set to any InputEvent.
A common use case is, to set it to an InputEventAction
with the action record
which can be configured in Project Settings > Input Map
.
The folder in which the recordings should be saved. This is set to user:// by default, but any valid filepath can be choosen.
Use the following code to build linux binaries
# generate c++ bindings
cd godot-cpp
scons platform=linux target=release generate_bindings=yes -j4
# build binaries
scons platform=linux target=release -j4
I'm still trying to get ffmpeg to work with the Godot cpp bindings. This would allow for a lot more