merrell42 / model-synthesis

Model synthesis is a technique for generating 2D and 3D shapes from examples.
https://paulmerrell.org/model-synthesis/
Other
156 stars 18 forks source link

Summer tiles generation trend towards horizontal roads #5

Closed pozemka closed 6 months ago

pozemka commented 6 months ago

Hello. In comparison of MS and WFC on pages 6 and 10 there are examples of "Summer" generation using MS and WFC. It seems that Model Synthesis version is tend toward generate long horizontal roads. Second observation is that it almost never uses road tile expect leftmost part of the road turnaround. So road is slowly climbing to right and top.

I've managed to achive same behaviour on 50×100 and larger sizes.

But back to topic. Is this issue happening due to misconfiguration or some limitations of algorithm? Or perhaps I am missing something obvious. Is it possible to make results more uniform?

MS: 01 Summer  0 WFC (just to illustrate difference): Summer_tiles

merrell42 commented 6 months ago

I think this is a consequence of MS picking the tiles in scanline order rather than using minimum entropy as WFC does. In many cases, it doesn't make much difference, but in this case it does. There are advantages and disadvantages to using scanline order. The algorithm doesn't fail as much, but there are cases like this where the results aren't as uniform.

But your comparison here is slightly different. In your WFC case, the outer border has been set to water. Setting the outer border to water in the MS case would help. Note that in my comparison, I don't set either border to water and I get long road in both cases. MS is on the left and WFC is on the right:

image

pozemka commented 6 months ago

Thank you for the explanation. I will experiment more with both models.

I will close this issue.