Age | Commit message (Collapse) | Author |
|
|
|
Six years ago, Bug T44961 about unwanted spikes had me not do a loop
slide if the angle was too extreme, to avoid unwanted spikes.
The current bug showed that that angle was much too big, and limited
desired behavior in many cases. Changing the angle from 0.25 radians
to 0.0001 radians (about 0.006 degrees) still fixes the original bug
and seems very unlikely to be limiting desired behavior now.
|
|
|
|
Share functionality for single and multi-threaded edge-split tagging.
Remove logic that ensured vert & loop indices in bm_mesh_edges_sharp_tag
(missing from fd9fc809b76d625a1ead6e1fbe5e486cc012f5f3).
|
|
The only difference with BM_loops_calc_normal_vcos was passing in
custom coordinates which may be NULL.
|
|
bm_mesh_edges_sharp_tag was called with setting sharp edges enabled.
Error in 39b2a7bb7e815e051348bf5c5ec777d091324164.
|
|
This was added in 0b7f5813973c515b84cd7c18ef6d7d1e59374237
but seems not to be needed as the assignment was never correct
since only one corner on either side of the smooth edge had the
vertex normal written to it.
|
|
Merge the sharp edge tagging into bm_mesh_loops_calc_normals,
this has the advantage that edge tagging can be performed as part of
walking over each vertices edges - instead of tagging in a separate loop.
Even though this will tag edges twice (once for each vertex),
the computation isn't heavy as it's only calculating a dot-product
between the two face users to compare the angle.
This change combined with 4ba06ad0a8cdec66d9a9cb06f982736d46c40f4c
makes BM_loops_calc_normal_vcos around 5.68x faster,
with an overall speedup over 2.6x when transforming a high poly mesh.
(tested on a system with 32 cores).
Reviewed By: mont29
Ref D11970
|
|
Supported multi-threading for bm_mesh_loops_calc_normals.
This is done by operating on vertex-loops instead of face-loops.
Single threaded operation still loops over faces since iterating
over vertices adds some overhead in the case of custom-normals
as the order used for accessing loops must be the same as iterating
of a faces loops.
From isolated timing tests of bm_mesh_loops_calc_normals on high
poly models, this gives between 3.5x to 10x speedup,
with larger gains for meshes with custom-normals.
NOTE: this is part one of two patches for multi-threaded auto-smooth,
tagging edges as sharp is still single threaded.
Reviewed By: mont29
Ref D11928
|
|
While doxygen supports both, conform to our style guide.
Note that single back-tick's are already used in a majority of comments.
|
|
|
|
|
|
|
|
This shows the text as part of the assertion message.
|
|
Use more direct access to next/previous vertices.
- `BM_edge_other_vert(l_curr->e, l_curr->v)` -> `l_curr->next->v`.
- `BM_edge_other_vert(l_curr->prev->e, l_curr->v)` -> `l_curr->prev->v`.
Add asserts to keep the intention clear.
|
|
Only DNA_customdata_types.h is needed for BMEditMesh.
|
|
|
|
|
|
|
|
Reserve the term count for values that require calculation
(typically linked lists).
|
|
Using BMesh operators through the edit-mesh API created a full copy
of the mesh so it was possible to restore the mesh in case
one of the operators raised an error.
Remove support for automatic backup/restore from the EDBM_op_* API's
as it adds significant overhead and was rarely used.
Operators that need this can use the BMBackup API to backup & restore
the mesh in case of failure.
Add warning levels to BMO_error_raise so operators can report problems
without it being interpreted as a request to cancel the operation.
For high-poly meshes creating and freeing a full copy is an expensive
operation, removing this gives a speedup of ~1.77x for most operators
except for "connect_verts" / "connect_vert_pair"
which still uses this functionality.
|
|
Previously, any face groups that could not be merged into a face
caused the entire operation to report an error and do nothing.
Now these cases are skipped over, dissolving faces where possible.
|
|
- Only create arrays with groups of two or more faces.
- Remove raising exception for zero length arrays.
- Remove redundant exception check (assert there is no exception).
- Use a struct for face array & it's length instead of a NULL
terminated array (removes the need to count faces in a loop).
|
|
Also use doxy style function reference `#` prefix chars when
referencing identifiers.
|
|
|
|
|
|
The error codes could be used to look up messages from a table
of messages however this wasn't especially useful.
Now all calls to BMO_error_raise must inclue a message.
|
|
Normals now includes many functions including normal splitting &
custom normal manipulation split this into it's own file
to centralize related functions.
|
|
|
|
|
|
|
|
Skip updating normals & tessellation for contiguous geometry regions
for operations such as translate & uniform scale.
This means when all geometry is selected, no updates are needed
as the relative locations of vertices aren't being modified.
Performance:
As this is skipping a multi-threaded operation,
larger improvements are noticeable on systems with fewer cores.
- ~1.15x to ~1.3x overall gain for 32 cores.
- ~1.7x to ~2.2x overall gain for 1 core (limited using `-t 1` argument).
Details:
- Rotate & non-uniform scale only skip tessellation.
- Proportional editing and axis-mirror have special handling
ensure geometry is properly grouped before considering
a face part of a single group that can be skipped.
- Loose vertices always need their normals to be recalculated
since they're calculated based on the location.
- Non-affine transform operations such as shrink-fatten & bend,
don't take advantage of this optimization.
- Snap projection also disables the optimization.
|
|
|
|
|
|
The "extrude" operator with the "use_dissolve_ortho_edges" option assumed
the edges were connected.
|
|
|
|
This patch fixes many minor spelling mistakes, all in comments or
console output. Mostly contractions like can't, won't, don't, its/it's,
etc.
Differential Revision: https://developer.blender.org/D11663
Reviewed by Harley Acheson
|
|
Invalid face normals were used for tessellation.
|
|
This patch uses threading to flush selection from verts to edges and
from edges to faces. The solution is lockless and should scale well on
modern CPU architectures.
Master:{F10185359}
Patch:{F10185361}
End user performance went from 3.9 to 4.6 FPS (Stanford Dragon) but that
was measured on a Intel Core i7-6700 CPU and AMD RX480 Gpu. The more
cores the better improvements you get.
Reviewed By: mano-wii
Differential Revision: https://developer.blender.org/D11644
|
|
Mistake in recent commit {rBea4309925f1d2d2a224bd1dce12269a58ade9b62}.
|
|
Use the face normal (when available) for a faster concave quad test.
|
|
Error passing `false` instead of a `BMeshCalcTessellation_Params` struct.
|
|
During selections the total selection is refreshed at the end. This
process was done single threaded. This patch will do a parallel iter
approach.
Master: 0.043612s Threaded 0.017964s.
Master: {F10179586}
This patch: {F10179587}
Reviewed By: mano-wii
Differential Revision: https://developer.blender.org/D11622
|
|
This patch ensures that selection mode flushing updates total selection
counts internally. This reduces recounting when we are sure that the
input total selection counts were up to date.
For example for circle selection the total selection counts were
correct. But during flushing the selection could have been changed and
therefore the selection was always recounted.
This increased the performance on selected system from 6.90 FPS to 8.25
FPS during circle selection operations.
Before: {F10179981}
After: {F10179982}
Reviewed By: mano-wii
Differential Revision: https://developer.blender.org/D11647
|
|
|
|
This matches BMesh which also has tessellation in it's own file.
Using a separate file helps with organization when
extracting code into smaller functions.
|
|
`bm_face_len_cmp` incorrectly interpreted its arguments as `BMFace *`
instead of `BMFace **`, causing an out-of-bounds read.
Ref D11637
|
|
"void' function returning a value".
|
|
This catches missing normal updates that may cause invalid tessellation.
|
|
This value is always 'sides - 2', no need to return this value.
|