- Home /
Rendering only specific colors? Color filter?
Hi, Im currently working on a game that is based around colors. This is a key component of the game and I need to know whats the best way to go about it.
So what am I trying to do? I want to be able to tell the camera what colors are allowed to be rendered in their given color. While all other colors will render in black and white.
So for example: If the color RED and BLUE is ON. I would be able to see/render Red/Blue while all other colors are rendered as Black/White.
I could potentially assing different textures with different colors and then set them appropriately when needed. But doing that would require alot of different textures. And I would prefer not to do it that way.
Does anyone know if there is a simple/advanced solution for this? Shaders? Hard-coding? Will I need Unity-Pro?
Any help is appreciated!
Example from a game: http://www.gameschasm.com/gameschasm/the-saboteur-10.jpg
Example from a photo: http://images.fineartamerica.com/images-medium-large/tulum-mexico-beach-color-splash-black-and-white-shawn-obrien.jpg
Answer by whydoidoit · Apr 02, 2013 at 10:03 AM
Without pro you would need to use a custom shader on each object being rendered that knew how to display the colours for that object. For example it might have a global shader property that was the main colour to display at the present time.
You'd have to write that yourself but it wouldn't be so hard (there's a tutorial series on Unity Gems that could help you get started).
With Pro you could do it with an image effect, but that would require a render texture and so won't work in Free.
Your answer
Follow this Question
Related Questions
Is there a way to limit the range of colors that can render in the scene? 1 Answer
rendering things in order 0 Answers
How to only render things behind a mesh. 0 Answers
Rendering a specific pass (ie. camera.RenderPass("Custom")) 0 Answers
How to get screen coordinates of object from shader 0 Answers