Add Perlin Noise Derivative to math library

In the realm of procedural generation, having the derivative of your noise function can be a very valuable tool. In my use-case (terrain generation) it can allow for more realistic terrain features such as erosion or making more realistic flowing rivers as well as being a metric that can be used to determine appropriate positions for placing trees or other props and buildings.

I could make a Perlin noise derivative function myself but I need to call this function very frequently. Just running my own perlin noise function alone is about 3x slower than the Roblox implementation. Since the derivative function requires me to calculate part of the Perlin noise function plus the extra calculations needed to find the derivative, it becomes much too slow in the end for me to actually use in-game at the rate I need to call the function at.

It would be great for me and any other developers who want more advanced tools available to them for procedural generation if we had a fast Perlin Noise Derivative function available in the math library.

43 Likes