Monday, March 21, 2011

Dev-corner: Primer to texture creation

So you got this shiny 25 megapixel camera from your grandma last Xmas, and are getting bored making photos of your cat with it? Put it too a good use and make some environmental pictures and upload them to the burning well!
Wait, you don't have a rich grandma?... well take some photos from the website above (all public domain) and convert them to some nice textures to use in games ;)

And of course FOSS is to the rescue and provides you with all the tools you need:


Most importantly THE GIMP of course! Which is the premier open-source image manipulation software, that doesn't need to hide behind other commercial programs starting with Photo and ending with Shop (the other major FOSS contenders being Krita and MyPaint both in that order aiming more at digital paining then image manipulation. Oh and check out Alchemy for a funny sketching app.).

Creating a seamless texture


So what you will normally want to do is take a picture that shows a relatively flat surface with an interesting pattern and not too strong shadows (a cloudy day with a lot of diffuse lightning is best is you want to take photos yourself).

Based on this you take a small part and try to make it seamless, e.g. make the edges fit to each other so that it can be tiled endlessly on a 3D surface in a game.


The guys at OpenClonk have a pretty nice tutorial about the manual process.
However nowadays there are also some smart algorithms available as GIMP plug-ins that try to do the job for you (with better or worse results, but it is for sure a lot faster). Here is an example with a short tutorial of what I did in less then 5 minutes with the perhaps most advanced of these plug-ins: Resynthesizer. Another, which looks good too but I have not tried is Texturize. However the latter does not remove your ex-girlfriend from your favorite holiday shots, so 1:0 for Resynthesizer :)

Making a normal map for your texture


So your are working on the next super MMORPGFPS super Counterstrike killer with next-next-next-gen graphics? Well then your texture (don't go for anything lower that 10,240 x 10,240 for your toilet door textures!) needs a normal map of course!



But don't worry, there is a GIMP plug-in for that too!

So there you have it... start making some texture packs and upload them to OpenGameArt!

Provide feedback:

Due to SPAM issues we have disabled public commenting here.

But feel free to join our forums or easily chat via IRC with us.