In other languages

Help the wiki!

The Scratch Wiki is made by and for Scratchers. Do you want to contribute?

Learn more about joining as an editor!

See discussions in the Community Portal

Graphic Effect

(Redirected from Color Effect)

SandCastleIcon.png This page has links to outside of the Scratch website and Wikipedia. Always remember to stay safe when using the internet since we can't guarantee the safety of other sites.
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

These three blocks control effects on sprites or the Stage.
There are three blocks that can change how an effect is being used on a sprite or the Stage.
A block that many Scratchers have requested.[1]

Those three blocks are:

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.

Changing of colors using the Color Effect block

These are the color changes from Scratch Cat Orange (0 Color Effect) to itself, when it restarts at the 200th positive value of the color effect.

  • 1-10 = Orange to light yellow
  • 10-20 = Light yellow to a yellowish-green
  • 20-30 = Yellowish-green to a medium green color
  • 30-40 = Medium green to a thick, green color.
  • 40-50 = No considerate change.
  • 50-60 = A greenish-light cyan color.
  • 60-70 = A lightly-blue tinted green to a fully light cyan color.
  • 70-80 = A light cyan color to a light blue color.
  • 80-90 = A light blue to a medium-dark blue.
  • 90-100 = A medium-dark blue a thick dark blue.
  • 100-110 = Darker and darker blue.
  • 110-120 = A slowly more purplish blue.
  • 120-135 = Violet to Indigo
  • 135-160 = A gradually mixed pink and purple.
  • 160-170 = A gradually pinkish-red color.
  • 170-180 = A thick red color.
  • 180-190 = A dark orange color
  • 190-200 = Identical to the original color at this point.

For other colors, simply start at the most identical color effect, for example, a red color would be at color effect 175 (1st column, 4 colors down on the vector coloring area.) If you are still not sure, try changing the color effect until it matches one of these descriptions.

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. Subtracting the effect will not affect the image.

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

At a certain point the Whirl effect is completely negated.

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. On some cases, not all of the sprite will be brightened or dimmed when set to 100 or -100.

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. One way you can use the ghost effect is making a transition by making a sprite start out transparent, then make it visible, then transparent again!

Mosaic

The Scratch Cat at the point where adding to the Mosaic effect has no effect on it.

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.

Example Uses

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
  • To make a sprite appear 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

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 without cloning
  • Can be used as a transition between costumes
Blur, Pointillize, and Saturation (from left to right)

Other Effects

Archive.png This article or section documents a feature not included in the current version of Scratch (2.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.

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

Effect Inconsistencies

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.
  • Pixelate
  • Mosaic
  • 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.[2]

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

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

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

  1. http://scratch.mit.edu/projects/photino/3049778
  2. Stage3D
  3. http://scratch.mit.edu/discuss/topic/13395/
  4. http://scratch.mit.edu/discuss/topic/14305/
  5. https://bugbase.adobe.com/index.cfm?event=bug&id=3591185
  6. http://scratch.mit.edu/discuss/post/119819/
  7. http://scratch.mit.edu/discuss/topic/16671/
  • This page was last modified on 17 April 2017, at 16:03.