   Slotting multiple images into a single texture
  I want to be able to take in arbitrary rectangular images and stick them together in the same texture.  So I need an algorithm that can find the "best" place to add the image to the texture given a map of used/unused space (a bit like Tetris).I could definitely write something on my own, but this feels like one of those problems that's been solved thousands of times- probably more efficiently than what I'd write.  I just don't know what to google since I don't know the "official" name of the problem/algorithm.Is this a solved problem?  If so, where can I find it?Thanks for any info.   
  It's a "bin packing" problem.I use the approach outlined here as a default.   ;Quote:Original post by QuasiusI want to be able to take in arbitrary rectangular images and stick them together in the same texture.  So I need an algorithm that can find the "best" place to add the image to the texture given a map of used/unused space (a bit like Tetris).I could definitely write something on my own, but this feels like one of those problems that's been solved thousands of times- probably more efficiently than what I'd write.  I just don't know what to google since I don't know the "official" name of the problem/algorithm.Is this a solved problem?  If so, where can I find it?Thanks for any info.If you're looking for an existing implementation, I posted some code to the forums some time ago - you can find it here. If this is for fonts, you should take a look at the AngelCode bitmap font generator.You might also specify what you need this for, as it might help us direct you to more suitable resources.   