Open Dan-Ritchie opened 8 years ago
Just in case Dan needs to look at this before starting the challenge :
https://aftbit.com/cell-noise-2/
Given a bunch of random points in 2D or 3D space and a grid of squares or cubes that make up the space. Evaluating a point using Steven Worley’s algorithm consist of the following steps :
1)Determine which cube the evaluation point is in 2)Generate a reproducible random number generator for the cube 3)Determine how many feature points are in the cube 4)Randomly place the feature points in the cube 5)Find the feature point closest to the evaluation point 6)Check the neighboring cubes to ensure their are no closer evaluation points.
The website contains a description of the process and a sample code (written in C# if I'm not mistaken). I'll try to implement something myself, although this feels like it's gonna be a lot tougher than it looks.
I already have an implementation of Worley noise, but I thought it would be a great challenge, considering he was doing all that stuff with stratified random numbers.
Totally goes with the videos you've been doing.
The basic idea is to take random points in space (2- or 3-dimensional) and then for every point in space take the distance to the nth-closest point (e.g. the second closest point) as some kind of color information...
related to Voronoi diagrams
https://en.wikipedia.org/wiki/Worley_noise