Has anybody written or found an algorithm for performing this operation?
I’m totally amazed there are no resources on the web offering an open source solution to this problem, even poor implementations seem to not exist =/
While I understand the complexity of the problem, a generalized solution should be totally reusable - afterall, a rectangle is a rectangle!
The only problem specific aspects are specializations in the type of rectangles that are present in the input dataset.
I would expect every single game developer has at one time or another come across this problem, as it is fundamental to optimal texture-page arrangement.
My instance of this problem is in the domain of J2ME development, where memory is at a premium - so optimal use of textures is critical.
That said, scalability is also paramount, so automated packing of texture data is of critical importance also. (doing it by hand is simply not an option)