ANTLII
CONTACT
DRIFTINFO
  1. Overview

DRIFT Tool

DRIFT is a web tool built on p5.js, offering users to create realtime ever-evolving generative visuals, based on bitmap graphics, such as images or photos. The program allows users to upload images from their computer or fetch random photos from the Unsplash service.

Using the mouse or touchpad, users can interactively set and resize the area on the web canvas with uploaded image. When clicked, the tool creates a shape based on class Form and copies the image from the selected area into it. Next, the algorithm animates the shape by constantly repeating it on the canvas, moving and transforming it based on parameters from the Form and Animation sections.


How to Use:

To change the selection size of an image area, use the touchpad by moving two fingers. If you have a mouse, hold down the right mouse button while moving the mouse.

By clicking on the touchpad or left mouse button, the tool creates a copy of the area from the image and starts the animation process based on the parameters from the Form and Animation section.

You can use these shortcuts while the pointer is outside the settings panel:

  • C removes all forms and their trails.
  • P pauses or resumes the animation.
  • A randomizes animation parameters for new forms.
  • =/+ on the main keyboard’s number row adds a form at a random position.
  • - removes the last form.
  • I shows or hides the source image.
  • M switches between rectangular and elliptical shapes.
  • Hold Shift while resizing the selection to keep its sides equal.

I’ve made about a dozen various Presets for animation so that you can try out the program's features and quickly generate various outputs. Moreover, you can save and load your own presets with the Import/Export folder in the Preset section.

Additionally, you can check out the project on Behance, where you can find some video tutorials on working with the tool:
https://www.behance.net/gallery/186166865/DRIFT-Motion-Art-Tool ↗


Performance and compatibility

The tool accepts raster images in JPG/PNG/WebP formats as source material. You can use images of any size, as the program will scale it down, the threshold value for the resize can be set in the program settings.

  • Browser Performance: Simulation speed can vary widely depending on your hardware and browser. If you notice significant slowdowns, try switching browsers (Chrome and Firefox tend to offer the best performance) or disabling hardware acceleration in your settings.

  • Video Export: During export to video, the process may stop due to insufficient memory, especially with high resolution or long videos. If this happens, try reducing the resolution or length of the video. For large or high-resolution videos, consider exporting as a PNG sequence and later converting it to a video using the FFmpeg library.

  • Mobile Support: The program is not designed to run on mobile devices.

  • Screen size: A minimum resolution of 800x600 is required.

Please let me know if you're running into any issues or discover a bug while using the program.


Credits

I would like to acknowledge the use of several third-party libraries within this project and express my sincere gratitude to their creators for making these resources available:

  • The p5.js ↗ Creative Coding Library, a product of the collective efforts of an incredible team;

  • The simplex-noise.js ↗ library by Jonas Wagner;

  • The Tweakpane ↗ interface library, ingeniously developed by Hiroki Kokubun;

  • Mediabunny ↗ by Vanilagy for MP4 video export.

  • fflate ↗ by Arjun Barrett for bundling exported frames into ZIP archives.

And a big thanks to Unsplash ↗ platform, and specifically the contributors, for the chance to freely use their images in this project.

Technical details

Version
0.27
Inputs
Images
Exports
Video · Image
Presets
Save / load custom presets
Built with
p5.js · JavaScript