Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Simplex Noise generator  (Read 11156 times)

0 Members and 1 Guest are viewing this topic.

Grenthal

  • Newbie
  • *
  • Posts: 20
    • View Profile
    • Email
Simplex Noise generator
« 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):



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

Any feedback appreciated  :)


FRex

  • Hero Member
  • *****
  • Posts: 1848
  • Back to C++ gamedev with SFML in May 2023
    • View Profile
    • Email
Re: Simplex Noise generator
« Reply #1 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
Back to C++ gamedev with SFML in May 2023

Grenthal

  • Newbie
  • *
  • Posts: 20
    • View Profile
    • Email
Re: Simplex Noise generator
« Reply #2 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

Grenthal

  • Newbie
  • *
  • Posts: 20
    • View Profile
    • Email
Re: Simplex Noise generator
« Reply #3 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):


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

Best regards

Mcatee

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: Simplex Noise generator
« Reply #4 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 lies purely on visualisation side.

That looks very cool Grenthal, awesome for random maps. I'm trying it out now.
« Last Edit: September 03, 2019, 11:03:11 am by Mcatee »

underww

  • Newbie
  • *
  • Posts: 34
    • View Profile
Re: Simplex Noise generator
« Reply #5 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.

santiagolardiez

  • Newbie
  • *
  • Posts: 2
    • View Profile
    • Email
Re: Simplex Noise generator
« Reply #6 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

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11008
    • View Profile
    • development blog
    • Email
Re: Simplex Noise generator
« Reply #7 on: January 15, 2024, 01:58:08 pm »
Are you linking the library?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/