"Effect" redirects here. For sound effects, see Sound Effect.
Effects as shown on the Scratch Cat: No effect, color, fisheye, whirl, pixelate, brightness, ghost, mosaic (from left to right).

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:

List of Graphical Effects

Color

This effect changes the hue (color) of the sprite.

Fisheye

This effect gives the impression of a sprite being seen through a wide-angle lens.

Whirl

This effect twists the sprite around its center point, therefore distorting the sprite.

Pixelate

This effect pixelates the sprite.

Brightness

This effect changes how desaturated the sprite is.

Ghost

This effect modifies the transparency of the sprite.

Mosaic

This effect shows multiple smaller images of the sprite, therefore creating a "mosaic" effect.

Value Limits

Some graphical effects have a limited range of values. Once an effect reaches its minimum or maximum, decrementing or incrementing it further does nothing.

Color

Different values of the color effect demonstrated on the Scratch Cat.
A horizontal line of colors.

One costume can take on 200 different color-schemes using the color effect. The "real" effect of the color is equal to the original color plus half of the added color effect. This means that change [color v] effect by (200) will do nothing since adding half of 200 to the original color would result in 100 being added to the color value, which will loop the color value back to its original color.

"Change color effect" will have a 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. Similarly, sprites colored white will have little noticeable effect when the "Change color effect" block is used.

An easy way to explore color effects is to set the color effect to mouse x inside a forever loop:

forever
set [color v] effect to (mouse x)
end

By moving the mouse left and right you can see which x value matches each color effect.

Minimum Saturation and Brightness

The color of a sprite may change in ways different than normal when applying a color effect depending on the saturation and brightness of the sprite's original color.[1]

Specifically, the saturation value of a sprite cannot be less than 9%. Setting it less than nine will also set the color value to half of the applied color effect. Similarly, the brightness value of a sprite cannot be less than 5.5%. Setting it to be less than 5.5% will make the saturation value 100% and the color value half of the applied color effect. This feature causes colors with little saturation or brightness to appear much more colorful and is especially noticeable on white and black.

Infinite Color Effect

When the color effect is set to Infinity or -Infinity, the sprite will lose all color and saturation, making the sprite appear grayscale. The new brightness will of the sprite is based on the original sprite's brightness and saturation, which follows the following formula:

if <((S) * (B)) < [0]> then
set [New Brightness v] to ((B) * (0.9))
else
set [New Brightness v] to (((S) * ((B) / (-100))) + (B))
end

where "New Brightness" is the new brightness of the sprite, and B and S are original sprite's Brightness and Saturation values.

Fisheye

The Scratch Cat at the point where adding to the Fisheye effect has no effect on it.
The Scratch Cat when the fisheye is equal to -100.

Any number whose absolute value is less than or equal to 34028234663852886×1024 will function correctly, although increasingly larger values will have no effect on the sprite at a certain point. Any number larger than 34028234663852886×1024 will cause the sprite to turn into an oval, confined by the bounding box of the sprite.

In Scratch 1.4, it cannot be greater than or equal to 1,073,741,723 or 230-101. The minimum is -100,[2] which makes the costume 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

Document.png Please expand this section. You can help by adding more information if you are an editor. More information might be found in a section of the talk page. (July 2022)
The sprite used to test.
The whirl effect starts glitching the sprite.

Any number whose absolute value is more than or equal to 100,000,000,000,000,000,000,000,000 or 1026 will cause the sprite to turn into a hole on some operating systems or browsers. Any numbers larger than 1.94967423051954×1040, however, will affect the sprite differently. If a sprite appeared as four squares with colors blue, green, yellow, and red, respectively, it will appear differently when whirl effect is added according to the table.

Browser/OS Windows 10/11 MacOS 10/11 MacOS 12 Android 5 Android 9 Android 10 Android 11
Chrome Blue Red Red Unknown Red Blue, green, yellow, red, white Blue
Firefox Blue, green, yellow, red Blue, green, yellow, red Blue, green, yellow, red, white Blue, green, yellow, red, static, white Blue, green, yellow, red, static, white Blue, green, yellow, red Unknown
Safari Blue, green, yellow, red Blue, green, yellow, red White Unknown Unknown Unknown Unknown
Edge Blue Unknown Red Unknown Unknown Unknown Unknown

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.[citation needed]

In Scratch 1.4, its absolute value 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. Backtracking 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 fixed 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). If this effect is set to a negative number, the absolute value is used.

Brightness

This effect's minimum is -100 and the maximum is 100.[3] The costume will appear entirely black at -100 and white at 100. In Scratch 1.4, not all of the sprite will be brightened when set to 100.

Ghost

One costume can take on 100 different transparencies using the ghost effect. The minimum value is 0 and the maximum is 100.[4] Once the effect is equal to 100, the sprite is completely transparent and cannot be seen, but it still can be detected in some ways. This is useful for hiding sprites that still need to be detected, like an invisible platform in a platformer.

Mosaic

The mosaic effect at the point where adding to the Mosaic effect has no effect on it in Scratch 2.0.

If this effect is set to a negative number, the absolute value is used. The largest possible value is 5105. This means that the largest amount of duplicates of a costume that can be generated with the mosaic effect is 262,144.

Example Uses

Color

  • To change the sprite's color at some point in the project.
  • 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.
  • To make a sprite appear to be changing between the colors of a rainbow.

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 (or something inappropriate).
  • To transfer the sprite to pixel art.

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.
  • Can make sprite slightly transparent to show a layer behind it.

Mosaic

  • Multiplying a sprite without cloning.
  • Can be used as a transition between costumes.
Blur, Pointillize, and Saturation (from left to right)

Removed Effects

Archive.png This article or section documents something not included in the current version of Scratch (3.0). It is only useful from a historical perspective.

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.[citation needed]

There was also a water ripple effect, which crashed Scratch due to a bug.[5]

Additionally, there used to be a "stretch" effect in development versions (introduced in 2004). It is still available in Scratch 1.4 but it is not listed in the effect menu.

Effect Inconsistencies

Archive.png This article or section documents something not included in the current version of Scratch (3.0). It is only useful from a historical perspective.

Some effects will render different results when used with either Stage3D or Pixel Bender. For example, the ghost effect will make the different layers of a vector sprite visible in Pixel Bender, while this will not happen in Stage3D. The effects that exhibit notable visual differences are:

  • Fisheye: Sprites are more blurry in Pixel Bender.
  • Whirl: Sprites whirl in different directions depending on the rendering engine.
  • Brightness: A value of 100 will cause the sprite to become completely white in Pixel Bender, while it will still be visible in Stage3D.
  • Ghost: Layers are visible for vector sprites in Stage3D.

Especially the ghost and brightness effects may confuse users as the results are dependent on the usage of other effects blocks in the project.[6]

Other

The [ v] effect::looks reporter block is requested by many Scratchers.[7] It would be a reporter block and it is in some Scratch Modifications such as Explore.


Stage3D

Archive.png This article or section documents something not included in the current version of Scratch (3.0). It is only useful from a historical perspective.

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.[8] After this update, it was noticed by many Scratchers that the lag increased greatly when running graphic effect scripts.[9] 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.[10]

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.[11]

On August 30, 2013, an alternate, beta player, called Stage3D and still running in Flash, was released for testing.[12] 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.


References

Cookies help us deliver our services. By using our services, you agree to our use of cookies.