Log in

View Full Version : *generation* of 'motion trails'


namke
30th January 2006, 23:55
I'm attempting to get a certain effect, but I'm a newcomer to AviSynth, so think I'm probably doing this the wrong way... What I've got is a long stationary shot with traffic/people moving, and I want to have the moving objects leaving trails behind them (lasting a number of seconds for example). What I've got so far is this, but it's slow :)


a = DirectShowSource("clip.avi")
b = Trim(a,4,0)

bb = overlay(b,a, x=0,y=0,mode="blend",opacity=0.7)

c = Trim(bb,8,0)
cc = overlay(c,bb, x=0,y=0,mode="blend",opacity=0.7)

d = Trim(cc,16,0)
dd = overlay(d,cc, x=0,y=0,mode="blend",opacity=0.7)

e = Trim(dd,32,0)
overlay(e,dd, x=0,y=0,mode="blend",opacity=0.7)


Any thoughts on this?

This version gives 16 discrete images, fading over time -but I'd like to have more... ;)

Thanks,

Mug Funky
31st January 2006, 02:40
there's a couple of ways to do this.

if you don't want to install any plugins, try:

temporalsoften(radius,255,255,32)

where "radius" equals number of frames in each direction (ie "5" will give an average of 11 frames - 5 before and 5 after).

if you want something slightly faster, download clouded's (mg262's) "motion" plugin and use:

blendfps(last.framerate,radius)

where radius is the same as temporalsoften (it might be half this actually... i never checked).

[edit]

if you'd like discrete images like you've got above, try:

selectevery(1,-32,-16,-8,-4,0).temporalsoften(2,255,255,255).selectevery(5,2)

namke
31st January 2006, 15:21
Thanks for that - I'll give it a try when I get home :)