fix V1/V2 naming, handle animation players, don't use blank, results in white
This commit is contained in:
parent
4058ac84c1
commit
ff752a1818
3 changed files with 49 additions and 25 deletions
40
render.py
40
render.py
|
|
@ -111,12 +111,9 @@ def compose(clips, target=150, base=1024, voice_over=None):
|
|||
|
||||
if "foreground" not in clip and "animation" in clip:
|
||||
fg = clip['animation']
|
||||
transparancy = 1
|
||||
else:
|
||||
fg = clip['foreground']
|
||||
if 'foley' in clip:
|
||||
foley = clip['foley']
|
||||
else:
|
||||
foley = fg
|
||||
if 'foreground2' in clip:
|
||||
if 'foreground3' in clip:
|
||||
n = seq()
|
||||
|
|
@ -128,12 +125,16 @@ def compose(clips, target=150, base=1024, voice_over=None):
|
|||
clip['foreground3']
|
||||
elif chance(seq, 0.5):
|
||||
fg = clip['foreground2']
|
||||
|
||||
scene['front']['V1'].append({
|
||||
transparancy = seq() / 10
|
||||
if 'foley' in clip:
|
||||
foley = clip['foley']
|
||||
else:
|
||||
foley = fg
|
||||
scene['front']['V2'].append({
|
||||
'duration': clip['duration'],
|
||||
'src': fg,
|
||||
"filter": {
|
||||
'transparency': seq() / 10,
|
||||
'transparency': transparancy,
|
||||
}
|
||||
})
|
||||
|
||||
|
|
@ -145,15 +146,16 @@ def compose(clips, target=150, base=1024, voice_over=None):
|
|||
else:
|
||||
transparency_back = transparency
|
||||
transparency_front = 0
|
||||
transparency_original = seq() / 10
|
||||
if "background" in clip:
|
||||
scene['front']['V2'].append({
|
||||
scene['front']['V1'].append({
|
||||
'duration': clip['duration'],
|
||||
'src': clip['background'],
|
||||
"filter": {
|
||||
'transparency': transparency_front
|
||||
}
|
||||
})
|
||||
scene['back']['V1'].append({
|
||||
scene['back']['V2'].append({
|
||||
'duration': clip['duration'],
|
||||
'src': clip['background'],
|
||||
"filter": {
|
||||
|
|
@ -161,27 +163,33 @@ def compose(clips, target=150, base=1024, voice_over=None):
|
|||
}
|
||||
})
|
||||
else:
|
||||
scene['front']['V2'].append({
|
||||
'blank': True,
|
||||
scene['front']['V1'].append({
|
||||
'duration': clip['duration'],
|
||||
'src': clip['animation'],
|
||||
"filter": {
|
||||
'transparency': 0,
|
||||
}
|
||||
})
|
||||
scene['back']['V1'].append({
|
||||
'blank': True,
|
||||
scene['back']['V2'].append({
|
||||
'duration': clip['duration'],
|
||||
'src': clip['original'],
|
||||
"filter": {
|
||||
'transparency': 0,
|
||||
}
|
||||
})
|
||||
|
||||
scene['back']['V2'].append({
|
||||
scene['back']['V1'].append({
|
||||
'duration': clip['duration'],
|
||||
'src': clip['original'],
|
||||
"filter": {
|
||||
'transparency': seq() / 10,
|
||||
'transparency': transparency_original,
|
||||
}
|
||||
})
|
||||
# 50 % chance to blur original from 0 to 30
|
||||
if chance(seq, 0.5):
|
||||
blur = seq() * 3
|
||||
if blur:
|
||||
scene['back']['V2'][-1]['filter']['blur'] = blur
|
||||
scene['back']['V1'][-1]['filter']['blur'] = blur
|
||||
scene['audio']['A1'].append({
|
||||
'duration': clip['duration'],
|
||||
'src': clip['original'],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue