krychu / wfc

Wave Function Collapse library in C, plus a command-line tool

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

What is the meaning of "expand ... on the bottom and right"

aschuhardt opened this issue · comments

It's not clear what this argument does, or what its use is. Can someone provide an explanation?

Thanks, you're right the purpose is not clear. This setting wraps the input image horizontally and vertically - as if you placed copies of the input image on a grid. This effectively removes edges from the input image. There will be now tiles that allow right side of the image to connect with the left side of the image.

Imagine you have an input image with a tree on the left and empty space on the right. If you don't "expand", you will have at most one tree in the output image, because there are no tiles that connect empty space (the right edge side of the image) with the beginning of the tree (the left side of the image). So once you generate empty space in the output image there is no option to begin a tree. If you "expand", you can have more than one tree, because there are now tiles that connect empty space with the beginning of a tree.

It's a bit hard to explain but I hope this helps. I'll try to add an explanation to the docs, but need to think how to best explain it.

Are you using wfc in any project?