From 9520388cc600df99b2b3934a3a6281e42ef76e5a Mon Sep 17 00:00:00 2001 From: xiaoshenxian <125880321@qq.com> Date: Thu, 22 Feb 2024 15:01:33 +0800 Subject: [PATCH] Fix for texture resource coordinates greater than 1 not supported --- .vs/Obj2Tiles/DesignTimeBuild/.dtbcache.v2 | Bin 95247 -> 0 bytes .vs/Obj2Tiles/v17/.suo | Bin 37888 -> 0 bytes Obj2Tiles.Library/Common.cs | 19 ++++++++++++++++--- Obj2Tiles.Library/Geometry/MeshT.cs | 9 ++++++--- Obj2Tiles.Library/Geometry/MeshUtils.cs | 2 +- 5 files changed, 23 insertions(+), 7 deletions(-) delete mode 100644 .vs/Obj2Tiles/DesignTimeBuild/.dtbcache.v2 delete mode 100644 .vs/Obj2Tiles/v17/.suo diff --git a/.vs/Obj2Tiles/DesignTimeBuild/.dtbcache.v2 b/.vs/Obj2Tiles/DesignTimeBuild/.dtbcache.v2 deleted file mode 100644 index 3b2a9ddf2e4437e74c7e7b1375b683e5b027b52a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 95247 zcmd6Q2Yeev_P;h-k&qA)QV5+8It0fh#R+W_rw~$!orGctvb|1}$dZxdB&PS?d++^d z2OJz6aP$sGhokpib_l)xzi(z|q#emQW6$RIhtFGmBYi#Zy_wnR`}X=+BobM3qTA56 z@WAn@_MtVi=N=f@a6(%m*;Es6T;$fIQ@MB|m7N{W`Z#G z+nAf2NG)_Tt(inB7jY^po8n_fHpk1yR*o9o*j(PwFsh=ws%m6Ib9J*jYUJ3FP1Vh# zt4B4B8Pyz*SG%J}S2a~tjc%^4Dlf097&)>rvTjW}nMA6!Z3`E=*__)nKb={UOvjtD zk@ftaCTHR;?lOEm$8B~qZmQAETJR!b(beifmni+)sTet?y1Ba29TRV?sEjwc@ydAP z=w`RNX>8Nj^6JV_&E=z-s;V0rM>aK8R#n6+s>Y5QTQ#P!p?Xx+sK$7CW$9E$RWwvq zG{dRp(QZ||d}O?OWYy^E%F0pY4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m$>epkaMqq}D^x{NpMC8dm=W%~mx3xJrPA zy#Ya6P0{@0DghdH4g{^2qWQ;F0yOL^2wHDN^N*_pXuTzE4Mp>hs|0A+lMtz`sc8Oj zl>iMp7J}Aa(fs2o0UGu*1Z{w#`NvfPH0*W=+8{;qkE;Y|*b5P~wH3`jt`eYOr$o@q H99Q{&MVDk~ diff --git a/.vs/Obj2Tiles/v17/.suo b/.vs/Obj2Tiles/v17/.suo deleted file mode 100644 index 3a12552e2917f2e64b55e77940e1ab3f1a582c7c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 37888 zcmeHQ>2n;#74NmNv9USKm4t8zV~7LNT3W3xTQ-(f5_Yh#uw>bQh*|B<%4_YR?92)& zhJ=KKkb~R_jWSl~2iEK;=_Dq`>+8dZx9rqdjIv zD@!Y;Rd0^oo_>A2e*NC-?x%OoZTr`AuU_|W;RyT0dh!1G&0?c1K7i+S>ir5KnyvTu z&!0cf==A_R`k{eZ;E2fL&k#*wP-Jk=iFtOV>u{~uu+ZlVv{B~kE8afW`^0_!2!!$b zA8t1jjR0d-oDv6tJ%Oh|F<0j6($Uv~BJIsxI#qG(%XkI(%5YqyMM{i_sECPaT&IL4 z4vQJIL=vUR2;E9o?zTg$3tWsJnIFqhE}cF81-!guMX36--ZLmk7VV({Mp1$&K(l{X z;u-jBuKxt`xooqU*`>I>XKz63ncbtJFSnjK&RNf0fI9$uXEwYqcW4D3@}eyOh3hgr zZ?(NMz60-_fG$8cpa-xUum{i!*bCSPxD&7+&I~F|6c*GKmO4O2#Tf^A5deQt&o4%KGY3(caz8UNc3SV;SgrvLD4G0xJE>qXc6srYr`De zf@>S*#mIymN$Y0k1FZme5 zC?vcnK`DFJOTDQ@$C|7GA-Nze2|6x$yDR7=C&|U4gOs+$oM}AYx52}wq)L-HyZiX_&EQ+oL ze>Hmu#$SN4G3Qe+_>ZC0GpKhKEkBG_$N)@E6hu#$yf6zMIEECQ4af=Yb0FtmS#j%9 zRM9do*C1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?q<`Kiq_jI9D?`@t4+r>?JY3Q`a!+ zPkDuPXHfB#?i?@W@VMr8v=tgZl9GF>H>r)1(TwvcIOic5vw|0rDt!Mxl3w#i{JSE+x*MkK1R`;hO++Czxqf^Zox^NdHB?|DV<8 zQ_A=MvogNDoL)eD|3CBquyVfEoc+Ny26|sJy-fN3e^$x|p6UVRxy1MXvs%0pI(x?V z|5I2QTs=M{eg8kJ*S}|R-}wH2)NVrG|Bqd#{h<5*!Qzka|D_g(S&O}%Eb^(e%x&uX ze<|`{h1Onr4=ArM6LK>UeFXXbUu<5&YNqHyd;0!g>Pw$yd;0!goIIemS&$F3h%-~UT1_VxPyUuu{} WJty`3znFqx!GE>y|D_iHFaHN)rF`lD diff --git a/Obj2Tiles.Library/Common.cs b/Obj2Tiles.Library/Common.cs index f458779..33bd5a6 100644 --- a/Obj2Tiles.Library/Common.cs +++ b/Obj2Tiles.Library/Common.cs @@ -12,17 +12,30 @@ public static class Common public static void CopyImage(Image sourceImage, Image dest, int sourceX, int sourceY, int sourceWidth, int sourceHeight, int destX, int destY) { var height = sourceHeight; - + sourceImage.ProcessPixelRows(dest, (sourceAccessor, targetAccessor) => { + var shouldCulaSourceAccessorIndex = sourceY + height > sourceAccessor.Height; + for (var i = 0; i < height; i++) { - var sourceRow = sourceAccessor.GetRowSpan(sourceY + i); + var sourceAccessorIndex = sourceY + i; + if (shouldCulaSourceAccessorIndex && sourceAccessorIndex >= sourceAccessor.Height) + { + sourceAccessorIndex %= sourceAccessor.Height; + } + var sourceRow = sourceAccessor.GetRowSpan(sourceAccessorIndex); var targetRow = targetAccessor.GetRowSpan(i + destY); + var shouldCulaSourceRowIndex = sourceX + sourceWidth > sourceRow.Length; for (var x = 0; x < sourceWidth; x++) { - targetRow[x + destX] = sourceRow[x + sourceX]; + var sourceRowIndex = x + sourceX; + if (shouldCulaSourceRowIndex && sourceRowIndex >= sourceRow.Length) + { + sourceRowIndex %= sourceRow.Length; + } + targetRow[x + destX] = sourceRow[sourceRowIndex];// } } }); diff --git a/Obj2Tiles.Library/Geometry/MeshT.cs b/Obj2Tiles.Library/Geometry/MeshT.cs index cf5dd62..773367d 100644 --- a/Obj2Tiles.Library/Geometry/MeshT.cs +++ b/Obj2Tiles.Library/Geometry/MeshT.cs @@ -551,9 +551,12 @@ private void BinPackTextures(string targetFolder, int materialIndex, IReadOnlyLi Debug.WriteLine("Found place for cluster at " + newTextureClusterRect); // Too long to explain this here, but it works - var adjustedSourceY = !(material.Texture == null) - ? Math.Max(texture.Height - (clusterY + clusterHeight), 0) - : Math.Max(normalMap.Height - (clusterY + clusterHeight), 0); + var height = material.Texture != null ? texture.Height : normalMap.Height; + var adjustedSourceY = height - (clusterY + clusterHeight); + if (adjustedSourceY < 0) + { + adjustedSourceY = (int)Math.Ceiling((double)(clusterY + clusterHeight) / (double)height) * height - (clusterY + clusterHeight); + } var adjustedDestY = Math.Max(edgeLength - (newTextureClusterRect.Y + clusterHeight), 0); if (!(material.Texture == null)) diff --git a/Obj2Tiles.Library/Geometry/MeshUtils.cs b/Obj2Tiles.Library/Geometry/MeshUtils.cs index b697fc8..272c206 100644 --- a/Obj2Tiles.Library/Geometry/MeshUtils.cs +++ b/Obj2Tiles.Library/Geometry/MeshUtils.cs @@ -50,7 +50,7 @@ public static IMesh LoadMesh(string fileName, out string[] dependencies) double.Parse(segs[1], CultureInfo.InvariantCulture), double.Parse(segs[2], CultureInfo.InvariantCulture)); - if (vtx.X < 0 || vtx.Y < 0 || vtx.X > 1 || vtx.Y > 1) + if (vtx.X < 0 || vtx.Y < 0) throw new Exception("Invalid texture coordinates: " + vtx); textureVertices.Add(vtx);