crobi / BakeObj

Combine all materials of an OBJ file into a single texture atlas
8 stars 2 forks source link

Improved packing algorithm #1

Open crobi opened 13 years ago

crobi commented 13 years ago

The algorithm (bottom up quad tree packing) is only good if all input textures are power-of-2 squares. Use a general bin packing algorithm, e.g. http://www.csc.liv.ac.uk/~epa/surveyhtml.html

crobi commented 13 years ago

See also http://stackoverflow.com/questions/1213394/algorithm-needed-for-packing-rectangles-in-a-fairly-optimal-way