Camera changes for Post processing Effects
The 'ppeffectlist' property is a camera property. Each individual camera can have its own 'ppeffectlist'. Note that overlays of the camera will not be considered for Post-processing effects.
Usage
myppeffectlist = sprite(1).camera(1).ppeffectlist
The Post-processing effects make use of the following common variables:
- Texture List: You can specify the list of textures that are used by certain Post-processing effects.
- Operation List: You can specify the operations to be performed on the textures specified in the Texture List. The list of supported operations are:
- Additive blending specified using “add”.
- Multiplicative blending specified using “multiply”.
- Subtractive blending specified using “subtract”.
- Type: Returns the type symbol of the Post-processing effect.
Adobe Director 12 provides the following new post-processing effects:
newppeffect
This function is used to create a new Post-Processing Effect Object. The type of Post-Processing effect returned is determined by the parameter 'ppEffectSymbol'.
Usage
ppEffectObjRef = newppeffect(ppEffectSymbol)
The ppEffectSymbol has to be any one of the following values:
Example
ppColor = newppeffect(#ppadjustcolor) ppColor.adjustcolormatrix= myMatrix ee = sprite(me.spriteNum).camera(1).ppeffectlist ee.append(ppColor)
Convolution Filter
You can use Convolution filter to apply a wide range of imaging transformations, such as blurring, edge detection, sharpening, embossing, and beveling.
The values for achieving these transformations must be specified using a three by three matrix as follows:
- Gaussian Blur
myList = [1.0/16, 2.0/16, 1.0/16, 2.0/16, 4.0/16, 2.0/16, 1.0/16, 2.0/16, 1.0/16] - Sharpness
myList = [-1, -1,-1, -1, 9, -1, -1, -1, -1] - Edge-detection
myList = [0, 1, 0, 1, -4, 1, 0, 1, 0] - Emboss
myList = [2, 0, 0,0, -1, 0, 0, 0, -1] - Mean
myList = [1.0/9, 1.0/9, 1.0/9,1.0/9, 1.0/9, 1.0/9, 1.0/9, 1.0/9, 1.0/9]
Usage
myList = [0, 1, 0, 1, -4, 1, 0, 1, 0] myMatrix = newMatrix(3,3,myList) pp = newppeffect(#ppconvolution) pp.convolutionmatrix = myMatrix ee = sprite(me.spriteNum).camera(1).ppeffectlist ee.append(pp)
Example
ppColor = newppeffect(#ppadjustcolor) ppColor.adjustcolormatrix= myMatrix ee = sprite(me.spriteNum).camera(1).ppeffectlist ee.append(ppColor)
Adjust color filter
You can use the Adjust color filter to edit a scene’s brightness, contrast, saturation, and hue. The Adjust-Color Filter effect lets you apply a 3 x 4 matrix transformation on the RGB color of every pixel in the input image to produce a result with a new set of RGB color.
Here are the matrix values you can use for different colors:
- Red Channel
myLists = [1,0,0,0, 0,0,0,0, 0,0,0,0] - Green Channel
myLists = [ 0,0,0,0, 0,1,0,0, 0,0,0,0] - Blue Channel
myLists = [ 0,0,0,0, 0,0,0,0, 0,0,1,0] - Black & White
myLists = [0.3,0.3,0.3,0, 0.3,0.3,0.3,0, 0.3,0.3,0.3,0] - Contrast
myLists = [2,0,0,0, 0,2,0,0, 0,0,2,0] - Saturation
myLists = [2,1,0,0, -1,2,0,0, 0,-1,2,0] - Hue
myLists = [0,1,0,0, 0,0,1,0, 1,0,0,0] - Normal
myLists = [1,0,0,0, 0,1,0,0, 0,0,1,0] - Invert (Negative)
myLists = [ -1,0,0,1, 0,-1,0,1, 0,0,-1,1]
Usage
myList = [ 0,0,0,0, 0,1,0,0, 0,0,0,0] myMatrix = newMatrix(3,4,myList) pp = newppeffect(#ppadjustcolor) pp.adjustcolormatrix= myMatrix ee = sprite(me.spriteNum).camera(1).ppeffectlist ee.append(pp)
Blur motion effect
Blur motion effect causes blurring of objects in motion. Blurring is dependent on the velocity of the object.
You can apply blur motion effect to:
- A camera: Blur motion effect is applied to all the models that are rendered by the camera.
Property:
3Dmember.camera(1).blurmotion = true
- A Model: Blur motion effect is applied only to the specific model.
Property:
pSphere.blurmotion = true
By default, blur motion effect is disabled for all models and cameras. Blur motion effect applied to a camera overrides the effect applied to a model.
Usage
pp = newppeffect(#ppblurmotion) pp.blurconst = 0.08 ee = sprite(me.spriteNum).camera(1).ppeffectlist ee.append( pp ) pSphere.blurmotion = true -- enable Blur-Motion in Sphere p3Dmember.camera(1).blurmotion = true --enable Blur-Motion on Camera
Bloom Effect
The Bloom Post-processing Effect is used to bloom the screen. This effect makes bright areas appear brighter.
Usage
pp = newppeffect (#ppbloom) pp.bloomthreshold = 0.1 pp.baseintensity = 1 pp.bloomintensity = 2 pp.basesaturation = 1 pp.bloomsaturation = 1 pp.blurX = 5 pp.blurY = 1 ee = sprite(me.spriteNum).camera(1).ppeffectlist ee.append(pp)
- BloomThreshold: Controls the minimum intensity in the original image that will be bloomed. Only those pixels that are brighter than this value will be bloomed.
- BaseIntensity/BloomIntensity: When the bloomed image is combined with the original image, these values determine the intensity (brightness) of the respective images.
- BaseSaturation/BloomSaturation: When the bloomed image is combined with the original image, these values determine the saturation of the respective images.
- BlurX/BlurY: Controls the blurriness of the bloomed image in X or Y axis.
Blend textures effect
You can specify up to seven input textures and corresponding operations to blend them at run-time on the scene and create different effects.
Usage
pp = newppeffect(#ppblendtextures) pp.texturelist = mytexturelist –- supports upto 7 textures mytexturelist.append(tex1) mytexturelist.append(tex2) mytexturelist.append(tex3) pp.oplist = myoperationlist –- supports upto 7 operations myoperationlist.append(“add”) myoperationlist.append(“subtract) myoperationlist.append(“multiply”) ee = sprite(me.spriteNum).camera(1).ppeffectlist ee.append( pp )
You can also create effects such as masking and stereoscopy in Lingo using this feature.
Parameters
- Texture List: The Blend Textures effect supports upto 7 textures.
- Operations List: The Blend Textures effect supports up to 7 operations based on the number of textures in the Texture List.
Depth of Field
Depth of Field is the distance between the nearest and farthest objects in a scene that appear acceptably sharp in an image (from Wikipedia).
You can use depth of field to emphasize a specific object or a model while blurring or de-emphasizing other objects in the foreground and background.
Usage
pp = newppeffect(#ppdepthoffield) pp.depthstart = 20 pp.depthrange = 20 pp.blurconst=5 ee = sprite(me.spriteNum).camera(1).ppeffectlist ee.append(pp)
Parameters
- DepthStart: Distance from the camera to the point up to which all the objects will appear sharp.
- DepthRange: All the objects between ‘DepthStart’ & ‘DepthStart + DepthRange’ blur gradually. Beyond ‘DepthStart + DepthRange’ objects appear completely blurred.
- BlurConst: Controls the blurriness of the scene that is not in focus
Night Vision effect
The Night Vision filter helps you to replicate a night vision goggles scene by specifying brightness, red/blue/green coloring in the scene. You can also use two textures for adding shadows and noise to the scene.
Usage
pp = newppeffect(#ppnightvision) pp.brightness = 1.3 pp.greenBias = 0.7 pp.texturelist = [shadow,noise] –- supports two textures --By default, opacity of both set to 1 ee = sprite(me.spriteNum).camera(1).ppeffectlist ee.append(pp)
Parameters
- Brightness: Indicates the multiplication factor for brightness in the scene. Value of 1 keeps the brightness unchanged, while 0 makes the scene black. Values greater than 1 brighten the scene.
- RedBias/GreenBias/BlueBias: Indicates the respective coloring to be given to the scene. Values range from 0 (no color) to 1 (full intensity of color)
- NoiseOpacity: Denotes the opacity of the ‘noise’ additive texture (texturelist[2])
- ShadowOpacity: Denotes the opacity of the ‘shadow’ multiplicative texture (texturelist[1]). This is used to get the vignetting effect (edges are darkened)
- Texture List: The Night Vision effect supports two textures. The first layer is multiplicative blending, while second is additive blending. These are controlled by parameters NoiseOpacity and ShadowOpacity properties described above.
- NightVisionMatrix: This is intended for advanced users. It allows greater control over the exact look of the effect. NightVisionMatrix works just like the Adjust Color Matrix.
- LineWidth: Denotes width in pixels of the alternating white lines that are displayed when using the Night Vision Effect.
- LineOpacity: Denotes opacity of the alternating white lines that are displayed when using the Night Vision Effect. Values range from 0 to 1.
Limitation
Specify the values for redbias, greenbias, and floatbias in float.
Sign in to your account