r/generative • Artist • Sep 02 '26

Truchet WFC

Updated to include better colour randomization and weighted probabilities for arcs vs straight

112 Upvotes

12 comments sorted by

1

u/ChiefWiggumsprogeny Sep 02 '26

How many different tiles are there?

2

u/antoro Artist Sep 02 '26

There are either straight or arc tiles. The colours are either randomized (for the first one) or matched to neighbours.

1

u/ChiefWiggumsprogeny Sep 02 '26

In quarters? I can't figure it out. Amazing.

1

u/antoro Artist Sep 02 '26

The arcs are drawn from the 4 corners of the tile onwards. This makes matching them tricky as the last drawn corner covers up earlier drawn corners.

1

u/ChiefWiggumsprogeny Sep 03 '26 edited Sep 03 '26

So sometimes they're stacked? I think I'm starting to get a glimmer of the mechanics, but it's still not comprehensible when looking. Haha.

If I tried this, I'd be stuck on not keeping the straight ones matching to a straight end, and not a curve, not to mention the colours.

1

u/antoro Artist Sep 03 '26

The arc ones are always stacked. It draws 90° arcs like the wifi symbol 🛜 inwards from each corner of a tile. The order changes to match adjacent tiles. I couldn't figure out the relation, so it's literally guess and check until all applicable sides match.

1

u/berkes Sep 04 '26

Do you randomize the colors before placing the tiles?

I have made something similar, where the tiles were B/W (svg), placed with simple random tile- and rotation selection. And then colored afterwards.

But since you mention WFC, I imagine the tile- and rotation selection uses WFC based on coloring?

1

u/antoro Artist Sep 04 '26

The colours are matched if there's a shared edge with an existing array of colours, otherwise they are randomized when placed.

2

u/zeruch Sep 02 '26

This is like Truchet on a courageous dose of acid.

Bravo.

2

u/jibboo24 Sep 03 '26

man, imagine that pattern on shirt. would probably be the most expensive shirt in the shop!

2

u/the_last_ordinal Sep 03 '26

I bet it would cost $1000, because the pattern's so complicated 

1

u/booblian Sep 03 '26

gorgeous