Blender Git Loki

Blender Git "temp_bmesh_multires" branch commits.

Page: 8 / 21

May 19, 2021, 19:21 (GMT)
Dyntopo: code cleanup
May 19, 2021, 05:26 (GMT)
* Fix bug with symmetrize creating non-manifold geometry.
* Fix bug in pbvh face create
May 18, 2021, 02:48 (GMT)
Merge branch 'master' into temp_bmesh_multires
May 17, 2021, 21:23 (GMT)
* Fix corner case in last commit
May 17, 2021, 21:02 (GMT)
BMLogFace now stores the face normal.
May 17, 2021, 07:45 (GMT)
Cleanup failed patch reversion
May 17, 2021, 06:32 (GMT)
Merge branch 'master' into temp_bmesh_multires
May 16, 2021, 04:19 (GMT)
Dyntopo now updates the existing pbvh on undo instead of building
a new one from scratch, an operation that can be slow despite being
threaded.

PBVH building is a memory bound operation (not just on the CPU side
either, remember the draw buffers have to be fully regenerated too).
Incrementally updating it this way is enormously faster (about as fast
as non-dyntopo undo).

The downside is we don't have the convienience of users regularly
building the pbvh from scratch anymore. Dyntopo does try to
join empty PBVH nodes (which happens after every stroke), but
that's not a complete substitute for a decent tree balancer.
That's on the todo list.
May 15, 2021, 18:51 (GMT)
Tried to make pbvh bmesh normals calc a bit more efficient.
May 15, 2021, 04:21 (GMT)
fix memory leak
May 15, 2021, 04:12 (GMT)
fix missing null pointer check.
May 15, 2021, 01:26 (GMT)
* Prototyped a faster smooth algo, currently disabled.
* Wrote a new API for wrangling temporary customdata layers across pbvh types:
- SCULPT_temp_customlayer_ensure: makes sure a (named) customdata
layer exists. Works for multires; since these are temporary
layers we can safely allocate them in a temporary CustomData
structure (in ss->temp_vdata).
- SCULPT_temp_customlayer_get: initializes a special structure,
SculptCustomLayer, that is used to get per elem customdata.
- SCULPT_temp_cdata_get: Uses a SculptCustomLayer ref along with
a SculptVertexRef to look up the data.
May 14, 2021, 22:56 (GMT)
Did some profiling with VTune.
* Sculpt code seems to be memory bandwidth bound.
* Some key topology loops will have to be written manually
instead of using BM_ITER.

I wrote a function to re-allocate a bmesh with elements ordered by
PBVH leaf nodes, SCULPT_reorder_bmesh. It's currently disabled.

This is going to take more profiling, but my original proxy refactor
idea might be worth revisiting. Might be more cache efficient.

The good news is that the worst case is the smooth code, which I can speed
up significantly by keeping a bit of state around.
May 13, 2021, 05:27 (GMT)
Update ATTR_NO_OPT macro
May 12, 2021, 23:22 (GMT)
Dyntopo branch

* Sculpt expand now works with dyntopo in more cases
* Fixed various dyntopo face set bugs

Stuff from several commits ago:

* There is now an API to get face sets using SculptFaceRef's.
+ SCULPT_face_set_get
+ SCULPT_face_set_set

* Prototyped a faster geodesic propagation function, but it currently
doesn't work.

* Dyntopo triangulation now preserves face flags (took some work as BM_triangulate_face explicitly prevents selection flags from being preserved).
* Also face smooth flags are no longer being overriden.
* Most of the faceset create operators work (I'm not sure I've tested
all of them though).
* SCULPT_face_set.c now has helper functions that checks if a pbvh
is *not* PBVH_BMESH, in which case it builds a temporary bmesh,
otherwise ss->bm is used (sculpt_faceset_bm_begin and sculpt_faceset_bm_end).
+ Note that some functions were able to use SCULPT_face_set_XXX
instead and avoid bmesh entirely.
May 12, 2021, 05:57 (GMT)
Fix nasty edge case for BMLog.
May 12, 2021, 04:48 (GMT)
Remove yet more debugging crap . . .
May 12, 2021, 04:46 (GMT)
Get rid of various ATTR_NO_OPT debug attributes left from two
commits ago.
May 12, 2021, 04:45 (GMT)
Fix bug in last commit.
May 12, 2021, 04:14 (GMT)
Today I ran outside screaming and an hour later came back in and made BMLog
reference counted. This fixes various undo bugs caused by dyntopo
needing to execute an undo push but not being able too (e.g. during
file load, and I think it also happens sometimes with global undo).

A much better way of fixing this would be to add unique IDs to mesh
verts and faces, perhaps as a customdata layer.

The root problem is that BMLog assigns unique IDs to mesh elements,
which it does via a series of GHash's. I imagine this is a fairly
serious violation of the undo system's design rules, since it means
BMLogs are tied to specific instances of the bmesh in SculptSession->bm.

There were some hacks to try and get around this, but they were buggy
and needed to push the unstack stack to work, which wasn't possible in
all cases (e.g. if G_MAIN->wm.first->undo_stack is NULL, as it is during
file loading and apparently global undo).

Anyway, long story short each chain of SculptUndoNodes needs some way
to reconstruct their ID GHash's when exiting/entering the chain. The
only way I could think to do this was to make BMLog reference counted,
with BMLogEntry the users.

Like I said, having a proper system to assign unique IDs to mesh
elements would be *much* better.
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021