Blender Git Loki

Git Commits -> Revision 3078c80

Revision 3078c80 by Brecht Van Lommel (master)
November 2, 2009, 18:47 (GMT)
Sculpt: Multithreading & PBVH Changes

* Sculpting, normal update and bounding box code is now multithreaded
using OpenMP.
* Fix a number of update issues: normals on node boundaries, outdated
bounding boxes, partial redraw, .. . There's probably still a few
left, but should be better now.
* Clicking once now does a single paint instead of two (was also
painting on mouse up event).
* Smooth shading now is enabled for the full mesh when the first face
uses it (so it can be tested at least).

Implementation Notes:

* PBVH search can now be done either using a callback or bt gathering the
nodes in an array. The latter makes multithreading with OpenMP easier.
* Normals update code is now inside PBVH, was doing it per node before but
should do all faces first and only then vertices.
* Instead of using search modes + 1 modified flag, now nodes get 4 flags
to indicate what needs to be updated for them, found that this makes it
easier for me to understand the code and fix update bugs.
* PBVHNode is now exposed as an abstract type, I think this makes it more
clear what is happening than having it's data passed as part of callback
functions.
* Active_verts list was replaced by looping over nodes and the vertices
inside them. However the grab brush still uses the active_verts system,
will fix that later.
* Some micro-optimizations, like avoiding a few multiplications/divisions,
using local variables instead of pointers, or looping over fewer vertices
to update the bounding boxes.

Commit Details:

Full Hash: 3078c806358c4c802e0d2df66a2b9a13471128c1
SVN Revision: 24257
Parent Commit: 00d5fd9
Lines Changed: +1030, -655

8 Modified Paths:

/source/blender/blenkernel/BKE_mesh.h (+1, -0) (Diff)
/source/blender/blenkernel/intern/brush.c (+1, -1) (Diff)
/source/blender/blenkernel/intern/cdderivedmesh.c (+24, -71) (Diff)
/source/blender/blenlib/BLI_pbvh.h (+76, -40) (Diff)
/source/blender/blenlib/intern/arithb.c (+5, -4) (Diff)
/source/blender/blenlib/intern/pbvh.c (+391, -165) (Diff)
/source/blender/editors/sculpt_paint/paint_stroke.c (+17, -18) (Diff)
/source/blender/editors/sculpt_paint/sculpt.c (+515, -356) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021