Page 1 of 1

[Mod] Voronoi Cell Noise Lib [vcnlib]

PostPosted: Wed Sep 02, 2015 21:48
by qwertymine3
This is a library to generate voronoi cell noise biome maps for lua mapgens and realms.

Features

  • Multiple biome-maps per world - with seed offsets supported
  • Multiple geometry types - euclidean,chebyshev,manhattan (and my custom one - oddprod)
  • Multiple biome distribution types - random, closest and tollerance
  • 2d and 3d noise
  • Scalable biomes
  • Resolution reduction - for improved 3d and 2d noise performance
+ Screenshots


Downloads
Download - rename to vcnlib
https://github.com/Qwertymine/VCNLib/archive/master.zip
Github Page
https://github.com/Qwertymine/VCNLib

Depends
None

License
This is licensed under the MIT license
+ License

Re: [Mod]Voronoi Cell Noise Lib[vcnlib]

PostPosted: Wed Sep 02, 2015 23:16
by paramat
Good to see this.

Re: [Mod]Voronoi Cell Noise Lib[vcnlib]

PostPosted: Thu Sep 03, 2015 00:50
by Sokomine
Nice to have a lib for that. Maybe you can set up a few examples? Mapgens usually get intresting once someone adds some special nodes for the terrain and some suitable plants so that it becomes more visible. I've never dwelged deep into the noise stuff.

Re: [Mod]Voronoi Cell Noise Lib[vcnlib]

PostPosted: Thu Sep 03, 2015 16:09
by qwertymine3
Sokomine wrote:Nice to have a lib for that. Maybe you can set up a few examples? Mapgens usually get intresting once someone adds some special nodes for the terrain and some suitable plants so that it becomes more visible. I've never dwelged deep into the noise stuff.


I have some plans to do that, but it may take a while before I can.
Until then I have made a quick mod out of my dev/testing mod and released as [ugsbiomes] it here:
https://forum.minetest.net/viewtopic.php?f=9&t=13168

Re: [Mod]Voronoi Cell Noise Lib[vcnlib]

PostPosted: Thu Sep 03, 2015 21:19
by Ben
Oh, very nice! I've skimmed the code a bit – how much is it tied to biomes / mapgens, and how much is free-standing? Because I'd be interested to see what happens if you use it to generate structures, not just biomes ;-)

Re: [Mod]Voronoi Cell Noise Lib[vcnlib]

PostPosted: Thu Sep 03, 2015 21:35
by ArguablySane
Ben wrote:Oh, very nice! I've skimmed the code a bit – how much is it tied to biomes / mapgens, and how much is free-standing? Because I'd be interested to see what happens if you use it to generate structures, not just biomes ;-)

For structure generation I'd argue that Delaunay triangulation is a more useful algorithm. That basically gives you a set of lines connecting the centres of areas which touch in a Voronoi diagram. It can be used to generate very nice caves or corridors between rooms.

Re: [Mod]Voronoi Cell Noise Lib[vcnlib]

PostPosted: Sat Oct 31, 2015 12:32
by qwertymine3
Working on an optimisation update for this mod.

I have got a 'working' version in the 'next' branch of the github repo. The noise is currently suffering from some artifacts, but is 95-96% accurate.

Should be able to make a complete and more accurate version in the next week.

Re: [Mod]Voronoi Cell Noise Lib[vcnlib]

PostPosted: Sat Oct 31, 2015 12:46
by qwertymine3
Ben wrote:Oh, very nice! I've skimmed the code a bit – how much is it tied to biomes / mapgens, and how much is free-standing? Because I'd be interested to see what happens if you use it to generate structures, not just biomes ;-)


All this library assumes is that you want to fill an integer aligned grid with the 'biome' name given to the closest noise point. It also uses the minetest position hashing for the sectors, so the grid of sectors must be less than +-31000(ish) for truly random noise.

So not tied to mapgen/biomes, but I can't think of many other uses. Maybe texturing for super-structures, such as the stone type for the walls of a large dungeon: This may require a small noise pattern though, which is where this library has the worse performance.

Re: [Mod]Voronoi Cell Noise Lib[vcnlib]

PostPosted: Sun Nov 01, 2015 21:27
by qwertymine3
Update!

There is now a new optimised algorithm, which almost makes 3d 1:1 scale noise practical to use. It currently runs with 99-99.5% accuracy to the old 1:1 noise generation.

Also there is a feature called 'bring your own table', allowing for re-use of old noise tables and hopefully less GCs for noise heavy generation

Re: [Mod]Voronoi Cell Noise Lib[vcnlib]

PostPosted: Thu Nov 12, 2015 00:14
by SegFault22
This would be perfect for replacing default stone with other types of rock, especially for making the different types of rocks more distributed.

Re: [Mod]Voronoi Cell Noise Lib[vcnlib]

PostPosted: Thu Nov 12, 2015 20:51
by qwertymine3
Update!

You are now able to specify the point distribution for your noise.

Code-base has been simplified - 'heatmap' and 'tolmap' removed - functionality still available using the 'multimap' types

Re: [Mod]Voronoi Cell Noise Lib[vcnlib]

PostPosted: Sun Nov 15, 2015 00:19
by qwertymine3
Update!

Perlin noise maps are now fixed and correctly take into account the world seed.
Custom map-resolution/fall-back/failure orders are now supported.
Some basic non-noise maps are supported - height and variations.

Unless bugs are found I will consider the main Voronoi noise code to be complete at this point.

Re: [Mod] Voronoi Cell Noise Lib [vcnlib]

PostPosted: Fri Jan 01, 2016 03:08
by slemon
Great mod.

Re: [Mod] Voronoi Cell Noise Lib [vcnlib]

PostPosted: Mon May 30, 2016 15:25
by burli
Maybe I want to use this mod for my cave mod. Is there any documentation how to use this? Are there any example except 3d stone biomes?

Re: [Mod] Voronoi Cell Noise Lib [vcnlib]

PostPosted: Mon May 30, 2016 16:52
by qwertymine3
Noise parameter documentation is in test_layer.lua.
There are no examples of use other than 3d stone biomes.

I would suggest using a simple 3d cell noise, such as a cubic noise, or some other 3d tesselation, as it would have better performance than using this mod.

If you do want to use this mod, I have plans to re-write it, however I wont be able to for at least a week.