Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror
×
Graphics Software

Toolkits for 2D Animation? 21

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?"
This discussion has been archived. No new comments can be posted.

Toolkits for 2D Animation?

Comments Filter:
  • With Macromedia's Director (there may be a new name for the MX version), you can basically construct entire applications. You could integrate pretty much any application with it. The fact is, flash is going to be the best way to create part of it, even if you don't construct the entire program with it. The portability is another plus. Maybe a hybrid of java and flash would be in order if you're looking for ease of coding coupled with a reasonable amount of power and portability.
    • I'll have to disagree with using Flash. It's closed, it costs money, etc, etc. Use SVG [w3.org] 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 [sourceforge.net] and Graphviz [att.com]. 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 [ghostscript.com]. 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!

  • ...and you don't really need anymore than "good enough"...

    ...then WHY DON'T YOU JUST PICK ONE?

    If all you want to do is display simple "good-enough" 2D-animation, any 2D-toolkit would do. If you want zooming, etc, you will probably have to write that yourself, I can't imagine what features a 2D-toolkit could offer, that would avoid you having to write the actual code for display.

  • I know that people have been doing 2D animation in flash for a while now... we even have a new video series that uses it. ( Larry Boy [larryboy.com] ) I imagine you could throw something together using perltk and perl::flash to create flash movies. I haven't played with the perl::flash stuff, but I imagine it isn't too steep of learning curve. -Tim
  • The obvious answer (Score:3, Insightful)

    by MarkusQ ( 450076 ) on Sunday May 12, 2002 @08:15AM (#3505421) Journal

    Q: What would you use to build such an animation?

    A: A programming language. Say, C or C++?

    Seriously. Consider your criteria:

    Quick and dirty, that I can tune as needed.
    So to produce a frame, you have each "creature" draw themselves if they overlap the present view area. The detail of each creature's "look" is local to that creature, so you can tune/tweak it at need. Done.

    Zoom capability on a grid
    The "present view" data includes a view-center and a scale factor, which all the drawing primatives use to translate from world coordinates to screen coordinates. Clicking on a point on the grid may make that point the new screen center and increase/decrease the scale factor, depending on which "tool" (the magnifying glass, etc.) the user has sellected. Done.

    Pop up menus on any one grid element to get information.
    Trivial. When the mouse hovers, or they right click, or press control-yada-yada-cokebottle, or wahatever, pop up your menu. If you also want information about each creature, use a (perhap subtilly) different colour for each creature and check the colour of the creature under the mouse to determine what to pop up. Done.

    Scrolling, resizing, the typical.
    Done.

    Be able to hook to a C/C++ program to get a creature's behavior
    Done.

    It shouldn't take much longer to write than it took to ask the question, or to answer it.

    -- MarkusQ

  • Qt anyone? (Score:1, Insightful)

    by Anonymous Coward
    Funny you should ask this question...

    I just coded the front end to a networked AI simulation with creatures that play, eat, interact, etc. I basically did everything you said you wanted...2d grid with mouse zooming/panning, tweakable creatures, interfacing with c++ AI and network packages. Did the whole thing using Qt's 2d graphics library...was generally quite straightforward (albeit not the fastest). If you can deal with c++ coding I'd recommend it highly.

    Info can be found at http://www.trolltech.com
  • Java2D, SDL, OpenGL (Score:4, Informative)

    by ikekrull ( 59661 ) on Sunday May 12, 2002 @06:13PM (#3507416) Homepage
    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.

  • Sounds like fun (Score:4, Informative)

    by RevAaron ( 125240 ) <revaaron AT hotmail DOT com> on Sunday May 12, 2002 @08:49PM (#3507919) Homepage
    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.
    • Just remembered something... Within the stock Squeak image, are some classes that go under the heading "StarSqueak." StarSqueak is a Squeak port/analog of StarLogo, a Logo dialect aimed at big Logo-driven simulations with many (hundreds-thousands) of "turtles." In the Squeak version, the coding of the "Turtles" (agents) and the world is done in Smalltalk, rather than logo. Info [gatech.edu].
  • some pointers (Score:3, Informative)

    by g4dget ( 579145 ) on Monday May 13, 2002 @04:52AM (#3509066)
    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.
  • I know a guy working on this project:

    http://sourceforge.net/projects/lmljpeg/

    Part of the project includes what has been described as a "Multiplane camera", wbich emulates a stack of cels, which can be defined by XML data, and the individual cels can be programatically defined in C++, ie a cell that shows falling snow/rain/etc. It was originally intended for 2d cel animation, but may be workable for your purposes.

    The other part is a MJPEG software encoder/decoder for the zoran MJPEG chipset.

    BBK
  • Take a look at Jazz [umd.edu]. It has a 2D scenegraph and support for animation and zooming.

    Also, you might look at Squeak and Morphic [squeak.org].

All seems condemned in the long run to approximate a state akin to Gaussian noise. -- James Martin

Working...