Terra (Fabric/Forge/Paper)

Terra (Fabric/Forge/Paper)

74.2k Downloads

Distance to edge return option for cellular noise

astrsh opened this issue ยท 3 comments

commented

Having the option to use noise like the image below as an extension of the current cellular return options would be nice for things like palettes, where you could could have 'cracked' looking grounds, or whatever else people come up with. You can get kinda similar results with the current distance return, but the issue is that centers of cells look very circular

Distance to edge example:
image

This page has an example implementation https://www.ronja-tutorials.com/2018/09/29/voronoi-noise.html
image

commented

This is already an option, with the cellular.return key in noise configs.

commented

The current distance option calculates distance from the cell center - which gives different results compared to distance from the nearest edge* - unless I'm missing an option for it

Comparison:

Center distance (inverted for comparison)
Screenshot_20210116-024410_Firefox.jpg

Edge distance
Screenshot_20210116-024530_Firefox.jpg

commented

Distance2Sub return type is what you're looking for. There are many variations of the Distance2 return type:

  • Distance2Add
  • Distance2Sub
  • Distance2Mul
  • Distance2Div

Distance2Sub:
image