Skip to content
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

noise: Add 3D Perlin Noise to noise module #163

Closed
2 of 4 tasks
ulises-jeremias opened this issue Apr 22, 2023 · 5 comments · Fixed by #193
Closed
2 of 4 tasks

noise: Add 3D Perlin Noise to noise module #163

ulises-jeremias opened this issue Apr 22, 2023 · 5 comments · Fixed by #193
Labels
Hacktoberfest This label is assigned to any issue that is good to go for any Hacktoberfest participant

Comments

@ulises-jeremias
Copy link
Member

ulises-jeremias commented Apr 22, 2023

Describe the feature

Add a 3D perlin noise implementation to vsl.noise

Use Case

Perlin noise is a procedural texture primitive, a type of gradient noise used by visual effects artists to increase the appearance of realism in computer graphics. The function has a pseudo-random appearance, yet all of its visual details are the same size.

We already have a 2D implementation of the Perlin Noise, so the scope of this is to have a new 3D implementation as well

Proposed Solution

Other Information

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

Version used

Environment details (OS name and version, etc.)

@ulises-jeremias ulises-jeremias added the Hacktoberfest This label is assigned to any issue that is good to go for any Hacktoberfest participant label Oct 7, 2023
@prithvidasgupta
Copy link

prithvidasgupta commented Nov 20, 2023

@ulises-jeremias I was working on the 3d noise generation today (just trying out VLang). I think there is a bug on

sy := y - f32(y2)

shouldn't it be sy := y - f32(y1) ? Or is my understanding incorrect?

@ulises-jeremias
Copy link
Member Author

just in case I'll include @boonsboos on this conversation because he was the creator of that module 😊 in any case, I'll take a look later just to confirm!

@prithvidasgupta
Copy link

@ulises-jeremias should i just port Perlin's original implementation to vlang/vsl? https://mrl.cs.nyu.edu/~perlin/noise/

@PottierLoic
Copy link
Contributor

PottierLoic commented Dec 26, 2023

Hello i just compared a basic noise function (random value everywhere, no perlin or other stuffs) and the 2d perlin noise from vsl.

basic noise here
noise_basic

and actual 2d perlin noise here
noise_perlin

Perlin noise should be way smoother so I made another implementation based on this https://adrianb.io/2014/08/09/perlinnoise.html and it looks like this :

new_perlin
(The little glitch on the bottom is only caused by the screenshot)

Can I try to submit a PR for 2d and 3d perlin ?

@ulises-jeremias
Copy link
Member Author

@PottierLoic sure! Go for it!

@ulises-jeremias ulises-jeremias linked a pull request Dec 27, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Hacktoberfest This label is assigned to any issue that is good to go for any Hacktoberfest participant
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants