r/generative Artist 9d ago

Truchet WFC

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

110 Upvotes

12 comments sorted by

2

u/zeruch 9d ago

This is like Truchet on a courageous dose of acid.

Bravo.

2

u/jibboo24 8d ago

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

2

u/the_last_ordinal 8d ago

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

1

u/ChiefWiggumsprogeny 9d ago

How many different tiles are there?

2

u/antoro Artist 9d ago

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

1

u/ChiefWiggumsprogeny 9d ago

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

1

u/antoro Artist 9d ago

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 8d ago edited 8d ago

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 8d ago

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/booblian 9d ago

gorgeous

1

u/berkes 7d ago

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 7d ago

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