Effects allow the appearance of object surfaces to be enhanced or distorted in various ways. Many effects are provided with Lightwing that can be applied to images, video or solid colors for objects, boxes, page backgrounds and fonts. This example uses the effect option to apply several different effects to the images used on the SphereSpin object.
The effect option defines a substitute effect to use to draw the image applied to the object instead of the object’s default effect. Two parameters are required. The first parameter is the name of the effect to replace. This must match a material name in the object that was defined in Blender when the object was created. Most of the objects provided with Lightwing use the default name Material. The second parameter names the substitute effect. An extension of .pfx is assumed for effects.
The arg0 and arg1 options define effect-specific parameters for the selected image effect. Up to four floating-point values are passed to the effect for arg0 and, optionally, another four floating-point values for arg1. The meaning of these values is different for each effect. These parameters are required by some effects, but ignored by the default image effect. To determine the appropriate values for particular effects, refer to the comments in the effect files. Also refer to the online Scripting Guide for more details about these commands.
// Scripting Tutorial - Object Effects version: 1.0 page: Mercury time: 1, 3 image: PlanetMercuryBackground.pvr text: OpenSansBold_100 time: 1, 2 fade: 1, 1 position: 50, 50 align: CenterCenter type: "Hello Mercury!" object: SphereSpin rate: 10 loop: on fade: 1, 1 position: 10, 18 scale: 0.5, 0.5, 0.5 image: GlobeNasa1 effect: Material, Image object: SphereSpin rate: 20 loop: on fade: 1, 1 position: 90, 18 scale: 0.5, 0.5, 0.5 image: GlobeNasa2 effect: Material, Image object: SphereSpin rate: 30 loop: on fade: 1, 1 position: 10, 82 scale: 0.5, 0.5, 0.5 image: GlobeNasa3 effect: Material, Image object: SphereSpin rate: 40 loop: on fade: 1, 1 position: 90, 82 scale: 0.5, 0.5, 0.5 image: GlobeNasa4 effect: Material, Image page: Venus time: 1, 3 image: PlanetVenusBackground.pvr text: OpenSansBold_100 time: 1, 2 fade: 1, 1 position: 50, 50 align: CenterCenter type: "Hello Venus!" object: SphereSpin rate: 10 loop: on fade: 1, 1 position: 10, 18 scale: 0.5, 0.5, 0.5 image: GlobeNasa1 effect: Material, ImageStatic arg0: 1, 1 arg1: 0.5 object: SphereSpin rate: 20 loop: on fade: 1, 1 position: 90, 18 scale: 0.5, 0.5, 0.5 image: GlobeNasa2 effect: Material, ImageStatic arg0: 1, 1 arg1: 0.5 object: SphereSpin rate: 30 loop: on fade: 1, 1 position: 10, 82 scale: 0.5, 0.5, 0.5 image: GlobeNasa3 effect: Material, ImageStatic arg0: 1, 1 arg1: 0.5 object: SphereSpin rate: 40 loop: on fade: 1, 1 position: 90, 82 scale: 0.5, 0.5, 0.5 image: GlobeNasa4 effect: Material, ImageStatic arg0: 1, 1 arg1: 0.5 page: Earth time: 1, 3 image: PlanetEarthBackground.pvr text: OpenSansBold_100 time: 1, 2 fade: 1, 1 position: 50, 50 align: CenterCenter type: "Hello Earth!" object: SphereSpin rate: 10 loop: on fade: 1, 1 position: 10, 18 scale: 0.5, 0.5, 0.5 image: GlobeNasa1 effect: Material, ImageScatter arg0: 0.05, 0.05 object: SphereSpin rate: 20 loop: on fade: 1, 1 position: 90, 18 scale: 0.5, 0.5, 0.5 image: GlobeNasa2 effect: Material, ImageScatter arg0: 0.05, 0.05 object: SphereSpin rate: 30 loop: on fade: 1, 1 position: 10, 82 scale: 0.5, 0.5, 0.5 image: GlobeNasa3 effect: Material, ImageScatter arg0: 0.05, 0.05 object: SphereSpin rate: 40 loop: on fade: 1, 1 position: 90, 82 scale: 0.5, 0.5, 0.5 image: GlobeNasa4 effect: Material, ImageScatter arg0: 0.05, 0.05 page: Mars time: 1, 3 image: PlanetMarsBackground.pvr text: OpenSansBold_100 time: 1, 2 fade: 1, 1 position: 50, 50 align: CenterCenter type: "Hello Mars!" object: SphereSpin rate: 10 loop: on fade: 1, 1 position: 10, 18 scale: 0.5, 0.5, 0.5 image: GlobeNasa1 effect: Material, ImageBlackWhite arg0: 1, 1, 1 object: SphereSpin rate: 20 loop: on fade: 1, 1 position: 90, 18 scale: 0.5, 0.5, 0.5 image: GlobeNasa2 effect: Material, ImageBlackWhite arg0: 1, 1, 1 object: SphereSpin rate: 30 loop: on fade: 1, 1 position: 10, 82 scale: 0.5, 0.5, 0.5 image: GlobeNasa3 effect: Material, ImageBlackWhite arg0: 1, 1, 1 object: SphereSpin rate: 40 loop: on fade: 1, 1 position: 90, 82 scale: 0.5, 0.5, 0.5 image: GlobeNasa4 effect: Material, ImageBlackWhite arg0: 1, 1, 1 page: Jupiter time: 1, 3 image: PlanetJupiterBackground.pvr text: OpenSansBold_100 time: 1, 2 fade: 1, 1 position: 50, 50 align: CenterCenter type: "Hello Jupiter!" object: SphereSpin rate: 10 loop: on fade: 1, 1 position: 10, 18 scale: 0.5, 0.5, 0.5 image: GlobeNasa1 effect: Material, ImageColorReplace arg0: 0, 1, 0, 1 object: SphereSpin rate: 20 loop: on fade: 1, 1 position: 90, 18 scale: 0.5, 0.5, 0.5 image: GlobeNasa2 effect: Material, ImageColorReplace arg0: 0, 1, 0, 1 object: SphereSpin rate: 30 loop: on fade: 1, 1 position: 10, 82 scale: 0.5, 0.5, 0.5 image: GlobeNasa3 effect: Material, ImageColorReplace arg0: 0, 1, 0, 1 object: SphereSpin rate: 40 loop: on fade: 1, 1 position: 90, 82 scale: 0.5, 0.5, 0.5 image: GlobeNasa4 effect: Material, ImageColorReplace arg0: 0, 1, 0, 1 page: Saturn time: 1, 3 image: PlanetSaturnBackground.pvr text: OpenSansBold_100 time: 1, 2 fade: 1, 1 position: 50, 50 align: CenterCenter type: "Hello Saturn!" object: SphereSpin rate: 10 loop: on fade: 1, 1 position: 10, 18 scale: 0.5, 0.5, 0.5 image: GlobeNasa1 effect: Material, ImageGlass arg0: 0.1, 0.1 arg1: 0.05, 0.05 object: SphereSpin rate: 20 loop: on fade: 1, 1 position: 90, 18 scale: 0.5, 0.5, 0.5 image: GlobeNasa2 effect: Material, ImageGlass arg0: 0.1, 0.1 arg1: 0.05, 0.05 object: SphereSpin rate: 30 loop: on fade: 1, 1 position: 10, 82 scale: 0.5, 0.5, 0.5 image: GlobeNasa3 effect: Material, ImageGlass arg0: 0.1, 0.1 arg1: 0.05, 0.05 object: SphereSpin rate: 40 loop: on fade: 1, 1 position: 90, 82 scale: 0.5, 0.5, 0.5 image: GlobeNasa4 effect: Material, ImageGlass arg0: 0.1, 0.1 arg1: 0.05, 0.05 page: Uranus time: 1, 3 image: PlanetUranusBackground.pvr text: OpenSansBold_100 time: 1, 2 fade: 1, 1 position: 50, 50 align: CenterCenter type: "Hello Uranus!" object: SphereSpin rate: 10 loop: on fade: 1, 1 position: 10, 18 scale: 0.5, 0.5, 0.5 image: GlobeNasa1 effect: Material, ImageRandomMask arg0: 0.2, 0.2 arg1: 0.5 object: SphereSpin rate: 20 loop: on fade: 1, 1 position: 90, 18 scale: 0.5, 0.5, 0.5 image: GlobeNasa2 effect: Material, ImageRandomMask arg0: 0.2, 0.2 arg1: 0.5 object: SphereSpin rate: 30 loop: on fade: 1, 1 position: 10, 82 scale: 0.5, 0.5, 0.5 image: GlobeNasa3 effect: Material, ImageRandomMask arg0: 0.2, 0.2 arg1: 0.5 object: SphereSpin rate: 40 loop: on fade: 1, 1 position: 90, 82 scale: 0.5, 0.5, 0.5 image: GlobeNasa4 effect: Material, ImageRandomMask arg0: 0.2, 0.2 arg1: 0.5 page: Neptune time: 1, 3 image: PlanetNeptuneBackground.pvr text: OpenSansBold_100 time: 1, 2 fade: 1, 1 position: 50, 50 align: CenterCenter type: "Hello Neptune!" object: SphereSpin rate: 10 loop: on fade: 1, 1 position: 10, 18 scale: 0.5, 0.5, 0.5 image: GlobeNasa1 effect: Material, ImagePixel arg0: 32 object: SphereSpin rate: 20 loop: on fade: 1, 1 position: 90, 18 scale: 0.5, 0.5, 0.5 image: GlobeNasa2 effect: Material, ImagePixel arg0: 32 object: SphereSpin rate: 30 loop: on fade: 1, 1 position: 10, 82 scale: 0.5, 0.5, 0.5 image: GlobeNasa3 effect: Material, ImagePixel arg0: 32 object: SphereSpin rate: 40 loop: on fade: 1, 1 position: 90, 82 scale: 0.5, 0.5, 0.5 image: GlobeNasa4 effect: Material, ImagePixel arg0: 32 page: Pluto time: 1, 3 image: PlanetPlutoCharonBackground.pvr text: OpenSansBold_100 time: 1, 2 fade: 1, 1 position: 50, 50 align: CenterCenter type: "Hello Pluto!" object: SphereSpin rate: 10 loop: on fade: 1, 1 position: 10, 18 scale: 0.5, 0.5, 0.5 image: GlobeNasa1 effect: Material, ImageLight arg0: 1 1 object: SphereSpin rate: 20 loop: on fade: 1, 1 position: 90, 18 scale: 0.5, 0.5, 0.5 image: GlobeNasa2 effect: Material, ImageLight arg0: 1 1 object: SphereSpin rate: 30 loop: on fade: 1, 1 position: 10, 82 scale: 0.5, 0.5, 0.5 image: GlobeNasa3 effect: Material, ImageLight arg0: 1 1 object: SphereSpin rate: 40 loop: on fade: 1, 1 position: 90, 82 scale: 0.5, 0.5, 0.5 image: GlobeNasa4 effect: Material, ImageLight arg0: 1 1 jump: Mercury