Clamp the depth to 16, numerical errors are present for values over 30 which could produce NAN results. This is the range for other areas of Blender like the noise node.
There should be no functional changes.
Differential D9447
F-Curve: Noise Modifier clamp depth Authored by Aaron Carlisle (Blendify) on Nov 4 2020, 8:56 AM. Tags Subscribers None
Details
Clamp the depth to 16, numerical errors are present for values over 30 which could produce NAN results. This is the range for other areas of Blender like the noise node. There should be no functional changes.
Diff Detail Event TimelineComment Actions Note, the range clamping is a bug fix and could be committed separately to 2.91 if it is safe to do so. Comment Actions The problem this solves, is if you if you add a noise modifier and increase the depth to a certain point the animation data will become NAN due to floating point precision. This is commented in the old texture code: /* noisedepth MUST be <= 30 else we get floating point exceptions */ I clamped to 16 and not 30 to match the shader node. An additional fix would be to add CLAMP_MAX(oct, 30); to BLI_gTurbulence/BLI_turbulence Comment Actions If there are functions that misbehave when their input is over a certain threshold, it certainly would help when that limitation is documented & checked for. At the minimum a BLI_assert(param < 30 || !"some message here") would be nice. |