de6ff6eb0a4c9bc405fc16709e470d68bb4fec25
One of the properties of Perlin noise is that it always evaluates to 0.0 when not normalized (or 0.5 when normalized) when the input consists of only whole integers in all vector components. Blender's Perlin noise implementation uses single precision floats with a machine epsilon of 1.19e-07 meaning that for numbers that are greater than 1/(1.19e-07) = 8.40e6 there mantissa doesn't have any bits left to store a rational part of the number, effectively meaning that any number greater than 8.40e6 is a whole integer as far as Blender is concerned. Therefore when evaluating Perlin noise for any coordinates greater than that it always results in 0.0 (or 0.5 when normalized). This fix works as follows: If the original input number is larger than 1.0e6 it is offset by 0.5 after it underwent modulo, which always outputs numbers in a [0.0, 1.0e5) range leaving the mantissa room for a rational part. This way the quantization error still persists however the outputs are random again instead of a constant 0.0. Pull Request: https://projects.blender.org/blender/blender/pulls/122112
…
Blender
Blender is the free and open source 3D creation suite. It supports the entirety of the 3D pipeline-modeling, rigging, animation, simulation, rendering, compositing, motion tracking and video editing.
Project Pages
Development
License
Blender as a whole is licensed under the GNU General Public License, Version 3. Individual files may have a different, but compatible license.
See blender.org/about/license for details.
Description
Languages
C++
78%
Python
14.9%
C
2.9%
GLSL
1.9%
CMake
1.2%
Other
0.9%
