The "snoise(float3 v)" function has artefacts in a line exactly at x=y=z.
This artefact seems to repeat in multiple places (always along the line x=y=z relative to a noise cell maybe?).
This produces obvious artefacts when used in my voxel engine in Unity3D,
which currently uses marching cubes to display the isosurface at value 0 of the 3d noise.
The relevant code is this:
valueForMarchingCubes = Unity.Mathematics.noise.snoise(pos3d / 100f) + 0.42f;
A reproduceable Unity3D script:
using UnityEngine;
using Unity.Mathematics;
using static Unity.Mathematics.math;
public class NoiseBugRepro : MonoBehaviour {
// Start is called before the first frame update
void Start () {
string output = "";
for (int i = 0; i<20; ++i) {
float x = lerp(1.8f, 2.2f, i / 20f);
float3 pos = float3(x, 2f, 2f);
float val = noise.snoise(pos / 20f);
output += string.Format("noise.snoise({0:F2}, {1:F2}, {2:F2}) -> {3:F6}\n", pos.x, pos.y, pos.z, val);
}
Debug.Log(output);
}
}
Output that shows the artefact when exactly on the x=y=z line:
The "snoise(float3 v)" function has artefacts in a line exactly at x=y=z. This artefact seems to repeat in multiple places (always along the line x=y=z relative to a noise cell maybe?).
This produces obvious artefacts when used in my voxel engine in Unity3D, which currently uses marching cubes to display the isosurface at value 0 of the 3d noise.
The relevant code is this:
valueForMarchingCubes = Unity.Mathematics.noise.snoise(pos3d / 100f) + 0.42f;
A reproduceable Unity3D script:
Output that shows the artefact when exactly on the x=y=z line: