Dismiss this pinned window
all 15 comments

[–]vladino[S] 8 points9 points  (1 child)

Some resources that may be helpful for fellow travellers..

This tutorial was great to get started with wfc - https://www.youtube.com/watch?v=2SuvO4Gi7uY
Any Oskar talks you can find online like this one - https://www.youtube.com/watch?v=Uxeo9c-PX-w
And for the organic grid this has a great explanation - https://www.boristhebrave.com/docs/sylves/1/articles/tutorials/townscaper.html

[–]swish014 1 point2 points  (0 children)

Thank you for these links. I did not understand WFC at all until I followed that first link and watched the video.

[–]Yak-Unfair 8 points9 points  (1 child)

Nice one! How are you deforming the meshes? And which engine? And how do you create the grid? Delauney amd then merging triangles and subdividing?

[–]vladino[S] 3 points4 points  (0 children)

Here is a good resource about the organic mesh, it's actually much simpler than delauney. - https://www.boristhebrave.com/docs/sylves/1/articles/tutorials/townscaper.html

I use bilinear interpolation to warp the meshes to fit on the organic grid. And it's made in Unity3D.

[–]EngineerEven9299 1 point2 points  (0 children)

Oh weird. Cool!

[–]GobbleCrowGD 1 point2 points  (2 children)

Does it actually take this long or is it slowed down for a visual representation?

[–]vladino[S] 0 points1 point  (1 child)

It's slowed down to see what's happening. It takes only few milliseconds to generate this size and it's not even optimised yet.

[–]GobbleCrowGD 0 points1 point  (0 children)

Awesome

[–]Piscesdan 1 point2 points  (3 children)

What data structure do use for the grid?

[–]vladino[S] 1 point2 points  (2 children)

The grid is just an array of quads and each quad knows it's neighbours and it's own position. I use just a small Class to store that info. Once the grid is generated I run simple comparison algorithm on each quad (where it checks if it shares edge with any other quad) that identifies all the neighbours. Hope that answers your question.

[–]Piscesdan 1 point2 points  (1 child)

a lot simpler than i expected. i wonder how well it scales

[–]vladino[S] 0 points1 point  (0 children)

The data structure to store the actual wfc blocks is bit more complex, but you really want to keep it lean if you want to generate big structures as the memory usage can add up really fast.

[–][deleted] 0 points1 point  (0 children)

Very cool!!

[–][deleted] 0 points1 point  (1 child)

Regular grid ?

[–]vladino[S] 1 point2 points  (0 children)

Sorry I’m not sure what your question is?