[Bf-blender-cvs] [0790d90d027] master: Multires: Update and add comments
Sergey Sharybin
noreply at git.blender.org
Wed May 13 12:13:06 CEST 2020
Commit: 0790d90d027355c6f0d7ba157dec18dea131d4f2
Author: Sergey Sharybin
Date: Wed May 13 10:03:38 2020 +0200
Branches: master
https://developer.blender.org/rB0790d90d027355c6f0d7ba157dec18dea131d4f2
Multires: Update and add comments
===================================================================
M source/blender/blenkernel/intern/multires_reshape_smooth.c
===================================================================
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
More information about the Bf-blender-cvs
mailing list