Pixelation
General => General Discussion => Topic started by: Sabata on September 21, 2008, 05:03:45 pm
-
I have this question I would like to ask, does anyone knows a good way of making nigh version of tiles, sprites for a game whiteout recoloring it all... I would like good quality, is there a way of making color overlay, brightness change or something which would make this effect?
-
Couple ways I can think of offhand:
1. If you've managed your palettes properly, you could do a palette swap
2. If your engine has pixel shader support, you could write one that darkens and hue shifts the entire screen
3. If you don't want to use pixel shaders but your engine is 3D-accelerated, you could render-to-texture the entire screen (per frame) and experiment with GLBlendFunc to darken the screen
-
Also you can take all your sprite art and run a colors filter on it in photoshop and tweak to your heart's content.
-
That would be relatively labor-intensive, though, not to mention resource-inefficient (you'd end up having multiple tilesets per lighting situation).
I personally think a pixel shader would be ideal, since it would allow you to customise to a high degree the night look (or other lighting moods, such as, eg, red warning lighting). You could also fade the edges of the screen to black, etc. A pixel shader would even allow you to gradually shift from day to night relatively convincingly.
-
Apart from what is mentioned aboven you could:
- Use a command line tool such as ImageMagick or Graphics magic to do a batch conversions (you can modify all files in one go).
- Simply render a semitransparent black or dark blue rectangle over everything, just before rendering to screen. This is especially easy in SDL-based games.
-
fil suggested to me a system which adds about 50 blue and takes about 20 red and green from the entire screen in Flash, which he put together in a few minutes. I don't know the specifics though or what program you are using...
-
Programming is made from scratch on C++ we are building a new engine for it...
Thanks for the ideas, I guess I'll be testing each and every method until finding the most appropriate one. :)
-
The easiest(depending on language and library) and most efficient way is to use a Pixel Shader as suggested.