I made this script to create this effect: http://vimeo.com/24048325
- Do a timelapse shoot in the night at a street
- Subtract an unluminated picture of the street from the rest of the pictures (can be done in VSE)
- Use this script to create the right setup in the VSE for the sustaining light streaks.
import bpy, os
dir="/path/" # files must be in the form ####.png
picture_start = 1 # index number of the first image
picture_end = 76 # index number of the last image
distance = 7 # distance of frames between two pictures
glowing_frames = 38 # number of frames a certain picture fades out
exponent = 1.5 # exponent for opacity (1 = linear decrease)
# get important variables
editor=bpy.data.scenes[0].sequence_editor
seq=editor.sequences
decr = 1 / glowing_frames
for opac in range(0,glowing_frames):
f = 1
for i in range(picture_start,picture_end):
frame=[{"name":format(i, '04d') + ".png"}]
bpy.ops.sequencer.image_strip_add( \
directory = dir, \
files = frame, \
frame_start=f+opac, \
frame_end=f+opac, \
channel=opac+2, \
filemode=9)
f += distance
if (opac > 0):
seq=editor.sequences
strip = seq[format(i, '04d') + "." + format(opac, '03d')]
strip.blend_type = 'ADD'
strip.blend_alpha = (1.0 - decr * opac)**exponent
else:
strip = seq[format(i, '04d') + ".png"]
strip.blend_type = 'ADD'