Giter Club home page Giter Club logo

Comments (6)

mxgmn avatar mxgmn commented on May 3, 2024 1

I see. This happens because some tiles (side, corner) in your tileset don't have any allowed neighbors in some direction, and my propagation code assumes that in every direction any tile has >0 neighbors. A quick solution would be to return an error after line 196 if ST == 0. I'll implement a better solution when I have the time.

from wavefunctioncollapse.

mxgmn avatar mxgmn commented on May 3, 2024 1

I added the quick fix.

from wavefunctioncollapse.

mxgmn avatar mxgmn commented on May 3, 2024

So you have 3 tiles essentially: center, corner, wall. My "Rooms" tileset contains these tiles (they're called empty, corner, side). Try making a subset of these 3 tiles (see how to make a subset in Knots/data.xml). Does it work?

from wavefunctioncollapse.

PrettyFlower avatar PrettyFlower commented on May 3, 2024

The rules for the "Rooms" tileset didn't quite match what I was trying to do, as they're more permissive. I had to pare them down to this:

<set size="3">
	<tiles>
		<tile name="bend" symmetry="L" weight="0.5"/>
		<tile name="corner" symmetry="L" weight="0.5"/>
		<tile name="corridor" symmetry="I" weight="1.0"/>
		<tile name="door" symmetry="T" weight="0.5"/>
		<tile name="empty" symmetry="X"/>
		<tile name="side" symmetry="T" weight="2.0"/>
		<tile name="t" symmetry="T" weight="0.5"/>
		<tile name="turn" symmetry="L" weight="0.25"/>
		<tile name="wall" symmetry="X"/>
	</tiles>
	<neighbors>
		<neighbor left="corner" right="side 2"/>
		<neighbor left="empty" right="empty"/>
		<neighbor left="empty" right="side 3"/>
		<neighbor left="side" right="side"/>
	</neighbors>
	<subsets>
		<subset name="Subset">
			<tile name="empty"/>
			<tile name="corner"/>
			<tile name="side"/>
		</subset>
	</subsets>
</set>

I'm trying to just generate one big room, so corners/walls aren't allowed to be across from each other. I was still able to get that in the results though:
image

from wavefunctioncollapse.

PrettyFlower avatar PrettyFlower commented on May 3, 2024

Hmm...interesting. Thanks for looking into this. As a workaround, I tried adding the wall tile back to the Rooms tileset and increasing the output size to 5x5 tiles, the idea being that the wall tiles can be placed along the outside edges and will satisfy the >0 neighbors constraint for sides, corners, and themselves. However I was still able to reproduce the issue. I did notice that returning an error after 196 if ST == 0 did produce an error, but I don't understand the code well enough to debug it.

from wavefunctioncollapse.

toyboot4e avatar toyboot4e commented on May 3, 2024

This happend in my overlapping model implementation where periodic input is not allowed.
edit: so patterns on an edge may have no enabler in some direction

from wavefunctioncollapse.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.