Lightmap packing
Hello all!
Does anyone knows if there exists an algorithm to optimally pack a given set of polygon into texture quads so that texture space wasting is minimal and the number of texture to use is minimal?
I would be interested also in related papers or in your ideas.
*Optimal* might be tricky. I know I''ve seen at least one paper on this specific subject (lightmap packing) but I can''t for the life of me remember its name or author. A simple method which isn''t optimal but might be good enough is to compute the individual lightmap rectangles for each polygon and then pack those rectangles into your set of lightmaps. A simple greedy algorithm using quadtrees works ok for the actual rectangle packing (although you will likely wind up with slivers of wasted space).
How much space is wasted depends on the polygon shapes, if they are mostly rectangular, of similar sizes then you''ll get nice packing, if they are all long triangles then you could easily waste half or more lightmap space.
How much space is wasted depends on the polygon shapes, if they are mostly rectangular, of similar sizes then you''ll get nice packing, if they are all long triangles then you could easily waste half or more lightmap space.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement