Closed kjav closed 3 years ago
Here are some of the tiles that it is meant to connect to:
Hi! You're right, there is indeed no option for a tile with no symmetry. I'll patch this up eventually, but I'm not sure when, it requires more than just adding else if (sym == 'J') { cardinality = 8; ...; }
. I'm releasing a new version of WFC soon (as part of a larger project) with a different symmetry system that doesn't have this problem, because it induces the symmetry type from a low-pixel "scheme" of a tile.
Hi mxgmn,
Thanks for your reply - I'm glad I understood the problem correctly! Could you explain why adding a "cardinality = 8" option would not fully solve the problem? For instance, adding the following symmetry option does not solve the problem but I do not understand why:
cardinality = 8;
a = i => 0;
b = i => 0;
Because it currently assumes that all symmetries of the tile could be reached by rotating the base tile (which is not true for your example). And by setting i => 0
you are actually describing a maximally symmetric case. The right a
action would look more like i => (i + 1) % 8
.
I'm late to the party, but oh well, at least for posterity: the already mentioned fast-wfc has a symmetry="P"
option, and additional indices for flipped+rotated tiles (4 for horizontally mirrored tile, for example)
how is this related to chaos theory? & hope for the demo!
Here is a solution: (1)Add the following lines to the list of symmetry operations/functions. else if (sym == 'F') { cardinality = 8; a = i => i < 4 ? (i + 1) % 4 : 4 + (i - 1) % 4; b = i => i < 4 ? i + 4 : i - 4; }
(2) Add reflection function after line 47 ("Color[] rotate(Color[] array) => tile((x, y) => array[tilesize - 1 - y + x tilesize]);"): Color[] reflect(Color[] array) => tile((x, y) => array[tilesize - 1 - x + y tilesize]);
(3) Change 135-136 ("tiles.Add(rotate(tiles[T + t - 1])); tilenames.Add($"{tilename} {t}");") as: if (t < 4) tiles.Add(rotate(tiles[T + t - 1])); if (t > 3) tiles.Add(reflect(tiles[T + t - 4])); tilenames.Add($"{tilename} {t}");
I tested @chriskkkkl's solution on the new tileset, it works.
Hi,
I'm trying to add a tile to my tileset that does not have symmetry. Here is the tile:
I believe that this tile has none of the symmetry types (X, I, L, etc). Please correct me if I am wrong! However, I cannot seem to define this in the data.xml file; In fact, is it true that because of this line: https://github.com/mxgmn/WaveFunctionCollapse/blob/fad1066b5000f7e9fbda0ef81bbea56799686670/SimpleTiledModel.cs#L64 There is not currently an option for a tile with no symmetry? Thanks!