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
diff options
context:
space:
mode:
authorMai Lavelle <mai.lavelle@gmail.com>2019-08-14 08:53:09 +0300
committerMai Lavelle <mai.lavelle@gmail.com>2019-08-27 21:27:53 +0300
commit697fd86506fd0caaa41e2fbf0463b5229d09251e (patch)
tree6f7b592ba6d00f5a4c4e92a0945fb0398c6572f0 /intern/cycles/render/mesh.h
parent7aef075ef6d07dca91444561da68d0233dc1a4c8 (diff)
Cycles: Stitching of subdivided and displaced meshes
This patch stitches the vertices along patch edges so that cracks can no longer form when applying subdivision or displacement a mesh. Subpatches are now formed in a way that ensures vertex indices along subpatch edges are equal for adjacent subpatches. A mapping of vertices along patch edges is built to preform stitching. Overall performance is roughly the same, some gains were made in splitting, but some was lost in stitching. This fixes: - T49049 (cracks between patches from material and uv seams) - T49048 (discontinuous normals with true displacement) Reviewers: sergey, brecht Differential Revision: https://developer.blender.org/D3692
Diffstat (limited to 'intern/cycles/render/mesh.h')
-rw-r--r--intern/cycles/render/mesh.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/intern/cycles/render/mesh.h b/intern/cycles/render/mesh.h
index 50b1f0e69f1..4a24a9c2656 100644
--- a/intern/cycles/render/mesh.h
+++ b/intern/cycles/render/mesh.h
@@ -283,6 +283,14 @@ class Mesh : public Node {
size_t num_subd_verts;
+ private:
+ unordered_map<int, int> vert_to_stitching_key_map; /* real vert index -> stitching index */
+ unordered_multimap<int, int>
+ vert_stitching_map; /* stitching index -> multiple real vert indices */
+ friend class DiagSplit;
+ friend class MeshManager;
+
+ public:
/* Functions */
Mesh();
~Mesh();