Files
test2/source/blender/geometry
Jacques Lucke 0a430fb8cb Geometry: speedup reverse UV sampler
This implements a new internal data structure for reverse uv sampling.
Being better than the previous one was not particularly hard, because it
was never really optimized and used a very simple approach. I found the
new implementation to be about 10-20x faster in my tests. Simon was
able to reproduce an comparable speedups in production files.

The speed-up is mainly achieved by a better memory layout and better
multi-threading during construction. The lookup performance is mostly the
same as before.

Like the old data structure, the new one also splits the uv space into
uniformly sized cells.  The size of the cells is based on the number of
triangles. Then it sorts all triangles into the rows that they touch. Finally,
it creates a flat array for each row that contains the triangle indices
contained in each cell.

There are still ways to optimize this further, but for now this is a good
improvement already.

Pull Request: https://projects.blender.org/blender/blender/pulls/118772
2024-02-29 16:42:36 +01:00
..
2024-02-15 16:37:54 +01:00