2D Morphing Example?

Blitz3D Forums/Blitz3D Programming/2D Morphing Example?

jfk EO-11110(Posted 2005) [#1]
Do we have any traditional 2D morphing example code? Probably something that has an option to automorph, without the need to set points manually?

I need this to create slowmotion movies. What I already have is simple interpolation, but since this mixes two frames, it looks blurry. Imagine when it's played with a 16x interpolation, the image goes sharp-blured-sharp-blured...

Any ideas?


jfk EO-11110(Posted 2005) [#2]
Well right now I am not sure if such a thing exists at all. Morphing IS based on points and lines, so it's pretty impossible to morph without some reference points.

Although I was thinking about a method that would take a significant pixel (kind of a natural Motion tracking marker, like a highlight or something) on Pic 1 and search for a similar pixel or area nearby on Pic2, then let the area travel and scale to it. Probably this won't work with a lot of movie material.


Pongo(Posted 2005) [#3]
Don't know if this is of any help, but here goes. If you are looking for code to do this you can probably just ignore this message, as it will not be of much help.

If I understand you correctly, you want to be able to take frames of video, and create interpolated frames so that The video can be played in ultra-slow motion, right? I know of 2 programs that do this, although they are both quite expensive,... they are Twixtor, and ReTimer. Twixtor is a plug-in for After effects and runs around $500-600,... I believe retimer is a stand alone app, and it runs closer to $2000. In any case, I believe both of these programs essentially do a per-pixel motion track on the images to create the in-betweens, And both still need a bit of work to get everything working right. The biggest problem is when not everything is moving in the same general direction, and there is overlap of motion, then the leading edges get all screwed up.
The easiest way to fix this is isolate the pieces (By using something like a bluescreen shot) Slowing it down, and then compositing it back together. This is how I have accomplished these effects in the work I do.

If you look for the websites of the programs I mentioned above, you should find some great examples, and with any luck maybe get some more insight for making your own version.

I would guess the basic flow would be as follows:
1. compare two images and create a vector flow map. Piece of cake right? ;) For even more accuracy, you would need to compare multiple images to create curved flows
2. Use the flow map to move the pixels from one image to the next, while doing a cross dissolve to blend it together better.


jfk EO-11110(Posted 2005) [#4]
Very interesting, thanks. That's exactly what I'm looking for, only I need it for free :) But it's good to see that it exists, although with the problems I have already expected (and infact they are the reason why I didn't start coding something). Because if you have to seperate a lot of objects with chromakeys etc., it may be easier to use morphing right away.

I have also though about a simple solution: when you have 15 simple blended tweenframes (that's 16 times slower), you could add a second video track with the same clip, but using an 8 frames offset, so the blur-sharp-blur artifact would be hidden. Although it would be unsharp all the time, but hey, this maybe looks like motion blur.

I just need an easy solution that won't drive me crazy and looks good enough for low/no budget productions. For huge sea waves or pyro FX that have been miniaturized, so it should be recorded with a highspeed camera, in theory, but of course, DVCams can't do that.

Anyway, interesting info, thanks.