Age | Commit message (Collapse) | Author |
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
It was possible to delete a masked vertex during collapsing. Looks like
this is one of the causes for hangs during masked flood filling.
|
|
also replace AT with __func__ since AT expands the full pathname
|
|
When node face gets deleted, added or exchanged, the nodes should update
their draw buffers, normals and bounding boxes. This was not being done
before so there were graphical glitches apparent, especially in collapse
mode.
|
|
|
|
|
|
intersection, since detail determines the maximum allowed triangle edge
size
|
|
Located on topology panel.
To use just click on button and click on mesh.
Operator will just use the dimensions of the triangles below to set the
constant detail setting.
Also changed pair of scale/detail size with nice separate float
percentage value.
|
|
Nothing spectacular here, fill tools are easy. Just take the dyntopo
code and repeat until nothing more to do.
The tool can be located in the dyntopo panel when the dyntopo constant
detail is on.
Also added scale factor for constant detail. This may change when detail
sampling gets in, I am not very happy with having two numbers here,
still it will give some more control for now.
|
|
|
|
|
|
Main issue here is that glBuf* calls were invoked from threads different than
main thread. This caused a crash (since those do not have a GL context active).
Fix here is twofold:
* add an ID buffer in buffer pool that handles pbvh buffers and is freed
from main thread when gpu_buffer_pool_free_unused is called.
* do not create glbuffers in derivedmesh creation routine, rather tag nodes
for update and create those in the draw function
(guaranteed to be called from main thread)
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D169
|
|
reflect that. Previous name GPU_Buffers was very similar to GPU_Buffer,
renamed to GPU_PBVH_Buffers
|
|
|
|
size (~85% wasted space).
|
|
|
|
* The mask was not subdivided properly on splitting edges, which gave interesting
but definitely wrong fractal-like borders around masks.
* Edge splitting was only done where the mask was < 50%, with the reasoning that
you can't do a 50% topology update. But this gives an ugly border in the mesh.
The mask should already make the brush move the vertices only 50%, which means
that topology updates will also happen less frequent, that should be enough.
|
|
remove a vertex from the pbvh if the only face it was part of was
removed from the pbvh. This should work but no time to investigate now
properly, and better have a solid release. The problem could be seen
when sculpting to open meshes. Some vertices and faces on the boundaries
would become stuck and unresponsive.
|
|
|
|
sculpting, store offset directly.
|
|
|
|
also avoid allocs per node in pbvh_bmesh_node_limit_ensure()
|
|
|
|
calloc. Since we copy the first 1/1.3 part of the new array from the
existing nodes, only the rest 0.3/1.3 should be initialized to zero.
This should in theory cut down the times of occasional hangs with
dyntopo, since my guess is that it is caused by dynamic reallocations.
Maybe a linked list structure would help here? This is a bigger change
though, leaving as is for now.
Also, minor cleanup, delete duplicate ghash deletion and remove unneeded
commented code.
|
|
vertex and edge),
also replace BM_face_create_quad_tri_v with BM_face_create_verts
|
|
side in some cases it gets a bit confusing.
also correct edge-rotate where bool->flag conversion worked by accident.
|
|
|
|
* Actually check if normal recalculation flags exists and set it when
splitting nodes in dyntopo. Right now, nodes that need GPU buffer update
will always get in the list to get their normals generated, but to avoid
a possible future breakage better do it right now.
* Avoid keeping deleted/removed vertices in vertex-to-node and unique
vertex hashes, since some checks rely on those and may go awry if these
still exist. Also they pollute the hashes, and may hurt performance
somewhat.
|
|
Turn off pbvh normal update flag after recalculation, saves
recalculating normals every frame when not stroking the mesh.
For this to work reliably with undo we need to support original normals
in the bm_log (was marked as a TODO already in the code), so that
undoing avoids having invalid normals in the mesh (since we don't update
every frame anymore). This was added in this commit as well.
Also added some (disabled) quite paranoid checks in the bmesh valication
code for dyntopo hoping to catch the real normal update issue. No luck
there yet.
|
|
and undo buffers.
When we have smooth shading we must not only update the unique vertex
normals.
|
|
avoids remove,insert and only hashes the key once.
|
|
|