-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[question] is it possible to provide a pre-populated target image somehow? #3
Comments
So, I tried adding the feature myself, which might be a good opportunity to get deeper into WFC, see TLINDEN@c75a953 However, it's not working yet. I assume I got the slot population wrong somehow? With this pre-populated output map: And using this example I get: :( |
Ok, I compared the
I also added a dump function. With the unaltered island example I get this PossibilitySpace on startup: island startup and this one when done. In comparision, I get this space on startup with the island-pre example (which uses pre-population) and this result, which is clearly incomplete. I really don't get it why it's not working. Any idea? (example: https://github.com/TLINDEN/go-wfc/tree/main/examples/islands-pre) |
Ah, there's the problem: I prepopulate wave.PossibilitySpace with the slots of the setup image. But I set all other slots to any, including the ones neighboring the prepopulated ones. And the loop doesn't look at the prepopulated slots, because they have entropy 1. So, I think, their neighbors do not get a chance to get propagated properly. So in order to get a correct starting map, the propagation needs to run over the whole map once before the actual collapse loop. |
In many examples on YT it is suggested to do this in order to force a certain structure. For example one could pre-populate a target image with floor tiles to mark a walkable way or where a certain room shall be.
Is that possible?
Oh, and while I'm at it: the library returns an image. However, in order to use this in a game I don't really need an image but a 2d map of tile types (e.g. walkable, walls/water/holes etc). So it would be required to pass in a list of tile properties along with the initial tileset to the function, which it keeps per every placed tile. Does that make sense?
thanks in advance,
Tom
The text was updated successfully, but these errors were encountered: