actionman133
17th January 2005, 03:35
Hi all!
I was just doing some messing around and came up with this neat little - although entirely useless - novelty function.
It creates images that appear to be shot in infrared from typical film/video material. You can watch it in black and white (like you would see in the helicopter shots of Best Police Chases), or in colour thermal, like how the Predator sees in the movie of the same name.
I am aware that Mode is error ridden when it comes to the final Return line, but I know the numbers I want.
Potency is used to enhance the effect. When Base is levelled between 128 and 255, skin is particularly dim. Use potency to enhance the effect to bring the skin to almost-white. That way, in colour mode, it will come out as red.
Function Thermal (clip Last, int Mode, int Potency) {
Base = VtoY.Levels (128, 1, 255 - Potency, 0, 255)
Blue = Base.Levels (0, 1, 63, 192, 128)
Green = Base.Levels (64, 1, 95, 63, 0)
Yellow = Base.Levels (96, 1, 159, 127, 64)
Red = Base.Levels (160, 1, 255, 191, 255)
RedMask = Red.Levels (191, 1, 192, 0, 255)
BlueMask = Blue.Levels (128, 1, 129, 0, 255)
RedGreen = Overlay (Green, Red, mask = RedMask)
BlueYellow = Overlay (Yellow, Blue, mask = BlueMask)
YtoUV (BlueYellow, RedGreen)
BilinearResize (Width, Height)
AudioDub (Last, Base)
Return ((Mode == 1) ? Last : Base).BilinearResize (Width, Height)
}
Here's a couple samples that I really liked
I was just doing some messing around and came up with this neat little - although entirely useless - novelty function.
It creates images that appear to be shot in infrared from typical film/video material. You can watch it in black and white (like you would see in the helicopter shots of Best Police Chases), or in colour thermal, like how the Predator sees in the movie of the same name.
I am aware that Mode is error ridden when it comes to the final Return line, but I know the numbers I want.
Potency is used to enhance the effect. When Base is levelled between 128 and 255, skin is particularly dim. Use potency to enhance the effect to bring the skin to almost-white. That way, in colour mode, it will come out as red.
Function Thermal (clip Last, int Mode, int Potency) {
Base = VtoY.Levels (128, 1, 255 - Potency, 0, 255)
Blue = Base.Levels (0, 1, 63, 192, 128)
Green = Base.Levels (64, 1, 95, 63, 0)
Yellow = Base.Levels (96, 1, 159, 127, 64)
Red = Base.Levels (160, 1, 255, 191, 255)
RedMask = Red.Levels (191, 1, 192, 0, 255)
BlueMask = Blue.Levels (128, 1, 129, 0, 255)
RedGreen = Overlay (Green, Red, mask = RedMask)
BlueYellow = Overlay (Yellow, Blue, mask = BlueMask)
YtoUV (BlueYellow, RedGreen)
BilinearResize (Width, Height)
AudioDub (Last, Base)
Return ((Mode == 1) ? Last : Base).BilinearResize (Width, Height)
}
Here's a couple samples that I really liked