Looking for an algorithm

Miscellaneous Forums/General Discussion/Looking for an algorithm

Hi,

I'm looking for a way to automatically place my sprites on a single texture. That means I need to fill a big rectangled area with n smaller rectangles (changing sizes, otherwise it would be easy). I got no problem with placing them anywhere on the texture to just not overlap themself, but placing them the most efficient way is tricky.

I think chances are good that someone had this problem before and there is an existing algorithm that could help solving this puzzle.

If I only have a clue about the algorithm name or a keyword to search for...

Jake

there's quite a few packing algos kicking around, usually used for light maps.

http://www.blackpawn.com/texts/lightmaps/default.html

Just found:
http://www.blitzbasic.com/codearcs/codearcs.php?code=1208

Thanks a lot, that helps!