Skip to content

Allow seeding of Simplex noise #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
kitsu opened this issue Jul 23, 2016 · 2 comments
Open

Allow seeding of Simplex noise #9

kitsu opened this issue Jul 23, 2016 · 2 comments

Comments

@kitsu
Copy link

kitsu commented Jul 23, 2016

You currently have the permutation table defined as:

private static readonly short[] P = 
{
    151,160,137,91,90,15, ...
};

If you instead randomly select those values you should get random simplex noise.

Alternately you can shuffle the table while expanding the permutations, see this implementation for a seeded simplex: https://github.com/everbytes/LibNoise/blob/master/src/LibNoise.NET35/Primitive/ImprovedPerlin.cs

@MarkuBu
Copy link

MarkuBu commented Jun 4, 2017

Wat to report this issue too. Simplex noise should have a seed.

@rthome
Copy link
Owner

rthome commented Jun 4, 2017

I definitely agree that the Simplex module sould provide the same set of properties that the other noise source module provide (Seed, Frequency, Lacunarity, etc).

The thing is, back when i was translating the C++ of the original libNoise to C#, I had this implementation of Simplex lying around - so I just added it as a module. But it's not part of the original C++ and I (unfortunately, perhaps) didn't take the time to properly integrate it into NoiseGenerator or set up the usual properties.

I'll look into it, but I don't know whether I have the time to properly refactor the module. If it's a pressing matter, I'd be happy to accept contributions ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants