3 ms·
I wrote a basic allocator for runtime lightmap packing (a very different problem than dynamic image packing tbf), and a simple skyline got me very good results,
by Jasper_ 6y ago
I wrote a basic allocator for runtime lightmap packing (a very different problem than dynamic image packing tbf), and a simple skyline got me very good results, for about 50 lines of code:
https://github.com/magcius/noclip.website/blob/master/src/SourceEngine/BSPFile.ts#L407-L464 https://github.com/magcius/noclip.website/blob/master/src/So...
Compared to shelf, I think it did really well on the input data I had. I didn't even use the Halo Reach tricks for removing border padding when packing subpixel lightmaps!
- mooman219 6y agoThe skyline algorithm is definitely very pleasant to work with and has some impressive results! Adding additional heuristics on top of it is also very straightforward which is great.