I understand this node setup here with points:
result:
so i get each point offsetted by 0.01 from the accumulate field.
if i now change point to edge, i get this, which i don't understand:
maybe some GN pro can enlighten me...
Quellenform is, of course, right: Accumulate Field
node is noting down the values for edges, but Set Position
is evaluating them in the Point domain, so there is an interpolation going on. Since vertices can be connected to more than one edge, they acquire more values the more connected they are. Here's a setup with edge and vertex indices exposed so we can check how that interpolation is executed exactly:
Big black numbers are the edge indices, small red numbers are vertex indices. Spreadsheet on the left is showing the final Z values, and the spreadsheet on the right is showing the values accumulating on the edge domain (connected to a Viewer). I'm using the Trailing socket so edge indices and the accumulating values are directly correlated: Index 0
gets a value of $0.00$, Index 6
gets $0.06$ and so on...
Contrasting the numbers for a while makes the method obvious: every vertex gets a final value of all their neighbor edge values combined, divided by the number of total connections. Let's take a look at a random vertex; say, vertex Index 12
in the middle. It has $4$ edges connected to it, with values (again, in this instance, correlated with their index numbers) $10, 30, 9,$ and $29$. Add them all up: $78$. Divide that by the number of connections: $78/4=19.5$ We look at the left spreadsheet and see that indeed, vertex Index 12
has a Z value of $0.195$.
So the seemingly random fluctuations of points in your example is simply the result of how indices are distributed when geometry is first created: on the left and top edges of the grid, edges with very low and very high indices happen to be neighbors so you get those "jump"s.
Accumulate Field
creates the values in the Edge domain, but are queried bySet Position
in the Point domain, and therefore are interpolated. Why do you set this to "Edge" at all, if you want to influence the positions of the points? What exactly is the goal? $\endgroup$