View Full Version : The industrial revolution in extracting images


Kyriakos
Sep 07, 2011, 09:10 AM
I was not pleased with my previous method taking 2-3 min of boring work to do this, so i found a new one.

The following is a tutorial using Gimp (greek version) but i guess other programs also have this option or something similar.

Step 1.

Load up your image, complete with its background as it was generated by the 3d program, or as you found it on the web.

http://i.imgur.com/TI0LV.png

Step 2.

Same as in the old method, use the lasso tool to extract a reasonably sized area (most importantly it should have at least 90-95% of all the colors, do that by eye you don't have to calculate anything otherwise). Then use the color selection tool to extract the main tones of the background (i usually extract just 3, but that is workable in the specific bryce background i always have, you may need more)

http://i.imgur.com/rp5Yj.png

Step 3.

Same again as in the old method, paste your part of the model/image, along with the extracted few colours of the background into Gimp, and save it as a 256 color image.

http://i.imgur.com/EETHe.png

Step 4.

Paste your old (complete and unaltered) image onto the new file that has 256 colors. You notice that the background now has less complication, because it conformed to the limited palette.

http://i.imgur.com/sfljU.png

Step 5.

Now the good part begins :) Select the tool of Gimp used for selecting a continuous area of color/texture.

http://i.imgur.com/5GTNJ.png

Step 6.

Click on the background, and watch it nicely being collected alltogether by the tool. Now hit ctrl+x to delete it. You now have the image with very few dots of the remaining background :)

http://i.imgur.com/t4cig.png

Step 7.

Copy/paste the image onto your regular image editing program (i use MS paint). You can now erase the last iotas of background color. All is done! :)

http://i.imgur.com/zs6Aa.png

Thank you for reading. Original model not included. Visit us at facebook as well ;)

Kyriakos
Sep 08, 2011, 08:05 AM
So, no one found this helpful? It saves a lot of time :)

Quinzy
Sep 08, 2011, 10:56 AM
I've been using a similar method for your city sets already :D Good tutorial; thorough!

Supa
Sep 08, 2011, 12:16 PM
I don't understand why you don't just render the buildings over a white background and decrease the number of colors from there.

Edit:

If it's because you want the building shadows to be greenish, you probably can change the refraction settings of the ground, in order to have a green hue on it only where there are shadows.

2nd edit:

If it's due to lack of (real) transparency with PCX and the time it takes to clean up all the dots around the source if the source background isn't close to whatever terrains the PCX would be on in-game..
Perhaps you could render the model over a uniform green hue, unique to the ground, and replace it when your favorite invisible indexed color (1) before saving the final pcx. All the transition pixels from the original green ground colors to the model itself would be left untouched and shouldn't be really perceived in-game.

(1) Either by modifying the color in the indexed palette, then moving in to the last place, or by selecting the color in the RGB image with the GIMP "Select by color tool" with a threshold of 0 and replacing it (big brush) with the chosen color.

Anyway, all this should even faster than your method, taking less than one minute and less brain-power.

Kyriakos
Sep 08, 2011, 12:58 PM
Maybe, but i wouldn't be writing tutorials if i wanted to follow other people's roads :D

Supa
Sep 08, 2011, 01:09 PM
Whatever floats your boat.

WildWeazel
Sep 08, 2011, 10:08 PM
I thought this was for "pirating" graphics from screenshots when the original file isn't available :D