-
Notifications
You must be signed in to change notification settings - Fork 54
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
What kind of things can be generalized? #1
Comments
The versions released prior to now could not be generalized straightforwardly, but the 4D function in OpenSimplex2F I just released can be generalized to N dimensions. I may do a more detailed write-up of this at some point. |
Can the 4D function be generalized downwards? |
It can! In 3D you will have four A3 lattices spaced out by <0.25, 0.25, 0.25>, or in 2D you will have three A2 lattices spaced out by <0.333..., 0.333..., 0.333...>. The initial step of finding the closest point on the first lattice might differ. The one included for 4D generalizes straightforwardly to other even dimensions, but for odd dimensions it will require slight modifications. |
Where should I get started? I.e. what part of the code should I be looking at (and how should I figure out how certain constants/control structures were derived) to do so? |
I covered a bit of that in a post here. Should cover at least some of it. https://www.reddit.com/r/proceduralgeneration/comments/hm9bam/opensimplex2_4d_implementations_now_available_new/fxcyo2q/ Let me know if you have any more questions in particular! |
Sorry to necro this thread, but I had a similar issue. I'm trying to port OpenSimplex to Julia, and I'm trying to make an N-dimensional function, as opposed to having different functions for 2D, 3D, 4D... First, is this even possible, or are there differences in the number of dimensions that make it not generalizable? I've taken the 4D (simplified) code as a foundation. Most things I could figure out how to generalize from your reddit post, but I still don't understand how the gradient tables are computed. I would like to avoid any lookup tables, if possible. |
I never even started on this, despite having wanted to for a while, so I'm still interested in any new developments/explanations/improvements 😄 |
Maybe @KdotJPG can offer some help on the lookup table issue. When I finish I will post the code on github too, maybe it helps others :) |
FWIW I just updated the repo with new instancelessly-seedable versions, which also greatly reduce the use of lookup tables. |
Thanks, looks great! However, I still have some questions... How are these tables generated? Also, take for example the function |
Say, porting OpenSimplex to Scala:
What constants can't be calculated (i.e. they would have to be included in
OpenSimplex
)? Is it possible to generalize the algorithm overN
?The text was updated successfully, but these errors were encountered: