
filter
FilterGray():
- set the image filter
FilterBGR24():
- Switches the Red and Blue color channels. Red becomes blue. Blue becomes red.
- Creates a Bluescreen effect. Blue pixels are rendered transparent.
- Applies a custom color filter to the image.
- FilterColor().matrix
4×5 integer matrix that contains parameters for color calculation.
Matrix provides general color transformation filter.
Resulting color values are calculated using matrix 4×5.
Every matrix row contains parameters for one color channel calculation.
Order of rows: red, green, blue, alpha.
Parameters in row define coefficients for source color channels in same order.
Matrix provides general color transformation filter.
Resulting color values are calculated using matrix 4×5.
Every matrix row contains parameters for one color channel calculation.
Order of rows: red, green, blue, alpha.
Parameters in row define coefficients for source color channels in same order.
FilterGray():
- Converts image to grayscale.
- Filter for levels calculations.
- FilterLevel().levels
- Converts the images to normal maps.
- Resets the color channels. Red becomes Red. Green becomes Green. Blue becomes Blue.
- Uses the Blender 3D color sliders to set the Filter's Red, Green, Blue and Alpha channels.

Sample Code
###################### use a filter
# import bge module
import bge
# get the current scene
scene = bge.logic.getCurrentScene()
# get list of objects in scene
objList = scene.objects
# get object named MovieScreen
obj = objList["MovieScreen"]
# check to see if Video FFmpeg Texture was saved as an object variable
# in other words, was the movie started
if "Video" in obj:
# get the saved object variable
video = obj["Video"]
# update the video texture
video.refresh(True)
video = obj["Video"]
# update the video texture
video.refresh(True)
else:
# get matID for the movie screen
# my material is named Display
matID = bge.texture.materialID(obj, "MADisplay")
# get the video texture
video = bge.texture.Texture(obj, matID)
# get the name of the movie
movieName = "BigBuckBunny.ogg"
# get movie path
# movie is in same directory as blend
movie = bge.logic.expandPath('//' + movieName)
# get video texture source
video.source = bge.texture.VideoFFmpeg(movie)
# use gray scale filter
video.source.filter = bge.texture.FilterGray()
# save video as an object variable
obj["Video"] = video
# start the video
video.source.play()
# my material is named Display
matID = bge.texture.materialID(obj, "MADisplay")
# get the video texture
video = bge.texture.Texture(obj, matID)
# get the name of the movie
movieName = "BigBuckBunny.ogg"
# get movie path
# movie is in same directory as blend
movie = bge.logic.expandPath('//' + movieName)
# get video texture source
video.source = bge.texture.VideoFFmpeg(movie)
# use gray scale filter
video.source.filter = bge.texture.FilterGray()
# save video as an object variable
obj["Video"] = video
# start the video
video.source.play()