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
path: root/source
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2020-05-13 11:03:38 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2020-05-13 13:08:12 +0300
commit0790d90d027355c6f0d7ba157dec18dea131d4f2 (patch)
tree74b87b9fd6020d452248ed08c5c3436e4c1ba145 /source
parent2843af935799fd651e8b0e78636f20bd029f193e (diff)
Multires: Update and add comments
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/multires_reshape_smooth.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/multires_reshape_smooth.c b/source/blender/blenkernel/intern/multires_reshape_smooth.c
index ca95205e70d..0fe0ac4b66a 100644
--- a/source/blender/blenkernel/intern/multires_reshape_smooth.c
+++ b/source/blender/blenkernel/intern/multires_reshape_smooth.c
@@ -52,6 +52,11 @@
/** \name Local Structs
* \{ */
+/* Surface refers to a simplified and lower-memory footprint representation of the limit surface.
+ *
+ * Used to store pre-calculated information which is expensive or impossible to evaluate when
+ * travesing the final limit surface. */
+
typedef struct SurfacePoint {
float P[3];
float tangent_matrix[3][3];
@@ -61,6 +66,9 @@ typedef struct SurfaceGrid {
SurfacePoint *points;
} SurfaceGrid;
+/* Geometry elements which are used to simplify creation of topology refiner at the sculpt level.
+ * Contains a limited subset of information needed to construct topology refiner. */
+
typedef struct Vertex {
/* All grid coordinates which the vertex corresponding to.
* For a vertices which are created from inner points of grids there is always one coordinate. */
@@ -87,6 +95,8 @@ typedef struct Edge {
float sharpness;
} Edge;
+/* Context which holds all information eeded during propagation and smoothing. */
+
typedef struct MultiresReshapeSmoothContext {
const MultiresReshapeContext *reshape_context;
@@ -118,8 +128,14 @@ typedef struct MultiresReshapeSmoothContext {
/* Subdivision surface created for geometry at a reshape level. */
Subdiv *reshape_subdiv;
- /* Grids allocated at the top level storing state of the base mesh,
- * Basically, lower memory footprint version of the base mesh limit surface. */
+ /* Limit surface of the base mesh with original sculpt level details on it, subdivided up to the
+ * top level.
+ * Is used as a base point to calculate how much displacement has been made in the sculpt mode.
+ *
+ * NOTE: Referring to sculpt as it is the main user of this functionality and it is clear to
+ * understand what it actually means in a concrete example. This is a generic code which is also
+ * used by Subdivide operation, but the idea is exactly the same as propagation in the sculpt
+ * mode. */
SurfaceGrid *base_surface_grids;
/* Defines how displacement is interpolated on the higher levels (for example, whether