Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-08-25commit prior to small cleanupJoseph Eagar
2021-08-17Sculpt dyntopo: remove debug ATTR_NO_OPT'sJoseph Eagar
2021-08-17Sculpt dyntopoJoseph Eagar
* Added a limited "fast draw" mode to pbvh drawing that tries to limit data sent to the GPU. - Facesets and mask data are disabled. - Indexed mode is forced. - Does not work (at all) for multires. * Finally fixed some outstanding bmesh sculpt undo bugs: - Forgot to mark pbvh nodes to update their bounds, which produced a bug I had thought was caused by something else. - Hopefully fixed a long-standing occasional memory corruption bug.
2021-08-08Sculpt Dyntopo: PBVH draw fixesJoseph Eagar
* The PBVH draw subsystem is now told whether any viewports have drawtype >= OB_MATERIAL before anything in any windows are drawn. There are no alternatives given the design constraints of sculpting, where simply uploading data to the GPU quickly becomes a bottleneck. * Fixed flat vcol shading mode.
2021-07-30Merge branch 'master' into temp_bmesh_multiresJoseph Eagar
Also: * added BMLog function to save mesh IDs. - Used by SCULPT_UNDO_DYNTOPO_BEGIN/END instead of saving the whole mesh, which was the previous behavior. * SCULPT_UNDO_DYNTOPO_BEGIN no longer pushes a non-dyntopo geomtry undo node, as this is no longer necassary. This greatly speeds up going into/out of sculpt mode with dyntopo enabled, as before it was copying the mesh twice.
2021-07-21Sculpt dyntopo: Removed triangle limit for PBVH_BMESHJoseph Eagar
* PBVH_BMESH now supports faces other then triangles; * Dyntopo triangulates faces as it finds them. - I looked into methods of preserving quads and failed to find anything that worked well in practice; it actually worked better to use topology rake to align triangles into quads and then mark diagonal edges for later dissolving then to try to preserve quads explicitly (I've not implementated that here, that was research code). - To avoid excessive cache-destroying loops over vertex-faces, DynTopo flags which verts have non-triangle faces. * PBVHTriBuf now builds edge buffers so we can avoid drawing tesselation phantom edges. * BMLog also now supports arbitrary faces. It still does not support edges though. TODO: * Fix vcol cell shading mode * Make sure indexed drawing works
2021-07-11Merge branch 'master' into temp_bmesh_multiresJoseph Eagar
2021-07-03Cleanup: consistent use of tags: NOTE/TODO/FIXME/XXXCampbell Barton
Also use doxy style function reference `#` prefix chars when referencing identifiers.
2021-07-02Sculpt dyntopo: Add support for multiple materials to dyntopoJoseph Eagar
pbvh drawing. * Dyntopo now stores a list of PBVHTriBufs in leaf nodes, one per material used by the node. * Actual drawing buffers live in a new mat_draw_buffers PBVHNode member.
2021-06-25Sculpt Dyntopo: fix bug in dyntopo brush spacing.Joseph Eagar
2021-05-24DynTopo: started refactoring pbvh drawing to handle customdata layers inJoseph Eagar
a more generic (and maintainable) way.
2021-05-16Dyntopo now updates the existing pbvh on undo instead of buildingJoseph Eagar
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.
2021-04-29Fix a few cast warningsJoseph Eagar
2021-04-26* Fixed SCULPT_dynamic_topology_sync_layers to properly syncJoseph Eagar
active/render/clone/mask layers indices. * Fixed sculpt color bugs in pbvh drawing for bmesh.
2021-04-21* Fixed vcol drawing in indexed smooth shading modeJoseph Eagar
2021-04-15Commit current code stateJoseph Eagar
2021-04-11* Fixed wireframe drawing in vcol cell drawing modeJoseph Eagar
* Added UI for editing local brush dyntopo settings.
2021-03-26Only send all vcol layers to gpu (for pbvh drawing) in a materialJoseph Eagar
draw mode.
2021-03-26* Sculpt color layers are now properly handle by pbvh bmesh draw code.Joseph Eagar
Before only the active layer was uploaded to the GPU, now all of them (except the autogenerated original color layer) are.
2021-03-25Code cleanupJoseph Eagar
2021-03-25Fixed two remaining performance bugs with dyntopo:Joseph Eagar
* Normals are now updated in threads. * The sculpt neighbor code was using the slower BM_LOOPS_OF_VERT instead of BM_EDGES_OF_VERT, fixed.
2021-02-08* Yet another attempt at writing a faster distance to tri function.Joseph Eagar
I think I will end up writing a less accurate version and be done with it. This is a consistent hotspot in profiling. * Fixed a few more undo bugs
2020-11-06Added debug option in dyntopo to draw sculpt colors as solid cellsJoseph Eagar
instead of interpolating (it's next to "draw smooth" in the dyntopo settings panel).
2020-11-04Added face set support to dyntopo. Still need to finish "edit faceJoseph Eagar
sets" tool and do more testing.
2020-10-31Try to make SCULPT_orig_vert_data_init avoid allocating undo nodes,Joseph Eagar
which calls into BMLog which, while now threadsafe (ish?) causes threads to get bogged down in lock contention.
2020-10-26PBVH drawing now properly names attributes.Joseph Eagar
NOTE: I've added a new function, DRW_make_cdlayer_attr_aliases, for this. It's patterned after extract_uvs. The appropriate devs from the draw engine team should take a look.
2020-10-26Got sculpt colors to work, needs more testingJoseph Eagar
2020-10-26pre-valgrind commitJoseph Eagar
2020-10-25Fixed broken customdata interpolation in dyntopo collapse.Joseph Eagar
Also added support for uvs to dyntopo gpu buffer building code.
2020-10-25Added support for customdata interpolation to dyntopo.Joseph Eagar
It seems fast enough for simple cases, I make no promises that it will be fast in crazy cases lots if there's lots of vgroup layers. Note I still need to interface properly with the sculpt colors code.
2020-10-25Merge performance improvements from trimesh branch into this one.Joseph Eagar
2020-09-18Sculpt: Render Mask and Face Sets with modifiers activePablo Dobarro
This removes the limitation of the sculpt overlays not being visible with modifiers active. Reviewed By: fclem Maniphest Tasks: T68900 Differential Revision: https://developer.blender.org/D8673
2020-09-06GPUVertBuf: Make GPUVertBuf private to the GPU moduleClément Foucault
This is just a cleanup to isolate the internals of the vertbuf. This adds some getters to avoid refactor of existing code.
2020-08-08Cleanup: use array syntax for sizeof with fixed valuesCampbell Barton
Also order sizeof(..) first to promote other values to size_t.
2020-08-07Cleanup: declare arrays arrays where possibleCampbell Barton
2020-08-07Cleanup: GPU, Clang-Tidy else-after-return fixesSybren A. Stüvel
This addresses warnings from Clang-Tidy's `readability-else-after-return` rule in the `source/blender/gpu` module. No functional changes.
2020-07-13Clang Tidy: enable readability-non-const-parameter warningJacques Lucke
Clang Tidy reported a couple of false positives. I disabled those `NOLINTNEXTLINE`. Differential Revision: https://developer.blender.org/D8199
2020-07-09Sculpt: Make Sculpt Vertex Colors features experimentalPablo Dobarro
This disables all Sculpt Vertex Colors tools, operators, panels and rendering capabilities and puts them under the "Use Sculpt Vertex Colors" experimental option. Reviewed By: brecht Differential Revision: https://developer.blender.org/D8239
2020-06-24Fix T78188: Sculpt mask glitching after using sculpt vertex colorsPablo Dobarro
The face sets color copy to the GPU was done outside of the loop, probably after a merge error in a rebase. Also, the default color was initialized using the wrong type. Reviewed By: sergey Maniphest Tasks: T78188 Differential Revision: https://developer.blender.org/D8106
2020-06-23Sculpt Vertex Colors: Initial implementationPablo Dobarro
Sculpt Vertex Colors is a painting system that runs inside sculpt mode, reusing all its tools and optimizations. This provides much better performance, easier to maintain code and more advanced features (new brush engine, filters, symmetry options, masks and face sets compatibility...). This is also the initial step for future features like vertex painting in Multires and brushes that can sculpt and paint at the same time. This commit includes: - SCULPT_UNDO_COLOR for undo support in sculpt mode - SCULPT_UPDATE_COLOR and PBVH flags and rendering - Sculpt Color API functions - Sculpt capability for sculpt tools (only enabled in the Paint Brush for now) - Rendering support in workbench (default to Sculpt Vertex Colors except in Vertex Paint) - Conversion operator between MPropCol (Sculpt Vertex Colors) and MLoopCol (Vertex Paint) - Remesher reprojection in the Voxel Remehser - Paint Brush and Smear Brush with color smoothing in alt-smooth mode - Parameters for the new brush engine (density, opacity, flow, wet paint mixing, tip scale) implemented in Sculpt Vertex Colors - Color Filter - Color picker (uses S shortcut, replaces smooth) - Color selector in the top bar Reviewed By: brecht Maniphest Tasks: T72866 Differential Revision: https://developer.blender.org/D5975
2020-05-20Fix unnecessary buffer reallocation in sculpt mode, causing an assertBrecht Van Lommel
Probably did not cause an actual, the assert is a performance warning. Ref T76858
2020-05-18Fix potential crash due to dyntopo GPU buffer invalid memory accessBrecht Van Lommel
When the number of triangles in a node became zero, the wireframe batch was not freed along with the triangles batch and could still reference a freed vertex buffer. Ref T76858
2020-05-14Sculpt: Render Face Sets always as flat shadingPablo Dobarro
This removes the smooth shading rendering from the face set overlay when smooth shading is enabled. Reviewed By: jbakker Maniphest Tasks: T74906, T74622, T75331, T76530 Differential Revision: https://developer.blender.org/D7105
2020-04-22Cleanup: Spelling in function nameSergey Sharybin
Should be no functional changes.
2020-04-20Fix T75329: Missing show_face_sets checks for MultiresPablo Dobarro
These values were hardcoded before Face Sets were enabled for Multires, so enable the show_face_sets checks now. Reviewed By: jbakker Maniphest Tasks: T75329 Differential Revision: https://developer.blender.org/D7444
2020-04-01Cleanup: quiet discarded-qualifiers, unused warningsCampbell Barton
2020-04-01Multires: Initial Face Sets supportPablo Dobarro
This implements the Sculpt Mode API functions needed for Face Sets and visibility management for PBVH_GRIDS. No major changes were needed in the operators and the sculpt mode code. This implementation stores the face sets in the base mesh, so faces created in higher subdivision levels can't be modified individually. Also, we are not checking for multiple face sets per vertex (that can be added in the future), so relax tools don't work yet. The rest of the features (paint, undo, visibility operators..) work as expected. Reviewed By: brecht Differential Revision: https://developer.blender.org/D7168
2020-03-26Sculpt: Use uchar to store the sculpt mask in the GPUPablo Dobarro
Using a float to store and render the mask seems like a waste of memory without any noticeable difference in the viewport for its use case. After this commit, the mask and the face sets combined should take the same amount of GPU memory than only the mask in previous versions. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D7148
2020-03-26Fix T74780: Face sets operators not aware of SCULPT_FACE_SET_NONEPablo Dobarro
SCULPT_FACE_SET_NONE default value is 0 and it is rendered hidden, so the invert sign operation to show it was not working. Now the show all function sets this face set to ID 1 before setting its sign. I also refactored this check in gpu_buffers. Not related to the reported issue, but the mesh in attached contains non manifold geometry with hidden loose vertices, so the visibility state was not syncing correctly to those vertices. Now the toggle operators checks the current visibility only on the face sets, so no manifold vertices are ignored (as they are in the rest of operations in sculpt mode). Reviewed By: jbakker Maniphest Tasks: T74780 Differential Revision: https://developer.blender.org/D7188
2020-03-26Fix T74692: Do not draw nodes with the default face setPablo Dobarro
The default face set color is white, so we can skip drawing the default face set. This allows to enable again the optimization of not drawing overlays in nodes where the mask is empty. This will still slow down the viewport when a new face set is created for the whole mesh or when inverting the mask, like in previous versions. I also renamed the function to make more clear that now it is checking for both mask and face sets. Reviewed By: brecht Maniphest Tasks: T74692 Differential Revision: https://developer.blender.org/D7207