Age | Commit message (Collapse) | Author |
|
multires.
Code had special guards for such edges to stop this from happening. I
don't see why this is needed though since code above assigns smoothed
positions for all vertices in the grid.
After removing the guards I saw that this in fact was the only place
where grd adjacency was used, so I completely removed it.
|
|
|
|
Clay brush had a feedback loop with dyntopo,
getting the plane from the cursor center didn't support original data.
|
|
Tessellation data isn't used for drawing or sculpting.
This frees up some memory ~approx 10% in own tests.
Also slight spee-up since it avoids calculating it in the first place.
|
|
|
|
|
|
|
|
|
|
https://developer.blender.org/D643
Separates graphics context creation from window code in Ghost so that they can vary separately.
|
|
|
|
Issue wascaused by the famous OpenMP crap in MSVC2013,
so only way is to use openmp threading if number of BVH
nodes is high enough.
Made it 8 for now, which seems to work rather fine on my
laptop and adult dragon from sintel. But maybe it's to be
adjusted a bit more.
|
|
- BLI_BITMAP_SET -> BLI_BITMAP_ENABLE
- BLI_BITMAP_CLEAR -> BLI_BITMAP_DISABLE
- BLI_BITMAP_GET -> BLI_BITMAP_TEST
- BLI_BITMAP_MODIFY -> BLI_BITMAP_SET
|
|
|
|
Looks like the normal update flag is used internally in the modifier
itself. So as a workaround just pass normal update to the nodes when
flood filling
|
|
Cleanup the normal flag or else the smooth tool will work on more and
more nodes as we sculpt.
|
|
|
|
Set hidden when rebuilding the PBVH tree if all primitives are hidden.
|
|
Avoid filling up buffers when total buffer triangles are zero.
Better still would be to tag a node as hidden when doing recreation of
the PBVH tree by checking for any visible elements. Original bug report
probably has to do with OpenGL doing something funky but hidden nodes
should be tagged as hidden to completely avoid iterating for painting.
This is to be done in a later commit.
Also some naming cleanup for consistency, GPU_build_pbvh_mesh_buffers to
GPU_build_mesh_pbvh_buffers.
|
|
To enable enter debug value 14.
Leaf nodes are green while container nodes are red.
|
|
Opted to keep includes if they are used indirectly (even if removing is possible).
|
|
|
|
Store PBVH node ID in CustomData. This avoids a number of hash deletions
and checks/insertions on big hashes.
|
|
|
|
Issue here is that "show diffuse" option does not respect its intended
purpose which is to be used only for masking.
There are a couple of caveats here:
Dyntopo and multires -always- have mask data enabled, and thus as soon
as one goes to dyntopo mode or adds a multires modifier he would get the
default grey color instead.
Matcaps would break when nodes asked for a diffuse material color (this
was broken before too). Solved by adding global material state for when
matcaps are enabled. Also matcaps don't always played well with VBOs
off.
Added a few more missing updates for mask operators to notify
show_diffuse property as changed. This was also needed on rebuilding
dyntopo pbvh.
Also make zero mask color duller again after artist feedback.
|
|
Was marked as a todo in the code.
This does not yet take care of correct display for multi material
meshes, since it would need correct separation of faces during pbvh
creation. Instead we just take material of first face in node and assume
that the rest faces have the same. This will create some funky effects
if one attempts to sculpt in this way.
Note: This does not yet address T39517
|
|
|
|
|
|
dyntopo
Layer brush would not invalidate the layer_disp arrays in dyntopo mode,
checking only for the existence of the array. This means that if a tool
resized the node due to topology changes, the layer brush code could
index (and write!) out of bounds in the array. Solution is to invalidate
the layer data prior to each stroke in dyntopo.
|
|
|
|
to previous sculpt fix (OpenGL access from thread with no context
bound). The fact that this has gone unnoticed so far means that people
are dyntopoing like crazy these days.
|
|
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
|
|
|
|
Summary:
Issue here most probably is that the start point in ray-casting is too
far away from the mesh. As a result the triangle intersection code can
sometimes miss the ray intersection. To solve this, we project the ray
segment to the boundary of the root node.
Reviewers: brecht, sergey, campbellbarton
Reviewed By: brecht
Maniphest Tasks: T37177
Differential Revision: http://developer.blender.org/D115
|
|
Current redraw options also did an unnecessary normal recalculation on
updated nodes.
Also, for the box and lasso mask only push an undo node if any vertex
has actually been influenced.
|
|
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.
|
|
|
|
each element was having the size of PBVHNode allocated rather then the size of a pointer (8 vs 184 bytes here)
|
|
hides that an arg passed is really an array which may be modified by other functions.
|
|
|
|
|
|
was renamed fairly recently but other similar iterators not negated
like this, would prefer to keep it as it was
|
|
also rename mesh_getVertexCos() --> BKE_mesh_vertexCos_get() to match curve function.
|
|
always used in that context so we can at least avoid reverting it twice
:p.
|
|
Make it set the empty draw type for existing empty object.
change from yakca on IRC
also some whitespace cleanup.
|
|
|