Eng:Graphic Effect

A graphic effect is an effect that can be used on a sprite or the Stage, changing their look in some way. These blocks can be found under the Looks section.

Related Blocks
There are three blocks that can change how an effect is being used on a sprite or the Stage. Those three blocks are:
 * Change Effect by   This changes the strength of a chosen effect
 * Set Effect to   This sets the strength of a chosen effect
 * Clear Graphic Effects This clears all effects over one sprite or the Stage

The Effect block is a block that many Scratchers want. It would be a reporter block. It is in some Scratch Modifications.

List of Graphical Effects

 * Color Changes the hue of the sprite (color)
 * Fisheye Gives the impression of a sprite being seen through a wide-angle lens
 * Whirl Twists the sprite around its center point
 * Pixelate Pixelates the sprite
 * Brightness Changes how bright the sprite is
 * Ghost Modifies the transparency of the sprite
 * Mosaic Creates multiple smaller images of the sprite

Value Limits
At some point, most of the graphical effects loop back to where they began.

Color
One costume can take on 200 different color-schemes using the color effect. The "real" effect of the color is equal to the numeric/stored effect modulo 200. This means that the below script will do nothing, since the rendered color will be the same.

change [color v] effect by (200)

"Change color effect" will have little apparent effect on sprites colored black, as black is a desaturated color rather than its own hue. To see the color effect on a black sprite, increase its brightness first.

Fisheye
In Scratch 2.0, there is no limit for the fisheye effect. At a certain point, increasing the effect will have no further affect on the rendered image. In Scratch 1.4, it cannot be greater than or equal to 1,073,741,723 or 230-101. If it is less than or equal to -100, it will take up part or all of its bounding box and have transparent and colored streaks emanating from the center, as shown in the picture on the left.

Whirl
In Scratch 2.0, there is no limit for the whirl effect, but at a certain point it will be completely negated, and the sprite will appear as if the whirl effect was set to 0. In Scratch 1.4, it cannot be greater than or equal to 1,073,741,823 or 230-1. If this limit is reached, the rendered costume will revert to its original state. Back tracking by "changing" the effect by a negative number of "setting" it to a lower value will result in the effect functioning normally again.

Pixelate
There is no known limit for the pixelate effect. It should be noted that each costume will have a point at which increasing the pixelate effect will have no effect on the rendered image (when it disappears or is a uniformly colored rectangle with the original dimensions of the sprite/Stage).

Brightness
There is no known limit for the brightness effect. As with the pixelate effect, eventually changing the brightness effect will have no effect on the rendered image. If the brightness is less than or equal to -100, it will appear entirely black. If it is greater than or equal to 100, it will be white.

Ghost
One costume can take on 100 different transparencies using the ghost effect. Once the absolute value of the ghost effect is greater than or equal to 100, the sprite is completely transparent and cannot be seen, but it still can be detected in some ways.

Mosaic
There is no known limit for the mosaic effect. As with the pixelate effect, eventually changing the mosaic effect will have no effect on the rendered image. The larger the number, the longer the block will take to execute.

Color

 * To make it appear as though the sprite is flashing
 * To set the atmosphere in certain places in the project
 * To make the sprite a different color to signify a different thing
 * To make art by stamping in different colors

Fisheye

 * To make the sprite distorted
 * To make a sprite appear as though it is moving towards or away from the screen
 * To make a sprite look fatter
 * Can be used as a transition between costumes
 * To make the sprite look as if it has been dented.
 * To symbolize a black hole or singularity.

Whirl

 * To make a sprite distorted
 * To symbolise time travel/teleportation/etc.
 * To make a sprite look as though it is spinning
 * Can be used as a transition between costumes

Pixelate

 * To make a project look retro, or old-fashioned
 * Can be used as a transition between costumes
 * To block out, or censor, an ignored character in the scene

Brightness

 * To give the impression of glowing
 * To make something darker
 * Can be used as a transition between costumes

Ghost

 * Fading in and out
 * Giving the impression of a ghost
 * Making something disappear without using the hide block (with opacity set to 100).
 * Mixing colors (with ghost effect 50 on two sprites)
 * Can be used as a transition between costumes
 * As an alternative to reducing the brightness, by creating a half-transparent dark sprite over the original sprite
 * Ghosting a detector so the user cannot see the sprite but still be able to be detected by other sprites

Mosaic

 * Multiplying a sprite
 * Can be used as a transition between costumes

Other Effects
Some Scratch Modifications include three effects from Scratch 1.2:


 * Blur blurs the sprite
 * Pointillize picks random pixels and creates circles with their colors at those locations
 * Saturation adds/removes color; saturation 0 is black and white

These were removed from Scratch because they were glitchy and the Scratch Team deemed them unimportant.

There was also a water ripple effect, which crashed Scratch due to the system not having enough memory.

Stage3D
In the early July 2013, Adobe updated Flash to version 11.8, removing hardware acceleration for Pixel Bender, which was used by Scratch to render graphic effects smoothly. After this update, it was noticed by many Scratchers that the lag increased greatly when running graphic effect scripts. Not only was Scratch affected by the lack of hardware acceleration, but almost all Flash applications using Pixel Bender also experienced the same issues and complications.

This lag could be greatly reduced or diminished by downgrading to Adobe Flash version 11.7 and prior. The previous versions support hardware acceleration for Pixel Bender, which allows the graphical effects on Scratch and other Flash applications to run smoothly. The Scratch Team tried to develop a workaround to optimize smooth graphic effects without Pixel Bender, coming up with two possible solutions, both of which were unspecified.

On August 30, 2013, an alternate, beta player, called Stage3D and still running in Flash, was released for testing. It allowed one to enter the URL of a Scratch project and play it in the new player that was aimed toward reducing graphic effect lag. The current version of the player uses the faster Stage3D rendering engine by default when graphic effects other than ghost and brightness are used.

Issues
Stage3D sometimes renders vector images incorrectly, and it can cause vector files in projects to appear blurry. The solution to this is to remove all graphic effects blocks except ghost and brightness from your project.