   Texture placement within atlas
  As a side project i've been writing a few handy texture atlas tools and i've struck upon an automation problem........Assuming arbitarily sized textures (or at least 2^n), Is there an efficent algorithm for determining the best placement of each texture within the atlas?One idea i had was to start with an AABB quadtree, then each time i place a texture subdividing it into 4 more nodes (one holding the placed texture the other 3 at the vertices of the parent node).... then each time i place another texture i traverse the tree until i find the unused AABB which is as close to the size of the texture as possible(but still greater than). This will probably work, but im wondering if this is just a standard problem which already has some optimised solutions? Im guessing there is at least a few good approximate solutions, or even an optimal one, but im probably not up to the math....   
  The magic google (and forum) search words are "rectangle packing" and "bin packing". Unfortunately this problem is NP complete, but there are some approximate solutions that work quite well.There are other threads on this forum that discuss this, just search for "rectangle packing".   ;  Ok thanks, i guessed it was a pretty standard problem. Thanks for the google words, thats all thats really required nowdays.   