Slashdot Mirror


Toolkits for 2D Animation?

profBill asks: "I work in the area of complex adaptive systems, that is understanding the emergence of complexity from the interactions of many elements (immune systems, economies, ecosystems, etc.). In particular we are using evolutionary computation to create elements/creatures that can co-exist in an ecosystem with certain interactions and relationships. All that is very interesting, but in the end, assuming we create such creatures, I have to show them to the ecologists and biologists so they can understand what is going on. The only way I can imagine doing it easily, other than with graphs and charts, is to create a 2D animation of the creatures and their interactions that these folks can watch. My problem is that there are so many choices for a toolkit to build such a 2D animation. My goal is not a movie of ILM quality, but something 'good enough'."

"'Good enough' for me means:

  • Quick and dirty, that I can tune as needed.
  • Zoom capability on a grid
  • Pop up menus on any one grid element to get information.
  • Scrolling, resizing, the typical.
  • Be able to hook to a C/C++ program to get a creature's behavior
What would you use to build such an animation?"

4 of 21 comments (clear)

  1. Re:Flash would work, right? Wrong! by ore · · Score: 1, Informative
    I'll have to disagree with using Flash. It's closed, it costs money, etc, etc. Use SVG instead. Being XML based it is simply a matter of constructing a text file and then running it through an viewer. If it turns out not to have the scope of primitives that you need you can try something else. However, I bet that you'll be able to do most of the animations that you have imagined with little difficulty.

    On a related note, I've concentrated quite a bit over the past year in generating charts and graphs to multiple output formats simultaneously. Of interest here are some new versions of old standard apps, Gnuplot and Graphviz. Both applications contain SVG output capabilities in their latest builds. I've been using both to generate both PNG, but also PS and SVG. I will generally convert the PS to PDF via Ghostscript. To me this represents an incredible time savings by allowing me to generate PNG's to act as thumbnails for the SVG and PDF versions of the same graph. Consider also the ability to nest SVG objects within a larger SVG picture (or animation). To aid in technical illustration you could actually embed SVG chart animations with the other custom 2D animations that you seek to create to further clarify the idea you are trying to present.

    Raster, vector and publication quality visualizations in one fell swoop without spending a dime. Schweet!

  2. Java2D, SDL, OpenGL by ikekrull · · Score: 4, Informative

    Both of these are crossplatform solutions for doing the kind of thing you require.

    Java2D is easier to develop with, especially if you are not a C/C++ person, and comes with a full set of widgets for supporting UI purposes.

    I might suggest you prototype your application in Java2D, and if you cannot extract useful speed out of it, to port to SDL or OpenGL, if you require interactive framerates.

    OpenGL is most often used as a 3D API, but using textured polygons (or compiled display-lists of lines/polygons for better zooming/resolution independence) for your elements in orthographic projection will provide optimum performance on a plaform with hardware 3D acceleration.

    However, properly written, there is no reason why Java will not provide you with adequate-to-good speed.

    There is also no reason why you couldn't do this with GTK, Qt, etc.

    Really, you should be looking at this from the point of view of 'which language do i feel most comfortable with, and is there a mature 2D graphics libabry for this language?' If so, use it.

    --
    I gots ta ding a ding dang my dang a long ling long
  3. Sounds like fun by RevAaron · · Score: 4, Informative

    I did an REU last summer analyzing various ecology-oriented datasets collected in beaver meadows. One of the things we used for this analysis was an application I wrote for visualization. 10 plots in the window, scrolled in unison, click to get details on each point, zoom-in and out &c. In any case, this got me excited, and I've been searching for an existing model of an ecological system for which I could create a plugin for my visualizer.

    My setup for the 2D non-animated data browser I created: Squeak 3.0 with some classes borrowed (PlotMorph) and a bunch of others that I wrote myself.

    I've not started my animation/modeling work yet, that will be something I'll be working on after finals for a fun project. But my software setup will be the same, but manipulating the information and thus changing the direction of the modeled and animated creatures in real-time.

    I may do this using Alice3D, which is a 3D environment within Squeak, or just by using the native GUI toolkit of Squeak, Morphic, which really accommodates doing this kind of work. 2D animation is trivial. You just have each object have a #step method that applies whatever needed changes are required, and a #stepTime method that determines what the interval between updates is.

    If you're a C/C++/Java bigot, Smalltalk may come as a bit of a shock. But if you're interested in the best tool for the job, and are looking for an intuitive way to do 2D modelling and animation, Squeak is definitely worth evaluation.

    You can email me if there's any other questions you have about my work, or about how useful Squeak is for this kind of stuff- I'd be happy to help.

    --

    Working toward a usable PDA environment in the spirit of Newton OS: Dynapad
  4. some pointers by g4dget · · Score: 3, Informative
    Here are some pointers:
    • Look into Swarm: it's a complete simulation environment, from your institution even, and includes graphics.
    • Look for toolkits for doing "sprite animation" on Freshmeat (there is almost certainly something for SDL).
    • Look into one of the structured graphics toolkits, like the one that comes with wxWindows. There are also several for Java.
    • Look into OpenGL; it's easy to use.
    • Look into the 3D game toolkits (like Crystalspace) and use them in a 2D manner.