You are not logged in.

#1 2008-09-14 10:57:59

dav7
Member
From: Australia
Registered: 2008-02-08
Posts: 674

Looking for an "scheduled animation"-oriented language

Hi guys.

I use PHP for basically EVERYTHING I do, such as writing IRC bots, servers, etc - projects that should never see the light of day because they're written in PHP. So I recently decided to have a dabble with PHP and animation. I got a cool idea of the "I wish you could..." category (that could never be done) and although the conceptualization was quite deep, the animation itself couldn't be simpler. So I tried to animate it. Using... PHP.

Right.

So, I got as far as digging out an old code snippet that figures out where the mouse position is (which is written in C, for the sole reason that PHP has no X11 bindings), and making it all "work" so that it tracked and recorded mouse movements, and then I wrote some PHP on top of that that used the GD image library to use this tracking info to render a moving a box as a series of PNG image "frames" (which I play with `mplayer mf://*.png'), which would later be a picture of a mouse cursor in the "final product", moving across my screen as part of the animation.

I kinda gave up at the point where I accepted that since the mouse was moving across a webpage in my browser, the cursor would change at certain points, and since I am really, really loathe to (read: really scared of) C, I know basically nothing about it, so the idea of writing an event-based thingy to figure out all of the cursor X and Y position; the time in seconds and milliseconds (so I know what position lines up with what frame relative to time); as well as the cursor shape... just made my head mentally spin in a major kind of way.

But unless I did that, I'd have to view each generated image in feh (these'd be ~1000x1000 images, and images of that kind of size take roughly 2 seconds to open/switch to in feh), and figure out where the mouse hit the text, and then mark that frame, and then when it hit that link, and then switched back to the text again, and then hit the other link... agh!!

So, without a doubt, I've decided that PHP is a Very Bad Idea for this project. tongue

BUT... I've been bitten by the animation bug. I've wanted to do animation all my life, and this was my first venture into it. So I'm asking you guys, what language, for Linux, is either all about animation, or has gigantically extensive scheduled animation libraries/bindings?

And by "scheduled", I don't mean that in the sense that the animation I want to make is like Finding Nemo. I mean that in the sense that I want the routines to run such that they use all of my 2.66GHz P4's capacity and all of my 495MB (:() of RAM until all the frames are done. So no realtime, rendering-into-a-window-I-can-see-as-it-draws stuff. Just eat CPU and RAM (and swap big_smile) until we're done. And I want it to render either to an AVI, or 3247652986528824385623 PNGs - something I can get mplayer to play at full framerate (but this may not be possible, I use fail-ware Intel integrated graphics that have no Linux support - believe me, I haven't even tried to make this garbage work with direct rendering until now).

But resources aside, I want something that's REALLY fast from a code perspective. Assembly language routines for the math-related stuff would be great, but C routines work too.

At the other end of the speed spectrum I'll leave you 3Drotate, a script that does a pile of math in, of all things, bash, to rotate still images on an axis so that they "set" into the screen like this sample image (not rendered with 3Drotate afaik - I grabbed it from google images). To render something like that using 3Drotate, but using a 1280x1024 image, it takes my PC 30 seconds. I don't know if that's simply because I have ~100MHz-ish RAM (~2GB/s as opposed to ~8GB/s for "today's" RAM) and have a 133MHz FSB, but I think it has something to do with that script's frightful overusage of bc. At any rate, I don't want to have to wait a full 30 seconds for something like that to render - I'd imagine that even with my system, 5 seconds would be enough for a large-ish image?...

-dav7

Last edited by dav7 (2008-09-14 11:06:30)


Windows was made for looking at success from a distance through a wall of oversimplicity. Linux removes the wall, so you can just walk up to success and make it your own.
--
Reinventing the wheel is fun. You get to redefine pi.

Offline

#2 2008-09-15 01:13:21

dav7
Member
From: Australia
Registered: 2008-02-08
Posts: 674

Re: Looking for an "scheduled animation"-oriented language

Hi, bump tongue

-dav7


Windows was made for looking at success from a distance through a wall of oversimplicity. Linux removes the wall, so you can just walk up to success and make it your own.
--
Reinventing the wheel is fun. You get to redefine pi.

Offline

Board footer

Powered by FluxBB