I'm having an issue which I'm stuck at. If you look at the image you can see a very simple node tree - what I'm struggling with is the vertical line of instances where the edges of the image connect. Any ideas how to get rid of this from within geometry nodes?
-
$\begingroup$ could you provide your image file + blend file so we can check it? $\endgroup$– ChrisFeb 22, 2022 at 9:25
-
$\begingroup$ I tried with many map files, here are two: Normal and Equirectangular The blend file is File $\endgroup$– DanielFeb 22, 2022 at 10:48
3 Answers
UV map is a face corner data, but you set up your scene at vertices. At this seam, you have a row of vertices that's attached to two corners of UV map.
That's mean that to get the U cord, Blender calculates it as middle of 2 UV coordinates (1 + 0)/2 = 0.5
Easy fix is set instances on faces instead of points:
An outer way is to split vertexes by UV Seam by using V:
-
$\begingroup$ Snap! I wish i could figure out exactly where the interpolation was happening.. the same problem arises between the 0 and 1 parameters of cyclic curves. $\endgroup$– Robin Betts ♦Feb 22, 2022 at 12:34
-
2
ok, i think, it has something to do with UVMap/UVEditing. Unfortunately i am not an export in that area.
Because of that ...i can only try and error it out...so i tried...and i am sure this is a very hacky solution but for my image it worked (i couldn't test with yours because you didn't provide it).
so i added a vector node here:
and because you have a sphere adding a x value won't change the image...so...play with the x-value and the line will disappear.
Don't ask me why ;) I hope you are one of the person's who search for solutions - not for explanations. But i am sure some others come up with an explanation ;)
-
1$\begingroup$ I don't see what's "hacky" about it. The UV coords map the image texture as desired. The light/dark values then define the "Selection" where instances should be generated (you are using the Alpha output, but one could use any grayscale data here). The subdivision level determines the resolution/density. Looks straightforward and practical to me. :-) $\endgroup$ Feb 28, 2022 at 4:22
I think it goes like this:
- All fields in GN are linearly interpolated
- UV's are defined on Face Corners
- Here, the 'Selection' field is defined on Points, (Vertices)
Somewhere, an interpolation is being made from face-corner U=0 to face-corner U=1, to determine where to sample the vertex 'Selection' value. The sample-point's U winds up being neither 1, nor 0, which is what we want, but 0.5, sampling the texture from the other side of the world.
Indeed, the problem can be fixed by splitting the edges down the UV seam longitude in the geometry, preventing interpolation.
-
1