Skip to content
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

Output topography with holes? #2

Closed
justonia opened this issue Oct 24, 2018 · 3 comments
Closed

Output topography with holes? #2

justonia opened this issue Oct 24, 2018 · 3 comments
Labels
enhancement New feature or request

Comments

@justonia
Copy link
Contributor

Is it possible to have an output topography that has explicitly defined "holes" that no content should be generated for (e.g. they get treated as if they were an edge but they are in the interior of the output)?

Right now I can't seem to find anything that would allow for that. Calling Ban with all tiles or Select with a null tile via a constraint all result in a Contradiction (which I would expect).

@BorisTheBrave
Copy link
Owner

Topologies have a Mask property which is intended for this use case. But right now, only inputs can have a mask. The mask is ignored when generating output.

I'll consider this a feature request.

@BorisTheBrave BorisTheBrave added the enhancement New feature or request label Oct 25, 2018
@justonia
Copy link
Contributor Author

Gotcha, thanks. A big aspect of what I'm hoping to use this algorithm for is a design-assist tool. You could hand-make some parts of an area, then basically have WFC flood fill in everything else. I might be able to hack this by abusing suggestions you made in #3 but having a non-uniform topography would simplify this problem alot.

@BorisTheBrave
Copy link
Owner

I've kinda implemented this now. It works for AdjacentModel. For OverlappingModel, the results may be a bit surprising, but you might find it better than nothing.

What happens in the overlapping case is that you have to think about overlapping rects that are half inside and half outside the mask - we still want those rects to come from the sample. So right now that means the library will still generate tiles for some masked out locations, so that those rects continue to work. But it will now skip masked out locations providing there's no such rect that reaches them.

I've created #7 for a fairly complicated feature that would allow this to be better tackled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants