Age | Commit message (Collapse) | Author |
|
|
|
|
|
This is a regression introduced by 77ac33d and was caused by use-after-free
mistake.
|
|
Keep index using the outer scope for GHASH iter macros,
while its often nice, in some cases to declare in the for loop,
it means you cant use as a counter after the loop exits, and in some cases signed/unsigned may matter.
API changes should really be split off in their own commits too.
|
|
GPU_buffer no longer has a fallback to client vertex arrays, so remove
comments about it.
Changed a few internal structs/function interfaces to use bool where
appropriate.
Use for-loop scope and flexible declaration placement. PBVH does the
same thing but needs ~150 fewer lines to do it!
The change to BLI_ghashIterator_init is admittedly hackish but makes
GHASH_ITER_INDEX nicer to use.
|
|
Useful for re-using a buffer when the existing data can be thrown away.
|
|
Since many callers only need a single triangle
|
|
When 'Front Faces' brush option was enabled, dyntop would still adjust detail on back-faces.
|
|
|
|
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.
|
|
mixed up squared nonsquared length, also remove invalid verify check.
|
|
|
|
|
|
While adding edges to the queue multiple times is redundant,
walking over them is still needed.
|
|
|
|
|
|
Normals from subdivided edges were only taken from the edges first vertex.
Interpolate between the two to give more even results.
|
|
This isn't a bottleneck but may as well avoid the extra ghash overhead.
|
|
Use tagging to avoid re-evaluating the same edges while sculpting.
While gives only minor speedup,
it allows for changes to the queue without additional redundant checks.
|
|
|
|
|
|
Dyntopo can currently create skinny faces,
especially when the faces are much larger then the resolution.
To get the old behavior, set debug value to 1234
|
|
|
|
|
|
|
|
add BM_***_count_is_over(), _count_is_equal()
Useful if we only want to know if the count is a smaller value.
|
|
|
|
Detect this from the element type, also typecheck lookup functions
|
|
|
|
|
|
|
|
also correct buffer type
|
|
|
|
also rename BLI_edgeset_reinsert -> BLI_edgeset_add, in this case its the same.
|
|
Set hidden when rebuilding the PBVH tree if all primitives are hidden.
|
|
Opted to keep includes if they are used indirectly (even if removing is possible).
|
|
It makes code more tidy (avoids having to call invalidation on a myriad
places). Also makes sure other invalidation cases (some mesh change,
e.g.) work as expected.
|
|
Don't use a dedicated node layer but use temporary int layer instead.
Works like a charm as long as we are careful resetting the layer when
needed (after pbvh clearing and always after bmesh has been filled in
undo)
Tip by Campbell, thanks!
|
|
Store PBVH node ID in CustomData. This avoids a number of hash deletions
and checks/insertions on big hashes.
|
|
recalculation, only faces can change normal invalidation.
|
|
|
|
changes.
|
|
|
|
|
|
While hiding, flush the hidden flags to the faces. This avoids iterating
through all the loops while updating the GPU buffers.
|
|
|
|
|
|
|
|
|
|
|