Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

What can math.noise be used for?

Asked by 8 years ago

I understand the math.noise function is associated with the Perlin noise algorithm, but I'm not exactly sure what it could be used for. According to the ROBLOX wiki, it will return a value between -0.5, and 0.5 with coordinates generally close to each other.

(Source: http://wiki.roblox.com/index.php?title=Function_dump/Mathematical_functions#math.noise)

Could this be used for random terrain generation? If so, would anyone mind giving a small explanation or example on how it could be done?

Thanks for reading, hope you can help!

0
Thanks, nice answer! Upvoted. MightyQuestionAsker 297 — 8y

1 answer

Log in to vote
2
Answered by 8 years ago

math.noise can be used to create a heightmap for terrain generation. The heightmap simply describes the height of a specific x/y location.

If you really want, it can also be used for loot tables, generation chance, and even as an alternative to math.random in some applications.

Ad

Answer this question