Blender Git Loki

Git Commits -> Revision b01dd74

Revision b01dd74 by Antonis Ryakiotakis (master)
May 12, 2015, 19:03 (GMT)
Dyntopo PBVH build optimization:

Optimize the full rebuild case for now (though same code can be adapted to
partial redraws)

Main changes here:

* Calculate bounding centroid for faces only once (instead of every intermediate node)
* Faces do not get added to GSets immediately, instead we track a face
array which has faces that belong in a node in consecutive order.
Nodes just keep accounting of start and length in the array.
* Due to faces not being added to GSets, we can skip doing cleanup of GSets
and readdition for each intermediate node and instead only
add the faces to the final leafs node GSets when those nodes are created.

Results:
For a 1.9 million face test model, PBVH generation time (roughly measured by undoing) is
dropped from 6 seconds to about 4 seconds. Still too high, but still a nice improvement.

TODO:
Thread some parts. Unfortunately threading the GSet assignment part might not help much since
we'd need a lot of locking to avoid collisions with node assignments, especially for unique vertices.

Commit Details:

Full Hash: b01dd748b6a69ddda5687338d9755238beeb8440
Parent Commit: f097453
Lines Changed: +247, -25

1 Modified Path:

/source/blender/blenkernel/intern/pbvh_bmesh.c (+247, -25) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021