Hi.
I'm wondering how many of you use your code to manage color for more complex games... Vs managing color in illustrator, photoshop, etc. In other words starting with white / greyscale assets and then rendering them in color.
I see benefits and drawbacks of managing color values in code, and I can't decide if its worth it. I'm pretty sure rocketcat did it for punchquest.
Do you do this? What are the pros and cons?
Pros:
Rendering them in a different hue is much faster than creating a new set of assets (new skin)
Smaller file-size (fewer assets)
Cons:
Time consuming to put in color values for each piece if for example eyes, horns, head all require different colors
Thanks!
Brian
Posts
I definitely wouldn't do it for everything, as it gives up a lot of control over your art. Unless you know exactly what everything in your game will look like and it's all very simple and straightforward, you can expect to find yourself splitting your assets up in weird ways to match the shading, and having to write animation systems to make them fit together. It's a huge potential headache. How much depends on the number of shaders on the screen and your target platform, but Hue-shading all of your objects everything will become GPU intensive on a lot of machines. It also adds complexity to your graphics pipeline, unless your artists are also your programmers. Hue-shading also typically won't give as good a result as having an artist do the colors, depending on the nature of your sprites.
So instead, evaluate it for specific cases and determine where to use it based on the needs of your game. Do you need 200 different hues of the same character sprite for your character customization system? That's a great place to use hue shading. Have a massive background sprite for your sky, and you want it to subtly change it from light to dark based on the time of the in-game day? Also a good place. Basically, you want to default to fully colored assets where possible, and use hue-shading when it solves a particular design problem that you have.
Time is at a premium in game development, time-per-asset even more so. You want to keep asset-production as cheap and simple as possible. Even a small difference in your asset pipeline will greatly affect your total development time and costs.
This is all fairly generic though. We could give much better advice if we knew more about the needs of your game. Do you need many different-colored versions of the same enemies for your gameplay? Do you need to render 500 sprites on the screen at once, or only 5 at a time?
If you have flat tone character sprites for example, you can probably get away with it, because it's pretty easy to just sample a color and replace it with a new color. Basically greenscreen for art.
But if you need things like contoured shadows and stuff, you either have a lot of code to write, or you can try some weird tricks and hope it works out
One ultra ultra cheap way to do dynamic colored graphics is to just render your grayscales with a hue filter instead of actually pixel sampling. If done right you can get away with it, but you just have to keep in mind anything not #000 black is going to end up picking up your hue color
in short, the more sophisticated and rich you want your graphics to be, the less viable this strategy is
you could also do something like compositing, where you have a flat tone sprite, which you dynamically coler, and then overlay a shadow or texture map. That would be pretty cool but I'm not sure if it's actually less work than the old fashioned way
we also talk about other random shit and clown upon each other
Yukon Warrior for iPhone
@RareSloth