Skip to main content
Version: 0.1.5

Some Useful Features

Murali is not just for rendering animations β€” it also provides built-in tools for exporting visuals at precise moments in time.


πŸŽ₯ Video Output​

When you run a scene, Murali automatically generates a video if ffmpeg is installed on your system.

This allows you to:

  • render scenes directly to video
  • maintain perfect sync with your timeline
  • avoid manual stitching workflows

πŸ“Έ Screenshots​

You can capture screenshots at specific timestamps during a scene.

This is useful for:

  • YouTube thumbnails
  • documentation images
  • keyframe debugging

Example​

scene.capture_screenshots_named([
(0.7, Some("captures/step_01.png")),
(2.2, None::<&str>),
(2.7, Some("captures/step_03.png")),
]);

How it works​

  • Each tuple is (timestamp, filename)

  • timestamp β†’ time in seconds

  • filename β†’ optional

    • If provided β†’ saved with that name
    • If None β†’ Murali auto-generates a name

🎞️ GIF Capture​

Murali can also generate GIFs from selected moments in your scene.

Instead of exporting the entire timeline, you can pick specific instants and stitch them together.

Example​

scene.capture_gif("movement_overview", [0.7, 2.2, 2.7]);
scene.capture_gif("square_focus", [0.7]);
scene.capture_gif("circle_focus", [2.2, 2.7]);

How it works​

  • First argument β†’ GIF name
  • Second argument β†’ list of timestamps
  • Frames at those timestamps are captured and combined into a GIF

PNG export​

Murali can export PNGs even when you do not want a final MP4 or GIF.

There are two useful PNG workflows:

  • full frame export β€” write the whole animation as a PNG sequence
  • timestamped screenshots β€” capture selected authored moments as standalone PNGs

Frame-by-frame PNG export​

During export, Murali can always write PNG frames to the output directory.

This is useful when you want:

  • a frame sequence for post-processing
  • deterministic image output without relying on ffmpeg
  • assets for another video editing or compositing pipeline

Typical output looks like:

  • render_output/frames/frame_00000.png
  • render_output/frames/frame_00001.png
  • render_output/frames/frame_00002.png

If ffmpeg is missing, Murali still keeps these PNG frames and tells you where they were written.

Transparent PNG backgrounds​

If you want transparent PNG output, set the export clear color alpha to 0.0:

use glam::Vec4;
use murali::engine::export::ExportSettings;

let settings = ExportSettings {
clear_color: Vec4::new(0.0, 0.0, 0.0, 0.0),
..Default::default()
};

This works well for brand marks, logos, overlays, and other assets that need to sit on top of another background later.

PNG keeps the alpha channel. MP4 does not preserve transparent backgrounds in this export path.

Authored PNG screenshots​

If you only want a few specific PNGs, prefer scene-level screenshot capture:

scene.capture_screenshots([0.5, 1.0, 2.0]);

scene.capture_screenshots_named([
(0.5, Some("captures/intro.png")),
(1.0, None::<&str>),
(2.0, Some("captures/final.png")),
]);

This is the best fit for:

  • blog images
  • documentation assets
  • social thumbnails
  • milestone frames from a longer animation

For more detail on export configuration, see Export and Capture.

πŸ’‘ Why this matters​

Murali’s export system is designed around its time-driven model:

  • You think in timestamps, not frames
  • Outputs are deterministic
  • You can reliably reproduce visuals across runs