2
$\begingroup$

I'm confused and can't figure out what's happening.

I was just starting to work on a simple procedural set up in geometry node. Generate a grid, extrude it, and add some x/y offset to each vertices to add some randomness. obviously I don't want holes, I want a flat surface. Thus I used white noise. I've split edges, and so I expected each couple of vertices with the same coordinate to have the exact same offset. But for reason I can't figure out, that's only the case like 90% of the time.

Here's an example where white noise doesn't behave as I expected to

Expected result with a different number of vertices

Most of the time I get the expected result. However I'm quite lost to why sometimes there's holes in my grid. My only hypothesis is that white noise is using a linear congruential generator or something and with rare values it can get stuck in a loop with zeroes or something like that, and the fact that translating the very first geometry can fixe the issue may back up that theory. However I'm absolutely not convinced by that explanation.

I must also precise that I'm quite confident when I say that vertices have the exact same coordinate. I mean I could be wrong but I've check with the spreadsheet + there's no way I could get the expected result most of the time if that weren't the case.

Does anyone knows of any similar issue regarding white noise ?

(full Node setup is a little big to include in screenshot and I don't think it's that relevant, it's just a 3d white noise into a map range and then a set position offset)

(I haven't done fully extensive testing but for what I've found playing around this issue only occurs with 3d noise, 2d seems fine. It also seems like holes where only on the top part of the grid)

(before anyone asks me : the reason I'm doing this is because I need to be able to scale down individual deformed cube later. And I also want this set up to work not only with a square grid but with any flat geometry filling the plane)

illustration of expected result after scaling down

$\endgroup$
2
  • 2
    $\begingroup$ Please show a simple node setup reproducing the issue. $\endgroup$ Oct 16, 2023 at 22:31
  • 1
    $\begingroup$ Maybe the same decimal representation of the value, does not necessarily mean it's the same value stored in binary. Maybe it's just a lot less likely to happen with 2d texture because it has only 2 coordinates instead of 3 that can mismatch and it might still happen with 2d as well. I would use something else than white noise. Very fine simple noise might do the trick. Or maybe the coordinates can be rounded somehow to allow for slight variation. $\endgroup$ Oct 16, 2023 at 22:31

1 Answer 1

2
$\begingroup$

The white noise node gives you a different value output for any change in input, even if it is an infinitesimal change. My guess is that through the extrude node, the positions of the extruded part lose in accuracy. Due to floating point precision and optimizations, computer calculations are only deterministic up to a certain number of decimal places or significant digits.

TLDR : Add a Vector Math node set to Snap the position before feeding it into the White Noise node, something like 0.00001 increment should do it.

enter image description here

$\endgroup$
1
  • 1
    $\begingroup$ it looks like your guess was correct, Thank you so much ! With the snap node I don't have any more problem $\endgroup$ Oct 17, 2023 at 14:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .