Blender Git Loki

Blender Git "temp_bmesh_multires" branch commits.

September 18, 2021, 03:13 (GMT)
Merge branch 'master' into temp_bmesh_multires
September 17, 2021, 21:43 (GMT)
Commit current working copy; having
weird file system issues
September 17, 2021, 03:29 (GMT)
Sculpt dyntopo: Roughed out skeleton of new brush engine API

Command Lists

* The new system will be based on command lists
generated by (eventually) a node editor.
* For now, the lists will be hardcoded.
* Idea is to make a minimal viable
brush engine that won't cause file breakage
when the upgrade to node-based brushes happen.

Brush Channels

* Wrote new structures and API to wrange
brush parameters: BrushChannel.
* Supports, floats, ints, enums, bitmasks,
with plans for vec3 and vec4.
* This will replace UnifiedPaintStruct,
most of the members of Brush and the
DynTopoSettings struct.
* Brush channels can
be mapped to various input device
channels (e.g. pen pressure); each
mapping has its own associated curve
(CurveMapping instance) and bounds.

Brush channel inheritence chaining

* Brush channels can form inheritence chains
* Channel sets are stored in three places:
in the scene toolsettings, in Brush, and in
individual brush commands.
* Node groups will also have a channel set.
* Channels in each set can be flagged to
inherit from the parent set.
* Inheritence happens in seperate merged
channel sets at runtime. The final
Brush channels live in Brush->channels_final,
while the final command channels live in
BrushCommand->params_final.
September 16, 2021, 20:44 (GMT)
Merge branch 'master' into temp_bmesh_multires
September 16, 2021, 17:42 (GMT)
commit prior to merge
September 15, 2021, 21:56 (GMT)
Add skeletal beginnings of C++ sculpt refactor
design study (note that it's #ifdef'd out).

Basic idea is to put all the sculpt brush code
in a single large template. This template
takes a PBVH adaptor class (of which there
would be three, one per PBVH_XXX type)
as a template argument.

Basically we're using the compiler to generate
three complete copies of every brush implementation.
C++20 concepts are used to validate the pbvh classes.

An example brush implementation:

pbvh->forVertsInRange(
{
.brush = ss->cache->brush,
.radius = radius,
.use_threads = true,
.use_original = false
},

[&offset](auto viter, int node_i, void *userdata) {
//add offset to vertex coordinates

madd_v3_v3fl(viter.co, offset, viter.fade);
},

[](PBVHNode *node, int node_i, void *userdata) {
BKE_pbvh_node_mark_update(node);
});
September 15, 2021, 09:50 (GMT)
Sculpt dyntopo: Fix a few issues from last commit

* Fixed crashing on entering sculpt mode
* Fixed transitioning between sculpt and
another undo system type sometimes
corrupting stack.
September 15, 2021, 09:16 (GMT)
Sculpt dyntopo: fix missing bit from last commit

* BM_mesh_bm_to_me now saves id layers by default.
September 15, 2021, 08:41 (GMT)
Sculpt dyntopo:

Seperate enabling PBVH_BMESH from enabling DynTopo:

* Created a new option to globally disabled
DynTopo.
* The DynTopo panel header now reads "Dynamic Mode",
to hopefully signal that turning on PBVH_BMESH is
a seperate step from enabling or disabling DynTopo
itself.
* The first checkbox in the panel is "DynTopo" so it
should be clear enough (it's on by default, with multiple
layers of file versioning checks).

PBVH_BMesh's undo system:

* CD_MESH_ID layers are now permanently saved once
they are created (by default they are not). This
fixed a *lot* of bugs:

Before this the undo system had to save maps between
mesh indices and mesh IDs on transitioning
between sculpt and global undo steps. This was
extremely error prone, and it simply wasn't possible
to cover all of the corner cases

* Note that there is still an odd bug where the first
global undo push after a sculpt step gets ignored,
I dunno what's up with this.

* Dyntopo undo should be nearly (hopefully completely)
bug-free after this commit.

C++20

* Made a few small changes to get blender to compile
with c++20. std::result_of was removed, had to
replace a couple of usages of it with std::invoke_result.

* I'm planning to do some design studies on rewriting
sculpt into C++.

* I strongly suspect we are going to need C++20'a new
concepts feature if we move sculpt into C++.
I'm planning to do some design studies on how
that might work.
September 14, 2021, 03:14 (GMT)
Sculpt dyntopo: fix nasty node splitting bug
September 14, 2021, 02:24 (GMT)
Sculpt dyntopo:

* Fixed noise on using autosmooth with tools that use original
coorinates. While this was most prominent with DynTopo,
it did happen with other tools.
* The solution is to smooth the original coordinates as well
as the explicit coordinates if the active tool requires
original data.

* I decided to replace the original coordinates system for
PBVH_FACES and PBVH_GRIDS with the same MDynTopoVert structure
DynTopo uses. The alternative would have been extremely messy
code.

* Todo: Rename MDynTopoVert to. . .SculptInfoVert?
* Todo: Cache boundary flag and corner info in MDynTopoVert->flag
for PBVH_FACES/GRIDS similar to PBVH_BMESH.
September 13, 2021, 09:31 (GMT)
Sculpt dyntopo: more collapse fixes

The edge cases just never end.
September 13, 2021, 06:39 (GMT)
Sculpt dyntopo:

* A few more collapse fixes
* Fixed boudary handling in surface_smooth_v_safe
September 11, 2021, 20:38 (GMT)
Dyntopo sculpt: fix bug with boundary flags
September 9, 2021, 18:06 (GMT)
Sculpt dyntopo: Added a 'hard edge mode' option
to forcibly set autosmooth_fset_slide to zero
(i.e. treat face set boundaries as hard edges
and not project them on the surface).
September 9, 2021, 07:21 (GMT)
Add more int casts for linux
September 9, 2021, 07:18 (GMT)
Sculpt dyntopo

* Non-manifold "fins" are now detected and automatically
deleted.
* Fixed compile error on linux.
September 8, 2021, 23:51 (GMT)
Sculpt dyntopo:

* Collapse now uses code from decimate to detect
degenerate cases.
* Remaining, unknown (and rare) degenerate cases
are now detected (via presence of duplicate verts
in faces) and fixed.
* DynTopo fills in undo size properly now,
so undo memory limiting works.
September 8, 2021, 07:49 (GMT)
Sculpt dyntopo:

* BLI_table_gset now internally uses a SmallHash instead of
a GHash. Profiling revealed this to be quite a bit
faster.
* This is something of a stopgap until C++-afication of
pbvh, when we'll have our pick of a bunch of
really nice C++ hashmap libs.
* pbvh_collapse_edge bites the dust; dyntopo now uses
BM_collapse_edge. Of the three topology operations
(subdivide edge, collapse edge, dissolve 3/4 valence
vertex) only dissolve still has a dyntopo-specific
implementation.
* Fixed a bunch of annoying memory corruption bugs.
* Non-manifold triangles are now detected in more
places.

SmallHash changes:

* Enabled removal
* Fixed infinite loop bug caused by
improperly counting free*d* cells
versus free cells.
* Added a BLI_smallhash_ensure_p method
that works just like the GHash version.

Sculpt replay system

* Roughed out a simple system to record and
play back sculpt strokes using a simple
text format.
* This is exclusively for
performance profiling and unit tests.
* For each brush stroke the system saves a copy
of the active StrokeCache and PaintStroke
and parts of Sculpt.

This should make profiling DRAM thrashing a lot
easier.
September 3, 2021, 06:19 (GMT)
commit working code
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021