About
These are a few perl scripts and a perl library which create xml files for your 3D RGB LED Cube. Simply upload the xml files using the standard cube software.
See the Video at Vimeo or download it for an example of the generated xml files running on the cube.
Note that these scripts are not cleaned up at all. Still i hope they can be used as a basis to create customized animations.
Setup
- Download any Perl environment, e.g.: Padre
- Download and unpack the latest snapshot (Code -> download snapshot) and unpack it to a folder
- Run the example .pl scripts:
- The .pl files create xml files when called. Open them up with e.g. Padre and edit them to modify the generated videos. It is helpful to test the output both using the RGB-Cube software and on the real cube.
- movie2cube/moviePNGdir2cube - Create cube animations from movies. As prerequesite, install the GD perl module from CPAN. Also, for the movie2cube sript, you will need the mplayer.exe in the same directory. Note that the 2D movies are shown on the front of the cube and older frames are shifted to the back of the cube. This way, the depth of the cube becomes a kind of timeline of what is happening. Also, only the first 2000 frames of the movie are converted, otherwise the files will get pretty large.
- ASE_animation.ase - is an example 5x5 pixel animation done in the aseprite animator. You can load it into the editor and export the movie as a series of png files in a directory. Set the directories name in the moviePNGdir2cube script and it will create an xml animation from the series of PNGs.
- Pack_Sequences.pl - Once you are happy with a few animations, you can combine them using Pack_Sequences.pl. It will pack several sequences (which you set up in the script) into one big xml file.
- Cube.pm - is the perl package which is called by all the scripts for color conversion, colormap creation and for creation of the xml file.
- Profit!
License
All code which is not attributed to somebody else in the code itself is under the GPL V3 license.
For code attributed to others, see credits section below.
Credits
Conways Game of Life is an implementation of the famous cellular automaton in 3D, based on the code at 3D Game of Life by Evgeny Demidov.
HSV to RGB conversion: Based on the java code at: Color Conversion Algorithms by Prof. Nan C. Schaller. Small fix applied.
Jet Color Function: Based on Implementing a Continuous “Jet” Colormap Function in GLSL by Matt Stine.
The Icon for this project, "Fruit Ice Cream icon", is by Kluke and is free for non commercial use.
Project Members: