SFML community forums

General => SFML projects => Topic started by: Grenthal on July 20, 2017, 02:44:36 pm

Title: Simplex Noise generator
Post by: Grenthal on July 20, 2017, 02:44:36 pm
Hello Community Members,

I know that there were project like this in past... nevertheless I wanted to create own or to be more precisely - port existing algorithm from other language with couple of additional functionality. Mostly for further project, that required random terrain generation.

Putting it all together there it is: Simplex Noise generator for 2D plane. I’ve used SFML to visualise output, it looks like this (greyscale):

(http://i.imgur.com/pGakehg.png)

If anyone is interested, here’s the code: https://github.com/PawelWorwa/SimplexNoise

Any feedback appreciated  :)

Title: Re: Simplex Noise generator
Post by: FRex on July 22, 2017, 04:12:54 am
It's a different kind of noise and I'm no noise expert but would it be possible to reduce it down to just a pure function that takes x and y and returns the noise value in that point, like Unity3D did?
https://docs.unity3d.com/ScriptReference/Mathf.PerlinNoise.html
Title: Re: Simplex Noise generator
Post by: Grenthal on July 22, 2017, 12:49:10 pm
Hi FRex,

Thank You for feedback. As for Your question, fact it’s a different kind of noise (Perlin Noise was depreciated by its author, making Simplex Noise it’s successor) does not matter as logic You mentioned lies purely on visualisation side.

While I’ve left functions inside main file only for debug purposes... after making some tests I must admit that way described in article You provided is much more time efficient. It’s a way faster (assigning pixels to texture instead of drawing them directly).

I believe I’ve achieved something similar You mentioned (updated code) – thank You for hint.

Best Regards
Title: Re: Simplex Noise generator
Post by: Grenthal on July 24, 2017, 08:26:14 pm
Hello community Members,

as a quick update: I’ve made some changes within a source code (simplified it a bit and fixed one 'issue' with gradient's).

I don’t want to create another topic, so I’ll post here for what I'm currently using noise generator: as a random map generator. Below sample outputs (continental and island type maps):

(http://i.imgur.com/8gqNnrQ.png)

While it may not be much... I feel quite happy with the generated results  :)

Best regards
Title: Re: Simplex Noise generator
Post by: Mcatee on January 07, 2018, 10:44:58 am
Hi FRex,

Thank You for feedback. As for Your question, fact it’s a different kind of noise (Perlin Noise was depreciated by its author, making Simplex Noise it’s successor) does not matter as logic You mentioned the bathmate here (http://www.woundedwarriorregiment.org/) lies purely on visualisation side.

That looks very cool Grenthal, awesome for random maps. I'm trying it out now.
Title: Re: Simplex Noise generator
Post by: underww on January 07, 2018, 05:07:53 pm
It looks nice. I was toying with Perlin Noise and Poisson Disk Sampling to make a procedural infinite galaxy a few days ago.
But I've not tested Simplex Noise yet, so I'll probably try your code later.
Title: Re: Simplex Noise generator
Post by: santiagolardiez on January 12, 2024, 04:35:43 pm
I am trying your library and I keep getting an error. I don't know what to do. Any help would be much appreciated
Title: Re: Simplex Noise generator
Post by: eXpl0it3r on January 15, 2024, 01:58:08 pm
Are you linking the library?