Hey guys… I have been looking for some type of JS API for generating perlin nose
Unity has float Mathf.PerlinNoise(float x, float y)
Do we have anyway using code to generate perlin noise ???
Hey guys… I have been looking for some type of JS API for generating perlin nose
Unity has float Mathf.PerlinNoise(float x, float y)
Do we have anyway using code to generate perlin noise ???
There’s one in the shaders folder Babylon.js/noise.fragment.fx at master · BabylonJS/Babylon.js · GitHub
and one in the procedural textures library Babylon.js/proceduralTexturesLibrary/src/perlinNoise at master · BabylonJS/Babylon.js · GitHub
@MackeyK24, I saw @nasimiasl and @Pryme8 using PERLIN in shaders.
One was in the sandDune PG, and the other in this volumetric fog link…
Should be in a working state… its beeeeen a long time.
just glancing over it, I was reworking this and only perlin2 and worly2 are accessible, but the code for more is there.
Wowza! No way… really? Nice!
Looking…
That MATH makes my day… like VITAMINS.
Check out:
dN.lerp = function(a, b, t) {
return (1-t)*a + t*b;
}
Then in Perlin3
return lerp(
lerp(
lerp(n000, n100, u),
lerp(n001, n101, u), w),
lerp(
lerp(n010, n110, u),
lerp(n011, n111, u), w),
v);
};
LuvIt!
Looks like lots of Matrix Math, is as far as I can decipher. Maybe I way off.
: )