Categories
Game Dev Pixel Art

Using RGB Masks for Efficient Sprite Workflow

There’s a little trick I picked up from working on pixel art games with shaders.  You can save a lot of time creating assets if your sprite sheets look like this:

explosion sprite sheet RGB mask

“Those colors are awful!  Why would anyone use that in a game?” you might say.

These aren’t just sprites, but RGB masks.  These masks can be used to easily recolor the sprites in almost any application.  For example, a recolor can be achieved in Blender with a relatively simple node setup:

sprite recoloring node setup in Blender

Or, let’s say you or another artist wants to create a new color palette for the same sprite sheet in the future.  If you don’t all use the same sprite software or don’t have access to the source files, that could be a lot of work.  Making a new sheet from a mask takes a couple minutes with even basic tools like GIMP or Photoshop.

extracting color components from explosion sprite sheet

To create a new sheet in GIMP, simply import the RGB mask, use Colors>Components>Extract Component to create a B/W mask for each color, and use those layers as masks for your color or pattern layers.

Does this really save time?

You may ask, “Doesn’t this just create another step in the asset creation process?  How does that save time?”  I’ll be honest, this technique doesn’t save time if you plan on never recoloring your sprites.

But how many times have you been happy with the colors of your sprites the first time?  For me, never.  Making tweaks, then re-flattening, re-exporting, and re-importing assets five times is a pain.

Using an RGB mask lets you skip that whole process and recolor your assets directly in the application (Blender, UE4, Godot, or whatever you use).  The real value of this technique is that you and other devs on your team can save a huge amount of time on iteration.  And, as any experienced dev has learned, fast iteration is key to the development process.

One reply on “Using RGB Masks for Efficient Sprite Workflow”

Leave a Reply

Your email address will not be published. Required fields are marked *