Every now and then, playing with Flash animations is an itch I've just got to scratch. This time, I looked back on the method I used in one of my earlier tutorials. The next logical step was to write a script that automates the whole process, turning a POVRay scene into a Flash animation in a single step.
The script method I used is quite simple: It takes a POVRay scene with the variable "FACT" declared in various places, loops through 0-to-350 for the variable (changing the rotation of abjects controlled by "FACT"), generates the frames, uses Image Magick to crop the frames to 240x240 squares, saves them in sequence, builds the Flash script, and calls the swfc compiler to compile it.
Before anybody asks "Why don't you just use png2swf for that last step?" - I tried it, but the animation comes out much choppier.
Very efficient, although limited in what it can produce without some fancier POVRay programming. But I think I've lost everybody now, so I'll just post what I've produced so far.
First a simple heart animation, done just a tad late for Valentine's:
Next, one of those "I wonder what this would look like?" moments hit, and I slapped some multicolored nodes into a blob object and ran the script:
I have no idea what I made there, but I promise not to let it get loose and terrorize the world. Next, I put a little effort into designing some clockwork gears:
Ooooh! This last one is a keeper. I'll drop that into the sidebar Flash gallery after it falls off the front page.
By the way, b2evolution's software hates embedded objects with a passion and I have to hack it mercilessly to get it to display at all, so if you don't see anything, let me know on what browser/platform. Sloppy of me today, I know.
Here's a tarball of the script, hereby known as "POV2SWF.sh". I'm only putting it up to say I did; I don't expect it to be useful to anybody. To make it work, you need POVRay (and some coding savvy), Image Magick, and SWFTools.
Why do I get the feeling, whenever I work with POVRay and SWFTools, that I'm blazing my own trail into the wilderness here that's too far out for anybody to even catch up with me?
blog comments powered by Disqus