• Simplex Noise Module
    4 replies, posted
[release]Simplex Noise is: [quote]a method for constructing an n-dimensional noise function comparable to Perlin noise ("classic" noise) but with a lower computational overhead, especially in larger dimensions. Ken Perlin designed the algorithm in 2001[1] to address the limitations of his classic noise function, especially in higher dimensions.[/quote] from [url=http://en.wikipedia.org/wiki/Simplex_noise]Wikipedia[/url][/release] [release] I'm quite confident that it works, and works quite well. So here's a download link: [url]http://dl.getdropbox.com/u/99862/SimplexNoise.lua[/url] And a link to a file I've been using to test it: [url]http://dl.getdropbox.com/u/99862/test.lua[/url] [/release] Function list: [list] [*]SimplexNoise.Noise2D(x,y) [*]SimplexNoise.Noise3D(vector) [*]SimplexNoise.Noise4D(vector,w) [*]SimplexNoise.GBlur1D(x) [*]SimplexNoise.GBlur2D(x,y) [*]SimplexNoise.FractalSum2DNoise(x,y,itier) [*]SimplexNoise.FractalSum3DNoise(vector,itier) [*]SimplexNoise.FractalSum4DNoise(vector,w,itier) [*]SimplexNoise.FractalSumAbs2DNoise(x,y,itier) [*]SimplexNoise.FractalSumAbs3DNoise(vector,itier) [*]SimplexNoise.FractalSumAbs4DNoise(vector,w,itier) [*]SimplexNoise.Turbulent2DNoise(x,y,itier) [*]SimplexNoise.Turbulent3DNoise(vector,itier) [*]SimplexNoise.Turbulent4DNoise(vector,w,itier) [/list] Just a note: The fractal sum and turbulence functions are <itier+1> times more computationally expensive than the normal noise, but can produce some really cool effects. I also do not guarantee that the Gaussian blur functions are 100% operational, since I'm fairly certain my test of them is not. And to quote the comment at the top of the file: [lua] ----------------------------------------------- ---Simplex Noise Module, Translated by Levybreak --Original Source: [url]http://staffwww.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf[/url] --(The code there is in java) --Just as a note, there's a fuckton of math in here. Don't try and calculate this shit real time. --Get lanes and prcess it in a seperate thread. Please. Really. ----------------------------------------------- [/lua] Also note, the module itself caches the data, so don't *have* to cache it yourself. This does use up quite a bit of memory, though, depending on how much noise you're making. Please don't ask how this is useful/practical. Generating (256^2)*10 (That's the Noise3D Test) data points on a grid is not something you should be doing in GMod, anyways. (a 10x10 grid, maybe. You'll lkely just call it for a value when you need it, though.)
Quite awesome. I can't see much of a use for this in GMod, though. [b]Edit:[/b] My computer locked up as I clicked the download link and I now have 182 copies of this.
[QUOTE=Deco Da Man;17989593]Quite awesome. I can't see much of a use for this in GMod, though.[/QUOTE] And on that note, I'd like to state that I've got a non-gmod version of it here: [url]http://dl.getdropbox.com/u/99862/non-gmod/SimplexNoise.lua[/url] But it is quite inelegant and I had to rip some functions out of LuaBit, but don't tell anyone. :wink:
I can see this in the expression gate 2 of wiremod already. :V
[QUOTE=Grocel;18063214]I can see this in the expression gate 2 of wiremod already. :V[/QUOTE] Oh god, brilliant. I knew my Laser-Guided Hover Rocket Robot was missing something, and that's it! It needs a TV... a TV showing static!
Sorry, you need to Log In to post a reply to this thread.