Lightmap packing...

Blitz3D Forums/Blitz3D Programming/Lightmap packing...

mrtricks(Posted 2004) [#1]
Does anyone know of any good tutorials or code examples for algorithms to fit lightmaps efficiently into a bitmap? Ie taking all the different size rectangles and figuring out how to arrange them in the bitmap to not waste any space?


Mustang(Posted 2004) [#2]
http://www.blackpawn.com/texts/lightmaps/


Ice9(Posted 2004) [#3]
You might look at the YAL code in the archive. That links looks like the way it's being done YAL.


EOF(Posted 2004) [#4]
That's a good link Musty. I have learned a lot from that site. I'm almost done making an image packer which uses the algo. It works quite well: