Settings

Theme

Show HN: Perlin noise Wang tile generator

github.com

34 points by gollum999 2 years ago · 2 comments · 1 min read

Reader

This is a little script I wrote a while ago to help generate sprites for a game I was working on. You can use it to build a seemingly-infinite aperiodic noise texture that is actually composed of a relatively small number of tiles. For example, imagine a large grassy field or body of water in a 2D pixel art game, but without the obvious repeated patterns that arise from simple tiling.

The use case is pretty niche (for example, in many cases you could just evaluate the perlin noise function directly in a shader) but I thought it was a cool idea regardless.

swayvil 2 years ago

Given a deterministic 2d noise generator (perlin or whatever). That is to say, for any seed (X,Y) you will always get noise value Z. And given the virtually infinite 2d coordinate space. You have implied a continent, or a planet, or some kind of really large space full of nonrepeating, pretty unique, forms. And putting it through the wang filter makes these forms palatable to humans. A little more organization and you've got no mans sky.

laszlokorte 2 years ago

Such a nice idea. I saw the same idea of wang tiling in a youtube video of a conference talk a few weeks ago and found it quite fascinating.

You might also like my interactive implementation of the void ans cluster algorithm for generating blue noise [1]

[1]: https://static.laszlokorte.de/blue-noise/

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection