Screenshot cleanup

Handy guides on how to do things, written by users for users.

Moderators: GZDoom Developers, Raze Developers

Forum rules
Please don't start threads here asking for help. This forum is not for requesting guides, only for posting them. If you need help, the Editing forum is for you.

Screenshot cleanup

Postby zrrion the insect » Sun Sep 06, 2020 2:10 am

I've gotten pretty good at screenshot cleanup and decided to go into detain regarding the process I use. Before I begin though I do want to mention that this all starts with selecting a good screenshot. The more similar the lighting in the screenshot is to what you want to see in game the better. Selecting weapons with strong design that can be shrunk down without loss of important details is also important. A lot of overly-detailed scifi and modern military weapons just look like a mess when you scale them down and it is a lot more work than it is worth to clean those weapons up as it involves redrawing a lot from scratch instead of merely cleaning up a rip.

Step one is sourcing a good screenshot, this one is a bit janky as I used the snapshot tool (win+shift+s) to take the screenshot as it will freeze what is on your screen to allow you to select the part you want to screenshot, and I wanted to do it this way to effectively pause a video without the video player overlaying itself on the screenshot. I got what I needed and then got a full screen capture from another point in the video to use only for the sake of positioning the weapon.

From here we do 1 thing before anything else, and that is to sharpen the image. When you downscale the image it will blur it, and sharpening before down scaling helps to prevent detail loss as a result of that downscale blur.
After sharpening the image you will need to cut out the weapon, I am using an alpha mask but you could use the eraser tool as well.

here is the mask I end up using on the screenshot, notice that it isn't really all that precise and is a little lumpy in places. This is because that doesn't really matter. The image is a lot larger than a doom HUD sprite and as a result many of the details will not be as important once scaled down, and since things like the edges of the sprite will need a lot of manual work anyway, it is not necessary to get perfect masking, only to get decent masking.

Now we need to scale this to match the scale of doom weapons. A lot of weapons are widescreen so make sure not to cut the right side of the weapon off when doing this step. This is done in 3 steps, first you will resize the image so that the height is 240px. When resizing you will want to use the best quality resizing method and you will want to maintain aspect ratio. Next we want to crop the image so that the screen size is 320. Finally we want to resize the image again, but we do NOT want to preserve the aspect ratio this time. Set the height to 200 and leave the width at 320. This will get you a weapon properly sized for Doom.

This is the final product of all that resizing. Notice that it is squashed a bit. The in game sprite will be vertically stretched a bit so this squashing is required to make the weapon look right in game.

Next you will use the magic want to select the empty area around the weapon. While it looks empty it really isn't, and there are a lot of faint pixels hanging around the weapon so adjust the tolerance/threshold until the selection looks like it is actually around the weapon. Delete this selection, now select the actually empty space and invert your selection. Create a new layer underneath the weapon and fill in this selection with black then merge the weapon layer onto the black silhouette and greyscale it. This process makes edge cleanup a lot easier later, and preps the weapon for the colouring step.

Now in the source material the weapon is blue, but doom doesn't have good blues, it has a lot of browns though, so wen in doubt make the weapon brown. In this case I want to go with a golden grown so we will start by masking all the brown parts with orange. Orange and brown are really the same colours so this will end up working out for us.

Setting the orange layer's blend style to overlay gets us a dark orange weapon

Setting the orange layer's blend style to overlay and lowering the opacity gets us a dark brown weapon This dark brown is the right colour, but we want it to be brighter.

Duplicate the colour layer and make it white instead of orange. Leave the blend style as overlay and put it underneath the orange layer. Mess with the opacity until you the brightness looks right to you.

Then we will convert the image to the doom palette to get an idea of whether the colour's translate properly. I use Slade for this. In this case they are fine but if they looked bad you would need to make adjustments to the orange colour layer until you are happy with the results. We will not be using this paletted version for any editing, this is only to check on the suitability of the colours we are using.

The next step is lighting, and we start with edge highlighting. the source does a good job of this already, but for a sprite that is statically lit we will need to accentuate the edges a lot more than you would in a 3D game. Start by drawing lines like shown over the edges that would receive lighting. But this is a 2D image and the actual level will have lighting that conflicts with what you show on the sprite all the time, so do not worry about the lighting being accurate, but rather the lighting should be suggestive of the shape of the weapon.

Using the gradient tool fade make these lines fade out gradually so that edges farther forward or edges receiving more light are brighter than other edges. Then place the edge layer underneath the colour layer and set the edge layer's style to overlay.

Now we are ready for edge highlights to the grey parts, you will follow the same process as you did for highlights of the brown areas. I do these in separate steps to avoid highlight lines that cross between colours, as that can look strange once colours are applied. This has more to do with how the overlay blend style works than anything else, so if you are using that method you might not have to worry about it.

Now we have all the edges highlighted, but there is still surface lighting to do. This step comes after edge highlighting since it is easier to get the surface dimensions right after you have properly accentuated their edges

Surface lighting is simple, simply draw a solid white or black shape over a surface, and use the gradient tool to fade darker towards the screen. Keep in mind where parts of the weapon might cast shadows as you will have to hand draw those shadows in at this step. This is what the image looks like with the base and colour layers disabled.
At this point you would also work on shading for the barrel of the gun, but since this particular weapon does not have a traditional gun barrel I can't directly show how that works. It is very similar to how the shading for the rest of the gun works though, so if you are doing good with shading you will be fine with the barrel.

With the weapon in the doom palette you can do a bunch of manual pixel-pushing. Generally most of this work is spent making the edges of the sprite look neater, as well as adding any sort of detains to the sprite that deviate from the initial design. A lot of times there will be details that don't really make sense after scaled down, or parts where you can't get the lighting to look quite the way you want and for things of that sort you would try to draw completely new stuff over top of what is here. The shading techniques from earlier are really handy here but the from-scratch stuff is something that another tutorial can teach more thoroughly. Another thing to do at this step is to do any dithering you need to do or any pixel technique that is easier to do by hand. There are ways to paint on dither, but that is for a different tutorial.
User avatar
zrrion the insect
Like a fish in a child's hands.
Joined: 25 Jun 2009
Location: Time Station 1: Moon of Glendale

Re: Screenshot cleanup

Postby MFG38 » Sun Sep 06, 2020 4:53 am

This should prove helpful in case I ever get into doing more sprite work beyond recoloring existing ones. Thanks! c:
User avatar
Joined: 14 Apr 2019
Location: Finland
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia (Modern GZDoom)

Re: Screenshot cleanup

Postby Lagi » Sun Sep 06, 2020 11:43 am

awesome, hope someone use it to make some good looking rip offs
User avatar
Joined: 23 Jun 2018
Location: Thou shalt alter thy beliefs with new evidence

Re: Screenshot cleanup

Postby Captain J » Sun Sep 06, 2020 10:36 pm

Improving the sprite from the blurry screenshot or video is quite hard to accomplish. But you somehow did it! With this knowledge, the process would much better.
User avatar
Captain J
That's Amoreee
Joined: 02 Oct 2012
Location: A Year old Pizza Box
Discord: DiscussJ#3128

Re: Screenshot cleanup

Postby Cardboard Marty » Fri Sep 11, 2020 8:38 am

Great tutorial! We use a lot of the same techniques, but the gradient highlighting was a genuine eye-opener for me! Excellent stuff!
User avatar
Cardboard Marty
"WHAT??? YOU are telling me the guy just updates when ever he wants?"
Joined: 23 Oct 2004
Location: Blue Vertigo HQ
Discord: Cardboard Marty#1337
Twitch ID: CarlosAtBV

Return to Tutorials

Who is online

Users browsing this forum: No registered users and 0 guests