The time has come for me to finally update Bakery's vertex baking. Now instead of using vertices as sample points, it randomly places them on triangles and filters. No UVs required, works with color/shadowmask/dir/SH.
You can try it in the latest patch :)
https://geom.io/bakery/wiki/index.php?title=Github_access
Github access - Bakery GPU Lightmapper: Wiki

@mrf Least squares vertex baking?
@castano nah, just weighing by barycentrics 🥲
@mrf You should give it a try, it makes a huge difference!
However, the hardest part of vertex baking is identifying invalid samples, so that they don't smear the whole triangle.
@castano I'm kinda frightened by the math, and not sure if it's easy to port to the GPU (my current weighing is on the CPU, but I want to move it to the GPU eventually, since it's annoying to process so much similar data there)

@mrf In case it helps, there's an example implementation here:

https://github.com/nvpro-samples/optix_prime_baking/commit/d0be3a3f06faa98a08e851674ccce58e8edc350b#diff-68acc5b1069a9aac5d5f4e2e8d97910d745363135bf5b8f1699dabd24db77bc8

I don't know why it was deleted from the repository. I think there are some small errors there, though: https://github.com/nvpro-samples/optix_prime_baking/pull/3

Note that you can easily avoid the Eigen dependency using a conjugate gradient solver on the normal equations and that works well in my experience.

I haven't thought about fully implementing it in the GPU... It should be possible, but I wouldn't bother.

@castano thanks, I know this example :) Will try it eventually, but I'm sceptical of performance for high-poly geometry and if the quality difference really worth it... with RT hardware it's possibly faster to just throw extra rays on it
@mrf More rays won’t help. If the colors have a non linear distribution splatting/averaging won’t produce the correct result. You want to minimize the differences between the linear approximation and the original signal.
I was very impressed with the results. Without it you would get what looked like vertex interpolation artifacts.
@castano @mrf Yeah, and it's really worth it. Decades ago when I worked on baked lighting artists were tesselating everything like crazy in order to avoid those vertex interpolation artifacts, and least square optimization heavily reduced polycount in our scenes :).