Musitektus
30th August 2006, 09:27
I made a clip with a very complex series of overlays and fading masks. After a lot of tweaking I got it all working right, except for a small section. I've isolated that portion of the script below.
Within the context of the entire script, this portion of the clip displays correctly, but flickers randomly (the topmost layer shows in one frame, but not the next, then back again for 2 frames, gone again, only partially showing in the upper left part of the frame, suddenly back to normal, etc. in an apparently random fashion)
The randomness of which frames it decides to show correctly in is strange enough, but then it only shows a partially complete frame in other random frames of the clip.
I suspect that the flickering is caused by the nesting of Overlay function. When I isolated the problem portion of the script, it no longer flickers, but I now cannot seem to get the the second overlay to work at all (only the "blue" background clip shows)
path = "C:\commercial\"
logo = ImageReader(path+"logo.tif", 0, 85, pixel_type="rgb32", 29.97)
logoborder = ImageReader(path+"logoborder.tif", 0, 85, pixel_type="rgb32", 29.97)
blue = ImageReader(path+"blueback.tif", 0, 85, pixel_type="rgb32", 29.97)
lenpt1 = 20
combined = Overlay(logo.trim(0,lenpt1),logoborder.trim(0,lenpt1), mask=ShowAlpha(ColorKeyMask(logoborder.trim(0,lenpt1), $000000, 20)), mode="blend", opacity=1, pc_range=TRUE)
logo_pt1 = Overlay(blue.trim(0,lenpt1),combined.trim(0,lenpt1), mask=ShowAlpha(ColorKeyMask(combined.trim(0,lenpt1), $000000, 20)), mode="blend", opacity=1, pc_range=TRUE)
logo_pt1
I was originally having problems with strange color casts showing in areas that should be completely transparent. I found that the pc_range=TRUE variable helped eliminate most of this.
Within the context of the entire script, this portion of the clip displays correctly, but flickers randomly (the topmost layer shows in one frame, but not the next, then back again for 2 frames, gone again, only partially showing in the upper left part of the frame, suddenly back to normal, etc. in an apparently random fashion)
The randomness of which frames it decides to show correctly in is strange enough, but then it only shows a partially complete frame in other random frames of the clip.
I suspect that the flickering is caused by the nesting of Overlay function. When I isolated the problem portion of the script, it no longer flickers, but I now cannot seem to get the the second overlay to work at all (only the "blue" background clip shows)
path = "C:\commercial\"
logo = ImageReader(path+"logo.tif", 0, 85, pixel_type="rgb32", 29.97)
logoborder = ImageReader(path+"logoborder.tif", 0, 85, pixel_type="rgb32", 29.97)
blue = ImageReader(path+"blueback.tif", 0, 85, pixel_type="rgb32", 29.97)
lenpt1 = 20
combined = Overlay(logo.trim(0,lenpt1),logoborder.trim(0,lenpt1), mask=ShowAlpha(ColorKeyMask(logoborder.trim(0,lenpt1), $000000, 20)), mode="blend", opacity=1, pc_range=TRUE)
logo_pt1 = Overlay(blue.trim(0,lenpt1),combined.trim(0,lenpt1), mask=ShowAlpha(ColorKeyMask(combined.trim(0,lenpt1), $000000, 20)), mode="blend", opacity=1, pc_range=TRUE)
logo_pt1
I was originally having problems with strange color casts showing in areas that should be completely transparent. I found that the pc_range=TRUE variable helped eliminate most of this.