Commit: ba35a860780ff9aa31f239c63d433e6b04b2b5dd
Author: Jeroen Bakker
Date:   Fri May 20 15:48:55 2022 +0200
Branches: temp-T97352-3d-texturing-seam-bleeding-b
https://developer.blender.org/rBba35a860780ff9aa31f239c63d433e6b04b2b5dd

Use lines as start of dilate proces

===================================================================

M       source/blender/blenkernel/BKE_uv_islands.hh
M       source/blender/blenkernel/intern/pbvh_pixels.cc

===================================================================

diff --git a/source/blender/blenkernel/BKE_uv_islands.hh 
b/source/blender/blenkernel/BKE_uv_islands.hh
index 32e4bc200a0..00361486483 100644
--- a/source/blender/blenkernel/BKE_uv_islands.hh
+++ b/source/blender/blenkernel/BKE_uv_islands.hh
@@ -268,7 +268,17 @@ struct UVIslandsMask {
   void add(short island_index, const UVPrimitive &primitive)
   {
     for (int i = 0; i < 3; i++) {
-      add(island_index, primitive.edges[i].vertices[0].uv);
+      add(island_index, primitive.edges[i]);
+    }
+  }
+
+  void add(short island_index, const UVEdge &edge)
+  {
+    float2 p;
+    for (int i = 0; i < 10; i++) {
+      float f = i / 10.0f;
+      interp_v2_v2v2(p, edge.vertices[0].uv, edge.vertices[1].uv, f);
+      add(island_index, p);
     }
   }
 
diff --git a/source/blender/blenkernel/intern/pbvh_pixels.cc 
b/source/blender/blenkernel/intern/pbvh_pixels.cc
index c8e168e2301..28e77740295 100644
--- a/source/blender/blenkernel/intern/pbvh_pixels.cc
+++ b/source/blender/blenkernel/intern/pbvh_pixels.cc
@@ -38,7 +38,7 @@ constexpr bool USE_WATERTIGHT_CHECK = true;
 static uv_islands::UVIslands build_uv_islands(const PBVH &pbvh, const MLoopUV 
*mloopuv)
 {
   uv_islands::UVIslands islands(pbvh.looptri, pbvh.totprim, mloopuv);
-  uv_islands::UVIslandsMask uv_masks(float2(0.0, 0.0), ushort2(1024, 1024));
+  uv_islands::UVIslandsMask uv_masks(float2(0.0, 0.0), ushort2(256, 256));
   uv_masks.add(islands);
   uv_masks.dilate();
   uv_masks.print();

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
List details, subscription details or unsubscribe:
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to