How to use PerlinNoise

Hey! How do I use “Perlin Noise”.

What do I want to do with perlin noise?

1 I want to make cool in-game terrain.

2 I just wanna use it for fun.

Thanks

Snippet taken from math (roblox.com):

math.noise() is essentially a function used to get “random” values in a way such that when it is called with arguments that are relatively close to each other, the returned values will also be close. I put “random” in quotes because the returned values aren’t necessarily random (and neither are numbers from math.random technically). But as the screenshot shows, calling math.noise with the same arguments will always return the same result. One way to visualize perlin noise is as a 2d map of return values. I coded up a little example. Ill link it below. Ive added the ability to change 4 parameters (XOffset, YOffset, ZOffset, and SmoothingFactor). All the “offset” parameters just mean that were accessing a different part of the perlin space. The “smoothing factor” is a bit more complex… but can basically be summarized as how smoothly we’d like to transition between cells. (It’s actually the inverse of whats displayed (1/SMOOTH in the code)).

Here’s the example:
PerlinNoiseExample.rbxl (28.8 KB)

@East98 said it really well. And math.noise can also use up to 3 dimensions, which makes it useful for stuff like smooth randomized 3D terrain generation.

Or any other kind of fluid heat/elevation mapping, such as on spherical maps like this planet: