Age | Commit message (Collapse) | Author |
|
|
|
|
|
The spikes were caused by non-initialized tangent matrix used during
smoothing process. The reason tangent matrix was not initialized was
because wrong usage of API: n-gons should pass corner of 0 to the
matrix construction function.
Corrected usage of the API and added assert() to help catching such
kind of non-initialized issues easier.
|
|
|
|
|
|
Propagation when changing sculpt level was missing. In fact, the mask
was simply completely removed when changing sculpt level.
Subdivision worked for simple and linear subdivision, but Catmull-Clark
was giving empty results.
Fixes propagation part of T76386.
|
|
|
|
Weights were in the different order from corners.
Doesn't fix propagation issues, but fixes an essential step towards
fully correct propagation.
|
|
|
|
|
|
There is some hard-to-reproduce scenario when top level
would have masks allocated, but without masks on the sculpt
level.
Need to check proper array before accessing its elements.
The check for top-level masks is done by the caller.
|
|
|
|
When using multires_reshape_context_create_from_ccg to create the
context mmd is null, so the subdivision smooth mode can't be checked
there.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D7579
|
|
This introduces two alternative subdivision modes that generates
displacement on the grids that look as Simple subdivisions but while
using the Catmull-Clark subdivision type in the modifier. This way,
Simple and Catmull-Clark subdivision can be combined when creating new
levels if needed, for example, to sculpt hard surface objects.
Subdivide simple smooths the sculpted data when creating a new
subdivision level. Subdivide linear also preserves the sharpness
in the sculpted data.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D7415
|
|
|
|
|
|
Allows to know what level sculpting has been done after the value has
been changed in the MultiresModifierData.
No functional changes, just preparing code to have everything needed
for propagation undo.
Differential Revision: https://developer.blender.org/D7307
|
|
|
|
Is done by considering all base edges infinitely sharp.
In the future can become a different operator option to allow to mix
Catmull-Clark and simple subdivisions. For now just sticking to what
old good Blender versions were doing.
Fixes T74869: Simple subdivision type is not working as it should
|
|
Avoid storing any loose edges for the propagation process.
Also avoid any edge which crease is zero.
|
|
The idea is following: only store information about edges which are
1. Communicated to the OpenSubdiv topology.
This rules out all loose edges, as they are not needed for the
propagation process.
2. Correspond to edge from the base mesh.
This avoids storing edges which are generated between inner face.
Those are not to have any sharpness to allow smooth propagation.
There is still possible to have memory peak in some obscure case when
mesh contains a lot of loose edges. It can be optimized further by
utilizing knowledge of the non-loose tags.
|
|
The title says it all actually. The test case is to get default cube,
set some edges to non-zero crease, add multires modifier and hit the
"Subdivide" button few times.
The memory footprint might be optimized by not storing information
about inner generated edges.
|
|
Might have caused access to uninitialized memory when foreach()
would have failed for some reason.
|
|
|
|
|
|
This change fixes artifacts produced by these operations.
On a technical aspect this is done by porting all of the operations
to the new subdivision surface implementation which ensures that
tangent space used to evaluate modifier and those operations is
exactly the same (before modifier will use new code and the operations
will still use an old one).
The next step is to get sculpting on a non-top level to work, and
that actually requires fixes in the undo system.
|