Page 1 of 1

Context Free Animator

Posted: Sat Aug 23, 2014 12:03 pm
by flembobs
I have made a program using Python 3 that creates animations from Context Free Art drawings.

http://www.goshdarngames.com/context-free-animator/

The repository can be found here - it includes some documentation:

https://github.com/flembobs/Context-Free-Animator

A gallery of animations I've made can be found here:

http://www.goshdarngames.com/context-fr ... r-gallery/

The program works by parsing a CFDA file that has some special mark-up and converting it into a CFDG file and then passing that to Context Free.

The output is a series of PNGs straight from Context Free. I combined them into animations using http://www.gifmaker.me/ and then converted those to HTML videos using http://www.gfycat.com/

You can combine the images using any animation software (e.g. GIMP) - I found it handy to use the online tools I mentioned.

I have tested it on Windows but it should (fingers crossed) work on linux/unix as well.

If you create an animation I'd be happy to include it in my gallery if you wish. Just reply here.

Any feedback is appreciated!

Re: Context Free Animator

Posted: Sun Sep 13, 2015 1:01 am
by nik282000
Cool work, I took on a similar project today but went at it a completely different way.

After writing a CFGD that I liked I used Processing to generate the same code over and over while incrementing some of the variables.
Each iteration was saved to a new, numbered, CFDG file and a batch file was generated to render each of the CFDGs with the Context
Free Art command line interface. Once all the images were rendered I put them together with VirtualDub and Sony Vegas. It's really
ugly but lets me adjust any variable in the CFDG in any way (going to try some trig functions). I'll have to experiment with making
super high res videos, I tried to do an 8000x4500 animation but Sony Vegas kept running out of memory before it could fully render.

1080 Video: https://youtu.be/Eed1LVd5HXQ

Re: Context Free Animator

Posted: Thu Sep 24, 2015 11:24 am
by flembobs
Nice animation!

The technique you described isn't too different from how I did it. I just generated a temporary file for each frame and called Context Free using a python script instead of a batch file.

I've been wanting to put together a GUI for making the animations as well as implementing some more interesting rules for replacing text in the CFDGs. Maybe some day I'll have the time and determination!

Good luck with your project!

Re: Context Free Animator

Posted: Sat Sep 26, 2015 5:55 pm
by MtnViewJohn
Two things:

1) If you can express your frame-to-frame changes using the frame() or ftime() functions then you can get Context Free to output all of the frames in one operation.

2) You can pipe a generated cfdg file directly into cfdg on standard input if you specify '-' as the input file.

Re: Context Free Animator

Posted: Sat Sep 26, 2015 11:30 pm
by nik282000
I'll have to mess around with piping directly into CFDG and save my self a step (and 7,000 files in the recycle bin).

Some more reasonable results form my tinkering, Thanks, John, for the tip about randomization, it let me make those curling up trees.
https://www.youtube.com/watch?v=dg9KisUu744

Re: Context Free Animator

Posted: Fri Aug 17, 2018 2:04 pm
by flembobs
Hey I gave the FFmeg stuff another try. Put together this little animation:

https://twitter.com/GoshDarnGames/statu ... 6457335809

Here's the .cfdg for reference:

startshape WAVES[ h ( ftime()*360 ) ]//sat 1 b 1]

CF::Time = [time 0 1]

shape WAVES
{
loop i=480 [y -1]
{
ALPHA_WAVE ( i ) []
}
}


shape ALPHA_WAVE(natural n)
{
loop i=640 [x 1]
{
SQUARE[
h ((sine ( i ,1 , 0.25, 0 ) * 100) + ( sine ( n ,50 , 0.25, 0 ) ))
sat 1
b 1

]
}
}


sine(t,amp,freq,phase) = amp*sin((2*(22/7)*freq*t)+phase)