 |
Author |
Topic: Pretty generators (Read 2081 times) |
|
verd
|
Pretty generators
« on: Jan 4th, 2005, 10:26pm » |
|
Hey there. I'm a student studying visual arts at college, with an incomplete degree in software engineering. I handed this in for my final assignment in colour class. http://personal.nbnet.nb.ca/shan80/ Watch it for a long time. The longer it runs, the better it looks. Especially if it starts to change colours. I think I may have to keep going with this Processing stuff... Oh, and is there any way for me to compile a movie clip out of this by running it for a long time, then have it run at the proper framerate in say, an mpeg?
|
« Last Edit: Jan 4th, 2005, 10:27pm by verd » |
|
|
|
|
rgovostes
|
Re: Pretty generators
« Reply #1 on: Jan 5th, 2005, 4:18am » |
|
You can call saveFrame() every X frames (or every frame, knock yourself out) and simultaneously keep a running average of the framerate. The formula would be... Code:// global vars int frame, rate_total; int saveonframe = 10; // saves every 10th frame // each iteration of loop void loop() { // draw stuff if(frame ++ % saveonframe == 0) { saveFrame(); rate_total += framerate(); } } // at end of program, do: println( rate_total / (frame / saveonframe) + " fps"); |
| So, now you'll have a folder full of images and an estimated fps speed. In QuickTime Pro, do "Open Image Sequence" and select one of those images. It will ask you what you want the framerate to be, enter the fps. Then use Export to save it as a video in the desired codec. Alternatively, you could use one of the screen capture programs mentioned elsewhere on this site, which will not get a full framerate and will slow down the program, but will not take as much temporary space.
|
|
|
|
verd
|
Re: Pretty generators
« Reply #2 on: Jan 6th, 2005, 8:43pm » |
|
Alright, here I run into another problem. saveFrame() should work great for me, except it only works for apps. Problem is, unless I run it in a browser, it slows down until it crashes on me. In a browser, or at least in firefox, it runs and runs indefinately, just chunks down to a slow speed. So is there any workaround so that I can get saveFrame() to work even though I'm running it from a browser?
|
|
|
|
|