You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! So I was a major contributor to this library a number of years ago, but then kinda fell off when I moved on to other projects. Sorry about that. But I recently took up a new project which again needed a range of noise functions in Rust, so I came back here. Sadly, the library had undergone an almost total rewrite since I'd last looked at it, and the new API was not one I personally found very usable.
Fixing it to a state I liked was clearly going to be a near total rewrite, so rather than try and do that through a long series of incremental pull requests, which would take forever and delay my use of the library, I just forked it and did the bulk of the updates over about a months. My version is here:
I finished that work about a month ago, and have been using it since then. I'm happy with the state it's in, and it works well for my project. I haven't bothered to update the docs yet, because I wasn't really planning to publicize this work directly to anybody else.
That said, I wanted to let you all know about it, in case you want to draw from it. It's a bit too extensive a rewrite to turn into a PR, but you're totally welcome to take any bits and pieces and ideas from it that you want.
The core philosophy here was just to simplify it as much as possible. Remove the traits that treat noise functions as composable objects, and go back to just making them simple functions, which are already composible. Which allows you to strip out a ton of code, which was essentially objects designed to wrap basic operations, since you can just use those basic operations directly now.
I also changed how worley noise is generalized. It no longer supports multiple distance functions (though that could be re-added if needed, but distance squared was appropriate for all my purposes), but it now comes in 1 point and 2 point variants for all dimensions, and returns the distance, nearest point, and the cell that point is in (or the nearest 2 for the 2 point variants). Then there's a set of wrapper functions that do different things with that data.
I also generalized all the fractal functions (which honestly were ALL forms of fractal brownian motion), so they can now be applied to any underlying noise function, and provided utility methods for combining all the different forms of fbm with many of the base noise functions.
And there are too many other changes to list. But those are the biggest structural ones.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi! So I was a major contributor to this library a number of years ago, but then kinda fell off when I moved on to other projects. Sorry about that. But I recently took up a new project which again needed a range of noise functions in Rust, so I came back here. Sadly, the library had undergone an almost total rewrite since I'd last looked at it, and the new API was not one I personally found very usable.
Fixing it to a state I liked was clearly going to be a near total rewrite, so rather than try and do that through a long series of incremental pull requests, which would take forever and delay my use of the library, I just forked it and did the bulk of the updates over about a months. My version is here:
https://github.com/Cifram/noise-rs
I finished that work about a month ago, and have been using it since then. I'm happy with the state it's in, and it works well for my project. I haven't bothered to update the docs yet, because I wasn't really planning to publicize this work directly to anybody else.
That said, I wanted to let you all know about it, in case you want to draw from it. It's a bit too extensive a rewrite to turn into a PR, but you're totally welcome to take any bits and pieces and ideas from it that you want.
The core philosophy here was just to simplify it as much as possible. Remove the traits that treat noise functions as composable objects, and go back to just making them simple functions, which are already composible. Which allows you to strip out a ton of code, which was essentially objects designed to wrap basic operations, since you can just use those basic operations directly now.
I also changed how worley noise is generalized. It no longer supports multiple distance functions (though that could be re-added if needed, but distance squared was appropriate for all my purposes), but it now comes in 1 point and 2 point variants for all dimensions, and returns the distance, nearest point, and the cell that point is in (or the nearest 2 for the 2 point variants). Then there's a set of wrapper functions that do different things with that data.
I also generalized all the fractal functions (which honestly were ALL forms of fractal brownian motion), so they can now be applied to any underlying noise function, and provided utility methods for combining all the different forms of fbm with many of the base noise functions.
And there are too many other changes to list. But those are the biggest structural ones.
Beta Was this translation helpful? Give feedback.
All reactions