A simple command line utility for generating character GIFs with overlays.
npm install charmake -g
Organize your character's animation sequences into the following directory structure.
root/||_design/| || |_design1.png| |_design2.png| |_...| |_designN.png||_character/|_sequenceA/| || |_sequenceA0000.png| |_sequenceA0001.png| |_sequenceA0002.png| |_...| |_sequenceAXXXX.png||_sequenceB/| || |_sequenceB0000.png| |_sequenceB0001.png| |_sequenceB0002.png| |_...| |_sequenceBXXXX.png||_...||_sequenceZ/||_sequenceZ0000.png|_sequenceZ0001.png|_sequenceZ0002.png|_...|_sequenceZXXXX.png
The are only a couple of requirements here that you need to follow:
designadjecent to the character directory that contains all the design files (overlay and underlay).
If the conditions are met, then all you need to do is run the following from your terminal or command line:
charmake -i path_to_my_character_dir -d path_to_csv_data_file
The above command will use FFMPEG as the GIF generation library. Animation files for your character will be created inside the charcter's directory upon success. Output directory can be changed by using
--output-dir parameter. You can also get a
list of all the options available by runing:
Most options use sane defaults so you should be good to go without specifying anything additional besides input.
|-i, --input-character||Directory Path||Required||The path to the character directory containing all the animation directories|
|-d, --df, --datafile||Data File Path||Required||Path to the CSV data file for the character|
|-o, --output-dir||Output Directory Path||Input Directory||Path to the Directory in which to output the generated character files|
|-w, --width||Number||Design file Width||Width of the output in pixels. Will default to the size of overlay design file if omitted.|
|-h, --height||Number||Same as Width||Height of the output in pixels. If no
|-s, --size||String||Output dimensions of the format x (e.g 512x512). This value will take precedence over
|-f, --fps, --framerate||Number||25||Framerate to use for the output animation. Runs at 25 frames/second by default.|
|--verbose||Boolean||False||Print debug logs to stdout|
|--version||Shows version information|
|--help||Shows detailed help about the command utility|
The CSV data file needs to follow the following structure:
Column 1: animation directory name (string),Column 2: crop start X (number),Column 3: crop start Y (number),Column 4: crop width (number),Column 5: crop height (number),Column 6: design_file (string),Column 7: 0 for underlay OR 1 for overlay,Column 8: framerate (number)
For example, the third line describes an animation in directory called
dismissing_gesture, croping the frames starting from
0x0 and a total size of
1000x1000. It's design file is named
NotInterested.png which is overlayed (
1) over the frames. It's framerate is
(The MIT License)
Copyright (c) 2016 Uzair Sajid
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.