Status: Prototype implemented in D8983 with all optimizations included for Meshes, but only for some tools and features. Needs to be split into multiple patches and implement all remaining features.
Team
Commissioner: @Daniel Bystedt (dbystedt)
Project leader: @Pablo Dobarro (pablodp606)
Project members: -
Description
Big picture: Improve the performance of Sculpt Mode brushes and tools.
Use cases:
- Edit geometry surface detail in high poly meshes without performance issues
Design:
Remove all unnecessary calculations and updates from the PBVH when an editing operation is active, making all the Sculpt Mode code work only with the relevant vertices per brush step. The PBVH should only be used to get the affected area by the stroke as fast as possible.
Engineer plan:
- Get the PBVH code ready to have much smaller leaf node sizes
- Store draw buffers in intermediate nodes to reduce the size of the leaf nodes of the PBVH.
- Make proxies, bounding box and normal updates optional per tool and per symmetry options.
- Do fast bounding box recalculations by updating the bounding boxes when deforming and propagating them from children to parents nodes to the root of the tree.
- Implement optional fast normal updates (single loop) for brushes that require them.
- Replace per node undo with a per vertex undo, which will also be used to get the original data during the stroke.
- Remove BMesh based dyntopo (to be replaced with a better implementation).
- Remove all loops over nodes from the code that runs when a stroke is active.
- Configure the optimal settings of the scheduler per tool.
- Make special tools (Pose, Boundary, Elastic Deform) not use the PBVH for getting the affected area. Cache the affected area of these tools once their data is initialized.
Work plan
Milestone 1 - optional name
Optimize PBVH queries and drawing
Time estimate: 2 - 3 weeks
Milestone 2 - optional name
Rewrite task scheduling and per vertex updates.
Time estimate: 3 - 4 weeks
Relevant links: