![]() |
|
Fluid Morphing for 2D Animations |
Hyena_
Member #8,852
July 2007
![]() |
For the original demo of the library I used Allegro 5 and thus I believe I have good reasons to create this topic here. What is more, on page 16 of the original paper I refer to the allegro.cc forums. The thesis is primarily dedicated to game developers and thus I believe these forums suit well for such an announcement. You can download the source code here: I also suggest checking out my blog entry: http://www.hyena.net.ee/?p=199 Development footage featuring Allegro 5 is below: Some notable results produced with the atomorph library:
|
Arthur Kalliokoski
Second in Command
February 2005
![]() |
Very impressive! Can images be morphed in real time? They all watch too much MSNBC... they get ideas. |
Hyena_
Member #8,852
July 2007
![]() |
Real time morphing is possible and all the development footage is actually real time!
|
J-Gamer
Member #12,491
January 2011
![]() |
That was an interesting read If I have the time, I'm definitely going to play with this. " There are plenty of wonderful ideas in The Bible, but God isn't one of them." - Derezo |
Neil Roy
Member #2,229
April 2002
![]() |
Very nicely done. --- |
Edgar Reynaldo
Major Reynaldo
May 2007
![]() |
You've got some pretty great results here! I downloaded your pdf and src. I will be sure to read them over later. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
beoran
Member #12,636
March 2011
|
Wow, this looks great. Is it all MIT licensed? I'll probably try to port it to C so I can use it in my own game engine.. |
Chris Katko
Member #1,881
January 2002
![]() |
Oh, my gosh. This is absolutely amazing. This may or may not go perfectly with my previous goal of creating a 2-D in 3-D sprite engine. Basically, skeletal animation for 2-D linkages plus "doom style" billboard sprites (for each "limb" piece) that change for given camera angles. "Morphing" could provide intermediate stages to reduce source sprite development time and provide un-intuitive merges. The goal would be fluid isometric skeletal animation, ala Crusader: No Remorse with unlimited sprites. {"name":"2-00-03.jpg","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/8\/b\/8b66245c5e68f9eea46e8c167caf4595.jpg","w":640,"h":480,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/8\/b\/8b66245c5e68f9eea46e8c167caf4595"} Here's a preliminary question: Is it possible to "morph" to an intermediate stage between 3 (or more) different pictures? Lastly: How did you get approved to do a Master's thesis on 2-D sprites? -----sig: |
Edgar Reynaldo
Major Reynaldo
May 2007
![]() |
I would love to build this, but MinGW 4.8.1 doesn't support std::thread yet, even though the <thread> header is there. Or else I'm doing something wrong trying to compile it. I can't even get this : #include <thread> int main(int argc , char** argv) { std::thread t; return 0; } to compile, even with -std=c++11 or -std=gnu++11. It says 'thread is not a member of namespace std'. Couldn't you just use pthreads, instead of trying to support experimental features? My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
Chris Katko
Member #1,881
January 2002
![]() |
Hyena_: Hey, did you ever file that std::modf bug with GNU? Edgar Reynaldo said: Couldn't you just use pthreads, instead of trying to support experimental features? Or, you know, use a development platform that includes support for modern features. Perhaps you should update MinGW? -----sig: |
Yodhe23
Member #8,726
June 2007
|
Reminds me of Kai's power tools photo morpher that was all the rage back in the mid-late 90's. www.justanotherturn.com |
Slartibartfast
Member #8,789
June 2007
![]() |
Edgar Reynaldo said: Or else I'm doing something wrong trying to compile it.
You might be, this compiles fine for me with MinGW. 1Using built-in specs.
2COLLECT_GCC=g++
3Target: i686-w64-mingw32
4Configured with: ../../../src/gcc-4.8.0/configure --host=i686-w64-mingw32 --buil
5d=i686-w64-mingw32 --target=i686-w64-mingw32 --prefix=/mingw32 --with-sysroot=/t
6emp/x32-480-posix-dwarf-r2/mingw32 --enable-shared --enable-static --disable-mul
7tilib --enable-languages=c,c++,fortran,lto --enable-libstdcxx-time=yes --enable-
8threads=posix --enable-libgomp --enable-lto --enable-graphite --enable-checking=
9release --enable-fully-dynamic-string --enable-version-specific-runtime-libs --d
10isable-sjlj-exceptions --with-dwarf2 --disable-isl-version-check --disable-cloog
11-version-check --disable-libstdcxx-pch --disable-libstdcxx-debug --disable-boots
12trap --disable-rpath --disable-win32-registry --disable-nls --disable-werror --d
13isable-symvers --with-gnu-as --with-gnu-ld --with-arch=i686 --with-tune=generic
14--with-host-libstdcxx='-static -lstdc++' --with-libiconv --with-system-zlib --wi
15th-gmp=/temp/mingw-prereq/i686-w64-mingw32-static --with-mpfr=/temp/mingw-prereq
16/i686-w64-mingw32-static --with-mpc=/temp/mingw-prereq/i686-w64-mingw32-static -
17-with-isl=/temp/mingw-prereq/i686-w64-mingw32-static --with-cloog=/temp/mingw-pr
18ereq/i686-w64-mingw32-static --enable-cloog-backend=isl --with-pkgversion='rev2,
19 Built by MinGW-builds project' --with-bugurl=http://sourceforge.net/projects/mi
20ngwbuilds/ CFLAGS='-O2 -pipe -I/temp/x32-480-posix-dwarf-r2/libs/include -I/temp
21/mingw-prereq/x32-zlib/include -I/temp/mingw-prereq/i686-w64-mingw32-static/incl
22ude' CXXFLAGS='-O2 -pipe -I/temp/x32-480-posix-dwarf-r2/libs/include -I/temp/min
23gw-prereq/x32-zlib/include -I/temp/mingw-prereq/i686-w64-mingw32-static/include'
24 CPPFLAGS= LDFLAGS='-pipe -L/temp/x32-480-posix-dwarf-r2/libs/lib -L/temp/mingw-
25prereq/x32-zlib/lib -L/temp/mingw-prereq/i686-w64-mingw32-static/lib -L/temp/x32
26-480-posix-dwarf-r2/mingw32/opt/lib'
27Thread model: posix
28gcc version 4.8.0 (rev2, Built by MinGW-builds project)
Specifically of interest is "enable-threads=posix", maybe your binary is built without threading support? ---- |
Hyena_
Member #8,852
July 2007
![]() |
I might not have enough personal motivation to continue the development, thus I decided to at least deliver the proof of concept for the interested parties to see as an inspiration. The atom cloud morphing is a really simple concept and could just be implemented application-specifically. Many game developers prefer to build their own sprite engine for example. Atom cloud morphing should be seen as a potential side aspect of that engine instead of a separate library. I've never been part of any open source project development and I'm mostly a solo programmer. However, should the atomorph library spark interest in some veteran open-source developers I'd be happy to cooperate. For that purpose I have registered the domain names atomorph.org and atomorph.com. Answering all the questions made so far. Is it all MIT licensed? Is it possible to "morph" to an intermediate stage between 3 (or more) different pictures? How did you get approved to do a Master's thesis on 2-D sprites? Couldn't you just use pthreads, instead of trying to support experimental features? Hyena_: Hey, did you ever file that std::modf bug with GNU?
|
Chris Katko
Member #1,881
January 2002
![]() |
One more thing. You said it runs on real-time, which is GREAT! Did you try a load test to see at what point it became slow? 10, 100, 1000 sprites, etc? And on what hardware did you test this on? -----sig: |
Edgar Reynaldo
Major Reynaldo
May 2007
![]() |
@Slartibartfast Stack overflow said: Plain MinGW cannot support std::thread. You will need to use a MinGW-w64 toolchain (such as those shipped with Qt 5) that has "posix" threading enabled, so that libstdc++ exposes the <thread>, <mutex> and <future> functionality. You can find an installer here, but you can also try just replacing the whole mingw toolchain root folder with one of these packages. You can choose 32- or 64-bit, remember to select threads-posix if you want to play with std::thread and friends. No special compiler options other than the ones you already have are needed. I do suggest using -std=c++11 if you don't need GCC 4.6 compatibility.
That's a real pita. I just upgraded to 4.8.1 not that long ago for C++11 support and it turns out it doesn't actually have full support. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
pkrcel
Member #14,001
February 2012
|
You simply have to switch to a mingw-64 toolchain, no need for it to be a 64-bit one thou. Plain Mingw is outdated and behind. It is unlikely that Google shares your distaste for capitalism. - Derezo |
Edgar Reynaldo
Major Reynaldo
May 2007
![]() |
Well I have MSYS2 and mingw-w64 installed, and it successfully built the library and atomorph.exe. I'll try them out later. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
Chris Katko
Member #1,881
January 2002
![]() |
Personally, I do all my development in a Linux VM inside Windows 7. I didn't use to, but I love it now. -----sig: |
Hyena_
Member #8,852
July 2007
![]() |
Chris Katko: I have not load tested it. Once you have computed a morph of satisfactory quality you can stop seeking for better morphs and just use the one you have found. It will no longer consume processing power. However, if you also enable fluid simulation then it gets pretty slow. edit: For example, a "rotating" green star is produced with the following script: 1#!/bin/bash
2# ImageMagick is needed for these tests to run properly.
3
4cd output
5
6# TEST 1: Rotation
7# Intuitively, this test should generate a
8# perfectly rotating star. However, instead
9# it generates interestingly anomalous yet
10# smooth rotation.
11TITLE="rotation"
12../../atomorph -f test_${TITLE} -i ../data --blobs-as-texture shape_1.png shape_2.png shape_3.png shape_4.png shape_5.png shape_6.png -F 48 --verbose -t 255 -M 1 -O 10 -D 2
13convert -channel A -threshold 99% -delay 10 -loop 0 -dispose background test_${TITLE}_*.png test_${TITLE}.gif
14montage test_${TITLE}_*.png -tile 8x6 -geometry 64x64+1+1 -frame 3 -background white -bordercolor white montage_${TITLE}.png
15rm test_${TITLE}_*.png
16convert montage_${TITLE}.png -background white -flatten montage_${TITLE}.jpg
17rm montage_${TITLE}.png
|
|