Version: 5.5
Глобальный туман
Motion Blur

Чёрно-белое (Grayscale)

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

Like with all image effects, make sure to have the Standard Assets Effects package installed.

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

Переназначение цветов

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. Снятие скриншота типичной сцены из вашей игры.
  2. Откройте его в Photoshop и конвертируйте его в чёрно-белое.
  3. Откорректируйте их, используя Image->Adjustments->Curves.
  4. Сохраните .acv файл через диалоговое окно, воспользовавшись Save…
  5. Откройте в Photoshop Pro Standard Assets->Image Based->color correction ramp.png
  6. Теперь примените цветокоррекцию к ramp изображению: снова откройте Image->Adjustments->Curves и загрузите своё недавно сохранённый .acv файл
  7. Select your camera in Unity and select Component->Image Effects->Grayscale to add the effect. Select your modified color ramp.
  8. Нажмите играть, чтобы увидеть эффект в действии!

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.

Аппаратная поддержка

This effect should run on all hardware that Unity supports.

Глобальный туман
Motion Blur