Morph module

BlitzMax Forums/BlitzMax Programming/Morph module

PantsOn(Posted 2007) [#1]
After a recent request on the forums I decide to write a morphing module.

This module allows you to morph pixmaps and images in real time.


Archive contents..
1) Module - compiled into windows only at the mo. Will compile to linux when I get my mepis working.
2) example project showing you how to use the commands.
3) A morph gui. This will help you create morphs for your images.
4) docs.

[NEW LINK]
http://rapidshare.com/files/42724177/morph.rar.html
[NEW LINK]

Currently there isn't much error checking.
NB. If you have an image with 4*4 morph points, then it must be morphed to another image with 4*4 morph points.

If you have any question.. post them up here.
cheers
Rich


PantsOn(Posted 2007) [#2]
optimised drawing now with error checking.

lastest link at top of thread


Canardian(Posted 2007) [#3]
I don't see any difference between the first and the last image.


PantsOn(Posted 2007) [#4]
lol


MGE(Posted 2007) [#5]
From the grabs, this appears to be "cross fading" via alpha channels rather than morphing.


ImaginaryHuman(Posted 2007) [#6]
It's just that he hasn't chosen enough control points or mapped them onto the two faces closely enough. Mostly morphing is just a cross-fade, combined with spacial movements and deformations of areas of the image. It looks about right but a better example would improve the appearance. Also it looks a big `jaggy`. Does it use floating point operations or integer?


MGE(Posted 2007) [#7]
yikes.. please excuse my ignorance then. If he's doing what AD said, then this could prove to be an awesome module!


PantsOn(Posted 2007) [#8]
the pixels move and cross fade at the same time.
The rar contains an example of a morph grid of 8*8. The above picture is 4*4. The movement is a lot better in that example.

example morph files are 03a.txt and 03b.txt for the source and destination pictures respectively.

all the operations are floating point. I'll see what I can do this weekend to make it smooother.

The rar has quickly been stuick together and I'll try to get a better release soon.


SculptureOfSoul(Posted 2007) [#9]
Okay, I put the pantson.mod folder in the mod directory, but am getting an error when trying to compile the example program. I get a bunch of undefined reference to brl_pixmap_ functions.

I'm sure I'm just forgetting something. It's been a long time since i've used Blitz and am trying to get back into the swing of things.


Damien Sturdy(Posted 2007) [#10]
Cripes, neat :D


PantsOn(Posted 2007) [#11]
my fault...
I've got an optimised pixmap writepixel and readpixel in my brl.pixmap module.
I will have to update the code accordingly later at home.

Thats what happens when I rush modules out. :-(


PantsOn(Posted 2007) [#12]
OK new mod been uploaded.
see the link at top of the thread.

updates..
1) Removed optimised writepixel calls and replaced them with code in the module.
2) Tested on a new install of blitzmax
3) morph.bmx added to module

have fun