Making Sprite Art with 3D models

Discuss and distribute tools and methods for modding.
Rithaniel
Posts: 8
Joined: Mon Jul 08, 2019 7:10 am

Making Sprite Art with 3D models

Postby Rithaniel » Tue Feb 18, 2020 11:08 am

So, I've had a few people interested in knowing how I made the sprites for Sires of War/making sprites using 3D modeling programs in general. So, I'll go over how I handle things when I make mech sprites. The general idea is that I mock up a render in Blender that looks close to what I want, add some shaders to get steps of color, render it out to a small image size with no anti-aliasing, and then import it to GIMP or Asesprite to touch things up. The game requires very specific colors in a sprite in order to know how to recolor it, so I have to go through and replace practically every pixel by hand. There are often details that need to be changed as well, to accentuate particular features more clearly, but that gets into the more tedious details.

I used Blender for the initial 3D model. I'm still using Blender 2.79b because, well, I simply haven't upgraded yet. Also, I render things in the internal blender rendering engine, instead of using cycles render, because blender render gives a more cartoony and sharp look. Cycles render is preferred because it is useful to make things look realistic. In a pixel-art game like Into the Breach, realism isn't a priority. Generally, I do some modeling and get things into a rough shape of what I'm looking for. Sometimes I also go overboard and add more detail than will ever be seen in the final product. For an example, take a look at the havoc mech model I originally put together.

Image

Now, 3D modeling is it's own sort of skill to build up, but I like it because of the precise control of shapes and sizes. My first few attempts at modeling something were sketchy. But you just scrap the first few attempts and start again, trying to figure a little bit more out each time. If you want tutorials, I recommend Blender Guru's Youtube Channel for introductions to Blender. If you want to learn by googling, I recommend looking at beginner tutorials to pick up terminology so that you can more easily know what to search for.

So, I set up the render, arrange the scene, add some lighting, position the camera, add some materials to the model, and then export it as a png at a resolution of 120x104. The render settings are that anti-aliasing is turned off, the background (under shading) is set to transparent, and sometimes freestyle is turned on to add black outlines around the render. I've actually stepped back from doing this lately because the outlines often cover up details and I will be adding outlines in GIMP later anyways. There are three materials that I use. Each one has specular intensity set to 0 and diffuse intensity set to 1.

On the first material, the diffuse uses a constant color ramp with #869278 at position .85, #434844 at position .4, and #222422 at position 0.

On the second material, the diffuse uses a constant color ramp with #887E44 at position .7, #3F4B32 at position .3, and #1D281F at position 0.

On the third material, the diffuse uses a constant color ramp with #DD8D8C at position 0.

Image

Sometimes I use an orthographic camera. Sometimes I use perspective. It depends what looks better in the moment.

Image

Either way, once I get the render made, I take it over to GIMP or Asesprite (I've mainly used GIMP in the past, but I recently got Asesprite so I might use that more in the future) and shrink the image to 60x52 pixels, with no interpolation. It's important to specify no interpolation in GIMP because otherwise you get all these weird artefacts in your final image and it's just more work to get things working correctly. Also, in GIMP, I'll set up my eraser to have Dynamics Off and Hard Edge on, so that I can just click on a pixel with a "size 1" eraser and that pixel goes away. Also, I like to have the Threshold for Select by Color set to 0 because that helps to identify pixels which are slightly off color.

Color is very important when making an Into the Breach sprite. When you render something with a 3D modeling program, it tries to model lighting at least somewhat accurately, and so you will easily get a variety of different colors in your initial render. However, the game, when recoloring sprites, looks for specific colors in the png and replaces them. There is a palette of 8 colors the game looks for. If a sprite has any pixels that are not one of those eight colors, changing the color scheme will not recolor those pixels. The 8 colors are the colors used by the Rift Walkers squad. All sprites need to be drawn in these colors in order for the game to recolor them correctly. Below is an image of these colors, courtesy of Discord user Alcom Isst.

Image

Also, outlines for sprites use the color #020201.

Now, using these colors, the most time consuming part of the process is going through and manually setting the individual colors of the sprite. But with the render, there is very little guesswork. You just look at the color of the pixel in the render and replace it with the most appropriate color from the 8. Once that's done, you add a shadow in #000000 at 50% opacity, and you get a pretty good-looking sprite.

Image

I use 60x52 for the dimensions of my sprites, but any size is valid. In fact, most mod makers will go for smaller sprites than that. Different pawn/structure types require different images. Mechs specifically need a standard version, a version with no shadow, a highlight for the hangar, an idle animation, a broken sprite, a water sprite, and a broken water sprite. Now, any of these sprites can be animations, but I won't get too deep into how to make animations here. I'll just mention that an animation is essentially several sprites next to each other on a long image, and the game goes through and looks at each sprite in sequence. You can make an animation as long as you want.

Image