Sign in to follow this  
Pryme8

Lloyd's algorithm? Voronoi/Worley Noise

Recommended Posts

Ok So I have a question, I have been trying desperately to find someone that implemented a JavaScript library for producing different noise algorithms.

I have Perlin2D covered but would like to support more.

I need to be able to call the generator like noise.worley2D(x/xdiv, y/ydiv, seed); and have a response that will give me an reproducible response depending on the seed.

Every bit of documentation I can find does not help me with actually achieving this.

Share this post


Link to post
Share on other sites

Theres a superb JS one for Voronoi here. Its a little old but works brilliantly and once you get it in your project (use the tried-and-tested copy-paste module system) the API is clean and documented just well enough for you to be able to get on.

I did search fairly extensively as I really didnt want to write my own and this was, sadly, the only (voronoi) one I could find in any sort of usable state, thankfully, it worked out great and is reasonably quick, as you probably know, Voronoi isnt a fast algorithm.

Voronoi does not work like Perlin/Simplex, its needs a defined search space. I had to stitch together vertices of adjoining regions to get an 'infinite' terrain, which was a pain, and did create seams, although depending on what you wanted to do you could create your own polygons from all the vertices but you're almost getting into the realms of creating your own generator then (in my case I ended up ditching voronoi in favour of other faster implementations which were almost visually similar).

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.