Grayscale image effect
Grayscale is a simple image effect that changes colors to grayscale by default. 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
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:
- Take a screenshot of a typical scene in your game.
- Open it in Photoshop and convert to grayscale.
- Color correct it using the .
- Save the .acv file file from the dialog using
- Open in Photoshop
- Now apply color correction to the ramp image: open again and load your saved .acv file
- Select your camera in Unity and select to add the effect. Select your modified color ramp.
- 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.
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 with pixel shaders (2.0) or OpenGL ES 2.0. PC: NVIDIA cards since 2003 (GeForce FX), AMD cards since 2004 (Radeon 9500), Intel cards since 2005 (GMA 900); Mobile: OpenGL ES 2.0; Consoles: Xbox 360, PS3.
All image effects automatically disable themselves when they can not run on end-users graphics card.
Page last updated: 2011-05-12
'게임 > Unity3D' 카테고리의 다른 글
[ Unity3D] RigidBody 관련 설명 (0) | 2013.04.05 |
---|---|
[Unity3D] 소수점 오차 관련 팁 (0) | 2013.04.05 |
[Unity3d] Animation 관련 팁 (0) | 2013.04.05 |
[Unity3D] Debug.Log에 대해 (0) | 2013.04.04 |
[UNITY3D][질답 스크랩] Texture의 특정 Rect영역만 참조하여 사용하고 싶은데 어떻게 해야 하나요? (0) | 2013.03.14 |
[Unity3D] SkinnedMeshRenderer 와 Renderer (0) | 2013.03.11 |
[Unity3D][Shader][Itween] ColorFrom Function Error "Material doesn't have a color property '_Color" (0) | 2013.03.08 |
[Unity3D] 투명, 색 지정 가능한 2 pass 관련 쉐이더 (0) | 2013.03.08 |
[Unity3D] 유니티의 게임오브젝트 관리 (0) | 2013.02.14 |
[Unity3D] Animation 에 추가됬으면 하는 기능 (0) | 2013.02.13 |