Log in

View Full Version : Arctic Animation


noiv
15th June 2009, 08:57
The 2009 Arctic melting season has started and I want to create an animation based on daily satellite photos. I've checked some tools already, but only AviSynth seems to have the needed functions, at least from the examples I've seen. However, I need some help or better a starting point.

The first photo of this year is available here :

http://rapidfire.sci.gsfc.nasa.gov/subsets/?mosaic=Arctic.2009077.terra.4km.jpg

The photos are actually concatened using several fly-over of the satellite during a day. At this time (18/03/09) the sun light does not reach the pole, that's the shrinking white spot in the middle. I'm only interested in land, ice and sea areas and not in clouds. Fortunately the same photo exists with other colour bands including infra-red.

http://rapidfire.sci.gsfc.nasa.gov/subsets/?mosaic=Arctic.2009077.terra.367.4km.jpg

or from 13/06/09 to see the difference:

http://rapidfire.sci.gsfc.nasa.gov/subsets/?mosaic=Arctic.2009164.terra.367.4km.jpg

This bands (367) allow to distinguish between clouds (white), land (green), sea (dark), ice (light red) and melting ice (dark red).

My idea is to use the first photo (day 77) as picture #1 then copy it to pic #2 and replace everything with day 78 where the band 367 pic of day 78 does not indicate clouds. The result will be the template for pic #3 and so on.

How can this be done with AviSynth?

The photos have enough resolution to get a pretty 720p animation and at the end there will be around 220 pictures. Is it possible to use blending to achieve a smooth animation with dates? Btw. all NASA photos are in the public domain.

Many thanks for any ideas or examples.

Ajax_Undone
15th June 2009, 09:00
Do you want them to be real or 3d Animation.

Cause the photos would not be enough to create a very long animation if its only one photo every so often...

Suppose an alpha overlay of each photo in sequence would give the result you are looking for... But like i said 220 photos 9.1 seconds @ 24fps so it would not be a very long animation.

noiv
15th June 2009, 12:47
The animation should run as 2D - same projection. It is easier to add more layer (latitudes, etc).

I was hoping to somehow blend in new days, so let's say 1sec per picture.

Not possible?

Sagekilla
15th June 2009, 17:09
You could do transitions from one day to another, slowly blend it so you have 100% of day N, then blend it slowly to 100% of day N+1 and 0% of day N.

noiv
15th June 2009, 18:14
But how can I include the color mask thing into the blending?

noiv
28th June 2009, 14:19
I made huge progress (http://www.youtube.com/watch?v=C4ZsGo0F6Lk), but now I believe I'm stuck within fields and frames. The current result looks quite promising - a cloud free melting arctic - except a strange jitter. If I look frame by frame only every second frame is very close.

Hopefully there is an expert able to help me to make it more smooth. In that case there is a zip (13mb) (https://files.getdropbox.com/u/354885/arctic/arctic.zip) with the two source videos.

Many thanks in advance!

nPics = 100
nColor = $E5E0CD
nTolrnz = 120
nSize = 384

vTerra = AviSource("384 terra xvid.avi").ConvertToRGB32()
v367 = AviSource("384 367 xvid.avi").ConvertToRGB32()

##pStart = vTerra.Trim(0, -1)
vSource = vTerra.Trim(1, 0)
pStart = BlankClip(1, nSize, nSize, "RGB32", color=0)

vMask = ColorKeyMask(ResetMask(v367), nColor, nTolrnz).Trim(1, 0)
vMask = Mask(vSource, Invert(Invert(ShowAlpha(vMask))))

function doStack(clip vStack, clip vMask, int counter, int limit){

pLast = vStack.Trim(vStack.framecount - 2, 0)
pMask = vMask.Trim(counter, -1)
pNew = Layer(pLast, pMask, "Add")
pNew = pNew.SubTitle(string(counter), align=1)

return (counter == limit) ? vStack + pNew : doStack(vStack + pNew, vMask, counter + 1, limit)
}

vFinal = doStack(pStart, vMask, 0, nPics)

vFinal ##.AssumeFPS(1).ConvertFPS(10)