Legacy Documentation: Version 4.6
Language: English
Glow
Motion Blur

Grayscale

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Sumbission failed

For some reason your suggested change could not be submitted. Please try again in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

The Grayscale image effect changes colors to grayscale. It can also use a Texture Ramp texture to remap luminance to arbitrary colors.

Like all image effects, Grayscale is available in Unity Pro only. Make sure to have the Pro Standard Assets installed.

Grayscale image effect applied to the scene
Grayscale image effect applied to the scene

Remapping colors

Grayscale can do a simple version of color correction, i.e. remap grayscale image into arbitrary colors. This can be used for effects like heat vision.

The process of color remapping is very similar to ColorCorrection effect:

  1. Take a screenshot of a typical scene in your game.
  2. Open it in Photoshop and convert to grayscale.
  3. Color correct it using the Image->Adjustments->Curves.
  4. Save the .acv file file from the dialog using Save…
  5. Open Pro Standard Assets->Image Based->color correction ramp.png in Photoshop
  6. Now apply color correction to the ramp image: open Image->Adjustments->Curves again and load your saved .acv file
  7. Select your camera in Unity and select Component->Image Effects->Grayscale to add the effect. Select your modified color ramp.
  8. Hit Play to see the effect in action!

Details

Color remapping works by remapping the original image luminance through the color ramp image (sized 256x1):

  • result color = pixel’s color in the ramp image at (OriginalLuminance + RampOffset) index. For example, to invert the colors in the image you only need to flip the original color ramp horizontally (so that it goes from white to black instead of from black to white):
Grayscale applied to the scene with color ramp that goes from white to black.
Grayscale applied to the scene with color ramp that goes from white to black.

A more complex version of color remapping that does arbitrary color correction can be achieved with ColorCorrection image effect.

Hardware Support

This effect requires a graphics card that supports Shader Model 2. See the Graphics Hardware Capabilities and Emulation page for further details and a list of compliant hardware.

Glow
Motion Blur