EPC2018 | Wave Function Collapse in Bad North | Oskar Stalberg — Transcript
Full transcript
- 0:00all right hello everyone nice to be here
- 0:03yeah my name is Oscar solver I make
- 0:07procedural planets and pretty things I
- 0:10come from like an artist's background I
- 0:13studied at the game assembly mama which
- 0:15is a single place similar to this one I
- 0:17studied art there but then I should have
- 0:19ventured more and more into technical
- 0:21science and making more procedural
- 0:23things I used to work at massive I
- 0:26worked on the division I made that cool
- 0:29like holographic map maybe you've seen
- 0:30it I was good fun and side projects I've
- 0:36got a bunch of other like procedural
- 0:38interactive demos just to explore things
- 0:41myself but and I mean they habit of
- 0:42putting them out this interactive demos
- 0:44online too so both that little house
- 0:46there called brick block and not planet
- 0:49you can find on my web page and you can
- 0:50open them in the browser and it's just
- 0:52like tools to manipulate a house and
- 0:54manipulate a planet that's a very good
- 0:59way to do projects as student too by the
- 1:01way
- 1:01just like make things that you can
- 1:03publish that you don't just publish
- 1:04screenshots or videos that publish like
- 1:06interactive things because there's so
- 1:08much more likely to be shared and it's
- 1:10so much more impressive so do that
- 1:13yeah I said I worked with NASA for a few
- 1:16years I worked at us to model and say
- 1:19for a bit too but now I'm indeed making
- 1:23my own games well trying to make my own
- 1:26game one game called bad north looks
- 1:29like this right now but today I am going
- 1:33to talk to you about a procedural
- 1:38algorithm that we are using to generate
- 1:40these levels it's called weight function
- 1:42collapse I didn't name it wave function
- 1:44collapse so you know don't ask me about
- 1:47the connection to quantum mechanics but
- 1:49this is like a gift I came across this
- 1:51guy Maxim goomy is the guy who invented
- 1:54the concept or I mean he based it off of
- 1:57something else too but I think he did
- 1:59the bulk of it you mentioned so as you
- 2:02can see it's well the way he did it is a
- 2:05way to use like a small example bitmap
- 2:08and they create a larger bitmap that's
- 2:11consistent with that so what it really
- 2:13does it's like deriving adjacency
- 2:16constraints like which pixels are
- 2:17allowed to be next to which pixels from
- 2:20the example and then it can create
- 2:21something bigger out of that so
- 2:23obviously my first idea when I saw this
- 2:25one was like I bet you can use this for
- 2:273d I bet you can use this for other
- 2:28things than just textures to build
- 2:33little larger works because it tied him
- 2:35very neatly to like some problems I had
- 2:37looked at before
- 2:38like how to make nicely very sort of
- 2:41Compton's agnostic procedural algorithms
- 2:47so yeah this is the first little thing
- 2:53all right yeah there we go yeah he's had
- 2:58to download these is like half of these
- 3:00are just my old tweets that I downloaded
- 3:02again into the you should follow me on
- 3:05Twitter to a post about these kind of
- 3:06things but this is like my first
- 3:08implementation I hope the wave function
- 3:10cooks that I built and as you see it
- 3:12what it does it it's applied on like a
- 3:15triangular tiles model on spheres one in
- 3:19the middle there is like villages roads
- 3:24quite similar to the planet I did before
- 3:26but it can also it can do some things
- 3:28that that planet couldn't do like some
- 3:31ways of making roads and because that
- 3:32pipe didn't have worlds for examples
- 3:34they like are a bit different
- 3:35otherwise but you can also make you do
- 3:37like weird things you see this guy's
- 3:39just like building sort of also just to
- 3:43yeah I don't like UT I don't want the
- 3:45triangular tiles for that would look
- 3:46like this video doesn't seem too long
- 3:49but that's just another night concert so
- 3:51the core idea is that you just you just
- 3:53give it a title set and then it figures
- 3:56out how to assemble that tile set into
- 3:59one coherent model or environments
- 4:02people like whatever constraints are
- 4:04implied by how your tile set fits
- 4:07together it will solve for that so if
- 4:10you give it like if you if you if you
- 4:14haven't build a ton of transitions it
- 4:16will just figure out a way to build the
- 4:19environment with those transitions that
- 4:21you have did you have that build so this
- 4:24is another early example of what I did
- 4:26there so you see it's like building a
- 4:27little sort of safe walk something like
- 4:28that and these like to the left third
- 4:31that's actually all the inputs modules
- 4:33been used so it's not today it's quite
- 4:35quick to get started with it and then
- 4:37you figures out how to put it together
- 4:39into different things and this I think
- 4:45this is the album is algorithm is my
- 4:47contents agnostic fundamentally like it
- 4:49doesn't know that it's building a house
- 4:50it just knows that it needs to fit
- 4:52things together it makes it like a Civ
- 4:55artist you can build all these nice the
- 4:57whole sort of transitions between plates
- 4:59and you can build like extra little
- 5:01things use things like you can build a
- 5:03chimney and you can build like I have
- 5:06some larger peach some sort of extra
- 5:08features of my been going up here these
- 5:12little sort of divider here so yeah you
- 5:15can build things like that and then it
- 5:17will like three larger structures form
- 5:18it so now I'm going and this is another
- 5:21thing I tried to build this is actually
- 5:23invisible became I had worth a long time
- 5:25ago it looks like this and you played a
- 5:26little cat jumped around but then but
- 5:29that all changed it turned up then this
- 5:31is an important lesson it was too
- 5:32colorful it's very hard to put gameplay
- 5:35on top of an environment that's very
- 5:36colorful because then the gameplay is
- 5:38even more colorful
- 5:39unlike the UI
- 5:41the attention but it's also just an
- 5:44example of the kind of variation you can
- 5:45get from from the algorithm so now we're
- 5:50going to get into sort of the specifics
- 5:52of the algorithm how it actually works
- 5:55and as any of you looked at this other
- 5:58working before few people have that's
- 6:02good so my hope is here that actually
- 6:04has any of you built one yourself for
- 6:06trying to a few people that's really
- 6:10cool so my hope is that actually like if
- 6:11you've been interested in it you should
- 6:14from this presentation be able to get
- 6:16going and start sort of understanding
- 6:19the core ok so this is a very simplified
- 6:21version of it that's made specifically
- 6:24for presentations so you see here
- 6:27there's like the input modules and here
- 6:30is like a big possibility space and call
- 6:32cuz there's a bit and we do it too when
- 6:33you talk about tiles like it's a title
- 6:35where things go or is a tile what you
- 6:38place there so I split up the
- 6:39terminology into modules and slots so
- 6:42like come on each slot picks a module
- 6:44that's the terminology so right now you
- 6:47have everything being possible every
- 6:50single module here being possible inside
- 6:52each slot and I can just quick solve
- 6:55what so you see it like constricts
- 6:59different environments there our
- 7:02therapist is like how the particles
- 7:03input modules and this like this
- 7:05particular set of module because the
- 7:07algorithm can fail in some cases but
- 7:09with this input this input module it
- 7:12can't actually sell because it's too
- 7:13simple there are no what we're
- 7:14dependence is built into it and the way
- 7:18it works
- 7:18let's start by like these selecting so
- 7:23now I will only feed it to modules only
- 7:26too much was possible full sky or full
- 7:28dark so obviously since they don't have
- 7:30any transition between those modules I
- 7:32don't have any taught us that I'd like
- 7:33both sky on both dirt as soon as I
- 7:35select one of them everything turns into
- 7:38sky for example or everything turns into
- 7:41dirt because there's nothing like
- 7:43there's nothing to connect
- 7:44but if I had like this little connector
- 7:47here right so it's dirt at the bottom
- 7:49this kind of top if I slip sky here yeah
- 7:52everything above it I'm inviting that it
- 7:54has to be sky
- 7:55if I select dirt here yeah everything
- 7:57along with that and below that has to be
- 7:59dirt but here from still a bit ambiguous
- 8:00but as soon as I place the like the top
- 8:05line part there then like the entire
- 8:07class is done so the way and of course
- 8:15yeah you can has to see there like here
- 8:17it it errors because it can't solve it
- 8:18because it doesn't have any modules
- 8:19whatsoever I just give it like a coroner
- 8:22module it can't solve it either because
- 8:23there's no way to build a Korean system
- 8:25with just a quarter module if I gave it
- 8:27corners I'm sky then yeah it kind of go
- 8:29the corner of course guy he's there but
- 8:31that's it so the way it sort of cuz I
- 8:37feel like it you can see the solving
- 8:39happening in a little tiny slider here
- 8:42and this is also available their own
- 8:44lines you can you can open this as I
- 8:50click a peak so the core idea is that
- 8:52yeah you have this huge possibility
- 8:54space where everything is possible
- 8:55everywhere and then as soon as you place
- 8:57something what you're doing is not
- 8:58really placing something of what you're
- 9:00doing is you're removing all other
- 9:02possibilities from that tile until
- 9:05there's only one remaining and as those
- 9:07are removing though they look like if
- 9:10you have one that has like sky downward
- 9:13pointing if then you remove that one and
- 9:16that was the last one that had sky
- 9:17downward pointing then in the slot below
- 9:21it it has to remove everything that
- 9:24relied on having sky downward so
- 9:26everything that has sky upward and then
- 9:28you know that might have further
- 9:29implications and has to remove some
- 9:31other things that rely on those things
- 9:32so since this is like I don't have any
- 9:35overhangs so as soon as I play something
- 9:38with dirt it knows that everything below
- 9:41has to be dirt right you see how they
- 9:42created this big dirt pillar here and I
- 9:44was gonna make a similar Twitter I'm in
- 9:47the tweet because they don't have
- 9:48anything but with in between there so
- 9:50that's a that's a recursive like I don't
- 9:54have to because obviously the first name
- 9:56approaching that's a completely fine way
- 9:58to start with it it's just like when you
- 9:59have made any change just check the
- 10:01consistency of every single tire like
- 10:03are there still adjacent possible
- 10:06modules that would satisfy like these
- 10:10kiss drinks that's perfectly fine way to
- 10:12start but then you can then you can
- 10:15build it in like a smarter way word like
- 10:16as soon as you remove something it
- 10:18checks
- 10:19was I had the last of my type that was
- 10:21removed and if I was then might let the
- 10:24slope next to me know that hey there's
- 10:26nothing matching this anymore
- 10:27and that goes okay that means I have to
- 10:29remove this one and they're like that
- 10:31propagates too so if we if we for
- 10:37example we go for
- 10:48so you see how I can paste this little
- 10:50so this all anchorperson so it's all
- 10:52implied from one of them and it just
- 10:54picks the first one so in this
- 11:01particular case the the because this is
- 11:04just a 2d picture so you can derive your
- 11:06adjacency constraints depending on you
- 11:10know what kind of tiles and modules
- 11:12you're working with in this case I'm
- 11:13just working with a picture picks a
- 11:15picture and it's not a very complex
- 11:17picture
- 11:18so I've derived that by just like you
- 11:20see if I click this is here some other
- 11:22things like up to so like if I click
- 11:25this one see this is like siding sky
- 11:27this is like top and bottom sky this is
- 11:32like sighing dirt top and bottom dirt
- 11:36and it derives those in this case just
- 11:40by sampling the texture on three points
- 11:42just getting what's the color here here
- 11:44here like along the top explicit color
- 11:46there there there getting the color just
- 11:49turn that into a hash and then you know
- 11:51everything that has the same color in
- 11:53those three spots will get the same hash
- 11:55and then you can index that too and then
- 11:57it's all very simple so so this the
- 12:00little numbers you see here it's
- 12:01actually better that color on that point
- 12:04in like hex values but that doesn't
- 12:06really matter
- 12:07I mean it's helpful if it's somewhat
- 12:08meetable to you is that you can compare
- 12:10oh I thought these pieces would fit
- 12:11together but then you can look all know
- 12:13the color is actually slightly different
- 12:15because they accidentally did something
- 12:16wrong of course you can round off those
- 12:18things before you put the diamond hashes
- 12:20to if you don't want to be too tedious
- 12:25yes yes so yeah
- 12:31the court and this is so this is an
- 12:33example of there's a bigger field of
- 12:35programming that I didn't know when I
- 12:36got started with this called
- 12:38constraints based programming and it's
- 12:42sort of the idea that instead of you're
- 12:45writing an algorithm by it you're
- 12:47starting with just declaring what are
- 12:49the constraints here like what things
- 12:51are allowed together with which things
- 12:53in this case of course is strictly
- 12:56adjacency constraints so it's just what
- 12:58things aren't allowed to what things and
- 13:00then like in all constraint based
- 13:02programming you just like asked how
- 13:04we're going to give you a solution that
- 13:05satisfies those constraints you have two
- 13:07constraints which like hard rules and
- 13:09then you can also have heuristics which
- 13:11I like ok but when there are multiple
- 13:13options right like here it doesn't know
- 13:15what to do because obviously like it can
- 13:16put anything anywhere but then you can
- 13:19have heuristics that help like oh you
- 13:21know high probabilities you can have
- 13:22this random picking with noise and
- 13:23things like that too but yeah so this is
- 13:26one example of constraint based
- 13:28programming which is a very useful way
- 13:32of writing code and migrating pools in
- 13:34in general so that's the simplified
- 13:37version I also made a little go there we
- 13:41go I made a little just schematic to
- 13:44show like an even simpler version this
- 13:46one doesn't move unfortunately it's just
- 13:47a picture but you can see how like here
- 13:50I just have two types of sites I have 0
- 13:53& 1 & 0 is grass and one is Road so I
- 13:58have two slots with a very very small
- 14:00system and each in each of these slots
- 14:02four modules are possible and here we
- 14:04can see how they rely on each other
- 14:06right so how like the this road piece
- 14:09this piece here and this piece here both
- 14:11rely on this little piece here right so
- 14:15if I would remove that piece then like
- 14:18this mine gets cut and there's nothing
- 14:21feeding into this anymore so then it
- 14:23tells the next one okay you now need to
- 14:25remove this one and this one and I'm
- 14:27like those two
- 14:29that it would collapse that so yeah big
- 14:32possibility space and then collapse down
- 14:34and resolving implications of your
- 14:37constraints and then I'll show you how
- 14:41this actually works in our game no
- 14:46that's something else there we go
- 14:50so this is five mark again we're making
- 14:52and I'll show you I'll go ahead and
- 14:55generate some new levels it's like a
- 14:59campaign map that now I have turned on
- 15:00to you so I can just like also generate
- 15:02whatever I want here so I'll pick a
- 15:04level and the generation is going to
- 15:08happen so here you can see he's just
- 15:10like the wireframes of all the modules
- 15:12that would be possible on all these in
- 15:16all these slots like it's much it's much
- 15:19slower now by the way because this
- 15:20visualizing it has its within so you see
- 15:26it's sort of building a possibility
- 15:27spaces first right because it needs to
- 15:28do that needs to propagate everything
- 15:30everywhere and then it needs to resolve
- 15:32initial initial constraints cuz the
- 15:36previous one we saw it didn't have any
- 15:37additional constraints anything can go
- 15:38anywhere but here like I need to have
- 15:40sky on the outside the level can all be
- 15:43inside dirt right and I also it's island
- 15:46so I need to have water at the bottom so
- 15:48that like initially implies the bunch of
- 15:51constraints you have a bunch of things
- 15:52being removed right here somewhere
- 15:55around there yeah now we've resolved the
- 15:57basics the basic initial constraint so
- 16:00you can already like start to see like
- 16:02the shadow of the shape of the island
- 16:06here you have the first thing actually
- 16:08being placed it's it's it's a house it's
- 16:11a hole for a house because the house is
- 16:13did I've added later because they're not
- 16:14part of the Train and you see how
- 16:17already like some options around the
- 16:19south side of the house started
- 16:20disappearing because obviously there's
- 16:22already
- 16:24well they did but a little bit further
- 16:26and he seems like having youth placing
- 16:29new things and resolving constraints so
- 16:32like here it started adding a niche and
- 16:34there we seem like the shadows like now
- 16:36there's a gap here because there's
- 16:37nothing like that would be possible to
- 16:38place today that would but wouldn't
- 16:42conflict with this edge here so you see
- 16:44these sort of this sort of ghost to
- 16:46represent yeah and they're now it's all
- 16:47generator so it started like acid gets
- 16:50going into its faster and faster and
- 16:52faster because most of the implications
- 16:53are already been resolved nobody never
- 16:59look oh I think that's a different yeah
- 17:01but this is like what the result yeah
- 17:12see seeds getting constructed so
- 17:14building spaces spending that's what in
- 17:18slows parts and I was getting really
- 17:21slow like placing all these cuz there's
- 17:23no need to be like them I think around
- 17:24like a hundred thousand possibilities
- 17:26just this light guy I don't there's a
- 17:28few hundred modules and then they place
- 17:31one on each tile on might rotate to the
- 17:34mirror to
- 17:53now it's starting to collect it it's a
- 17:55bigger level yeah and of course that's
- 17:57with a lot of procedural things the
- 17:59generation time increases exponentially
- 18:02with sizes are the bigger the bigger
- 18:04than that the slower it is though we
- 18:08always be solved that if I play on small
- 18:09islands so yeah it's starting to shrink
- 18:20it like you see some shadows disappear
- 18:22here that my Chronicle ologist by the
- 18:23initial initial implications
- 18:38holies yeah and now it starts like some
- 18:41of the initial ones and start placing
- 18:43placing tiles and this is also really
- 18:45like one thing that's interesting a big
- 18:48problem with procedural generation in
- 18:50general and with this technique in
- 18:52particular this like sense the technique
- 18:54the core of the tech doesn't know what
- 18:56we are generating but I need to generate
- 18:59playable levels right like where you can
- 19:01actually go all the places where you
- 19:02have to go and that actually took me a
- 19:04while to figure out how to do that in a
- 19:06good way obviously I can after i
- 19:07generated a level i can go through it
- 19:10and like validate mike has like can you
- 19:12go from the beach up to the house
- 19:14everywhere where you're supposed to that
- 19:16works but obviously you can end up
- 19:18generating a bunch of levels that you
- 19:20just sort of have to throw away oh look
- 19:23at that
- 19:26no no no it's a whole there's a cave
- 19:29inside but we won't be able to see it
- 19:31okay yes another level for us it hides
- 19:41them when they generate them because
- 19:42this is like I suppose happened sort of
- 19:44offline
- 19:48but yeah but so the way we did with
- 19:50navigability is you see these green
- 19:52lines here like the modules have a very
- 19:54simplified idea of how you can navigate
- 19:59from them so this is like a flat area so
- 20:01it knows that it can go to adjacent
- 20:03modules so when when I generate I this
- 20:08is like the heuristics I was talking
- 20:10about before so when I get to because
- 20:12sometimes it's just implied and you just
- 20:14need to place the module somewhere
- 20:15because nothing else is low but
- 20:16sometimes you you get to pick like
- 20:18especially when you start with an empty
- 20:20canvas you get to pick which modules
- 20:21you're supposed to place where and that
- 20:24then I drive this with like a
- 20:25navigability heuristic so I start with
- 20:27one place that I know it's navigable I
- 20:29start with a house and then it tries it
- 20:33tries to pick tiles that expand that
- 20:36navigable island so you see how it keeps
- 20:40like building with these sort of these
- 20:42green lines outwards
- 20:44there we go and here actually it starts
- 20:47here we can see it is complaining that
- 20:49these levels don't have enough beach so
- 20:52we've discarded them and tried again so
- 20:53we have to do that few times that's also
- 20:56an interesting question of like
- 20:56backtracking in generation in general
- 20:58like would you when you make an error
- 21:00when you run into a contradiction do you
- 21:02go back and then try something else or
- 21:04do you I tried that a bunch of times but
- 21:06the thing is that you don't know how far
- 21:07back you have to go you don't know if
- 21:09you like maybe the error was implied in
- 21:12the first pylons you placed so in my
- 21:15case I solved it by just I say the
- 21:17initial state when it's resolved all the
- 21:19initial contradictions and then we just
- 21:21if something fails if it runs into a
- 21:23contradiction it just reload reload
- 21:25stack and collapse again this way faster
- 21:27than symmetric
- 21:46they should built this visualization
- 21:48like yesterday so quite happy with how I
- 21:52can get sort of shadowy view of so you
- 21:55sort of see how the way they imply
- 22:00possibilities and you see you can tell
- 22:04also that of course like keep hearing
- 22:06the corners there are way fewer
- 22:08possibilities even in the beginning
- 22:10because there can like there can be a
- 22:11corner corner beach there can be a
- 22:13little rough in the water
- 22:14and it can be water but that's basically
- 22:16it and that's all like that gets implied
- 22:20by by just by the initial contradictions
- 22:25this is a taller one so I guess yeah
- 22:27here we can see the these sort of the
- 22:30navigable network being a little bit
- 22:32more interesting we should be able to
- 22:33once you start building that work yeah
- 22:36you see like here it's sort of a little
- 22:38stair going on here so there's not a
- 22:40bubble network goes up like this and
- 22:42then it goes down right so it keeps and
- 22:44this reading books like encapsulate the
- 22:48navigable network so the way the way I
- 22:51do this time - both heuristic is like if
- 22:53the new tile would increase the size of
- 22:56a navigable box then that gets high
- 22:58score and I think that one
- 23:05oh yeah and we can have a look at all
- 23:11the pieces I'm using for this so this is
- 23:13like all the tires I'm using unshaded
- 23:18some wireframe on them so it actually
- 23:21spent like now there's a ton of them I
- 23:22concur just about like 300 so that's a
- 23:24lot but it just started out with like
- 23:27maybe these ones something like that
- 23:29because this algorithm as I said says it
- 23:31solves the constraints it because with a
- 23:34lot of companies kind of combinatorial
- 23:36things you need to create a lot of
- 23:37different permutations which is the pain
- 23:40but since this one is driven from the
- 23:42competence instead of the content being
- 23:45placed to sort of satisfy the the sort
- 23:50of higher level abstraction so for
- 23:51example voxels or something like that
- 23:53you can get it going with very very few
- 23:55things it will just figure out how to
- 23:56build structures from that so I started
- 23:59with something like these ones just to
- 24:01get a sense of right if they're really
- 24:02important things like what's the like
- 24:04what do my hedges look like what do my
- 24:06slopes look like what's the corner like
- 24:08how much detail do I want right because
- 24:10it's a really important part but then
- 24:13you know it's really easy to just keep
- 24:15adding new content and you can choose
- 24:17yourself how many like how much
- 24:19permutations you want to add like these
- 24:21are all of my sort of little stair cases
- 24:23which like obviously you need a ton of
- 24:25those for all kinds of situations but
- 24:28there are some other things that became
- 24:29sort of occur on just sort of one-off
- 24:31locations like this little rock here it
- 24:33just goes in the water it just goes into
- 24:36work I also added a little tool so you
- 24:39can check adjacency so here is if I just
- 24:43highlight the sites of things other
- 24:45things get highlighted that fit with
- 24:47that thing so this will type it here of
- 24:50course fits with all the other little
- 24:52side bits that's really useful when you
- 24:55alter you Compton's and you need to
- 24:56check the hilts and you think this
- 24:57actually fit with the lesson thanks I be
- 25:00able do they actually function burkas in
- 25:02maya and not like it's also a little bit
- 25:04in the fours
- 25:06yeah yeah this is one maybe yeah that's
- 25:09uh that's cuz I really detest like
- 25:11keeping a good structure in my mind
- 25:14since things like that so what I do is
- 25:17like on when I import the FBX to unity
- 25:20I just merge it all into one and then I
- 25:22go through and cut it up into little
- 25:23pieces and analyze the edges of it and
- 25:26and it can also make bigger pieces this
- 25:29is quite an important aspect that you
- 25:33can make right so this piece here
- 25:35stretches across two tiles which is
- 25:37that's a super useful thing to use just
- 25:40to sort of break up the obvious tiling
- 25:42of course so I still like I don't hide
- 25:44the time and you can see in the game
- 25:45it's clearly a Titleist game but you can
- 25:48still like just like sweep around
- 25:49corners a little bit more like those
- 25:51things are really nice so that you keep
- 25:53them on their toes they don't know
- 25:54exactly what's going on it's really good
- 25:57for those things and it's also written
- 25:58of course crucial for making visible
- 26:01staircases because they have to make it
- 26:04have to go from one level to another one
- 26:06so almost beginning back here you can
- 26:09see also these little green lines here
- 26:11is the sort of pieces of navigable
- 26:14network that it's using for that with
- 26:18the navigability heuristic that I used
- 26:21to explain it and the weight the weight
- 26:23just two minutes when I import them to
- 26:26cut it up into pieces the weight figure
- 26:27self which one are supposed to go into
- 26:29small pieces and which ones are supposed
- 26:31to go into big pieces and actually check
- 26:33the plate does this have a triangle that
- 26:35spans over to another tile and then it
- 26:39just merges those into what so it's all
- 26:42in how I model them so I need to place
- 26:44all the mic it doesn't actually cut the
- 26:47mesh it just takes all the triangles and
- 26:49then puts them into different titles and
- 26:51then like figures out if some of them go
- 26:52together and then they get merged which
- 26:56is super I have some more examples so
- 26:57just like those sort of grounding right
- 27:00like this a little bit here just past
- 27:03like just rounds all finacial Oh
- 27:05which makes this a bit nicer and this
- 27:08little playing here actually move the
- 27:11together Middleburg picks it's just
- 27:12moved to the side a little bit good this
- 27:14is your trick the thinking - thinking
- 27:15that this is just one big plane instead
- 27:17of kiting up in the little place but
- 27:19yeah and so one thing artistically I'm
- 27:22quite happy with you if you look at a
- 27:24corner it's slightly asymmetrical it's
- 27:28like this side here is a little bit
- 27:30smaller than this side here that's a
- 27:33very easy way to get a tiny bit of
- 27:36variation so like on top of like a
- 27:38pillar that if you take four different
- 27:39corners of some of them are mirror then
- 27:41like there are a bunch of different ways
- 27:43that those could look like and also it
- 27:46means I can add these little nice pieces
- 27:49which are sort of adapters but where I
- 27:51can have like a bit of a crack which is
- 27:53like it is a detail but it's also sort
- 27:55of meaningful in the way that it it
- 27:57flips the big mirrors orientation right
- 28:00so it's thick here to thin there it's in
- 28:02there but thank you and that's I think
- 28:04that's a nice way of thinking about
- 28:06detail in general like making detail
- 28:08this that's meaningful and that DS
- 28:10changing thing have a look at a look at
- 28:16generated level here
- 28:19yeah I'm dimension also something about
- 28:21the history speed of oh I mean there's a
- 28:26lot of technical things going on here
- 28:28but there's also a bunch of the stage
- 28:29things going on here
- 28:30and you can tell that the like the
- 28:34interesting thing is not what happens
- 28:38with like on surfaces the interesting
- 28:41thing is what happens where surfaces
- 28:43meet each other right like if I would
- 28:45just kind of like a super obvious tiling
- 28:48grass texture here that wouldn't like
- 28:50that doesn't really provide information
- 28:51right we sort of yeah we get it's grass
- 28:53but like so the stories instead
- 28:56additional stories are being told where
- 28:58surfaces meet each other right so the
- 29:01first weeding obviously if it's like the
- 29:03grass patches like where are those
- 29:04levels and then we have the little edge
- 29:06you got here between the grass and the
- 29:09and the clips and then you have another
- 29:12little edge word about the
- 29:13convex where you put these little brass
- 29:16pins which also might break up the
- 29:18timing know that those are procedurally
- 29:19in place of course the grass patches and
- 29:24then you get these little sort of yeah
- 29:27here you can see one of these still we
- 29:28were adapters being used just like so
- 29:31you have a yellow pine like normal
- 29:32normally the corners just align but then
- 29:34sometimes it shifts and there's a little
- 29:36bit of a crack in it so that's a good
- 29:38gear to like soft line but a little bump
- 29:41in it listen I think that's a nice
- 29:43approach to detail in general you don't
- 29:45eat detail everywhere you need detail to
- 29:47smell to tell small stories and usually
- 29:50making transitions between things that's
- 29:52what details should do typically yeah in
- 30:00fact sort of most of the anti of course
- 30:04keep spying in too because if we've put
- 30:07some units on here it's also the idea of
- 30:13right where the environment is it is a
- 30:15cannabis for the gameplay so the
- 30:17environment like the emergency be
- 30:19beautiful but it shouldn't have that
- 30:21many details because the details should
- 30:24come from the game terrain and it's the
- 30:27same it's also but these units because
- 30:28in this particular game of course you
- 30:30control small armies instead of
- 30:32individual units so each of the little
- 30:35each of an individual units is quite
- 30:38simple in its aesthetics to sort of and
- 30:41the focus is being put on how they move
- 30:43as a unit in stacks
- 30:47and of course the the items are also
- 30:51quite literally a canvas for the game
- 30:53played in that you do if they do get
- 30:54painted might have a little blood yep
- 31:01that sort of it's about yeah it the game
- 31:08isn't completely frame rates independent
- 31:10unfortunately because I didn't know that
- 31:11much when I built it certainly so when
- 31:14it's a bit of a lower frame rate yeah so
- 31:20that was it for my presentations
- 31:26[Applause]
- 31:33[Applause]
- 31:41like once they showed through the
- 31:44beginning I've tried triangles on the
- 31:45sphere and that's what I've tried
- 31:51something that I've been very that I've
- 31:54really been wanting to try is doing sort
- 31:58of sort of cubish so like X cubes and
- 32:03the modules are cubes but you distort
- 32:05them to fit together so sometimes you
- 32:07have a 5 quart like 5 cubes meeting more
- 32:10corners sometimes you have three keeps
- 32:11meeting in one corner I think you could
- 32:12and then you like just distort the tiles
- 32:14to fit them in there I think you could
- 32:16make really beautiful sort of medieval
- 32:18seats and things like that with my
- 32:19curving roads like that with the system
- 32:22like that just I I find when you build
- 32:26different tile structures sort of work
- 32:29for different things right the triangles
- 32:31so that's hexa bombs right because
- 32:33triangles and hexagons are related are
- 32:34really good when you make like for like
- 32:38the planet I showed first for example
- 32:40when you have bigger terrain shapes and
- 32:42then like face they're decent or two but
- 32:45four houses in smaller shape so it's
- 32:47quite hard to do with triangles it's
- 32:48much easier to do with with cuse because
- 32:51that's sort of good structure to shape
- 32:52yeah but yeah you can do it with
- 32:54whatever rigid one you don't even have
- 32:56to do with a grave you can do it with my
- 32:58completely arbitrary graph and you can
- 33:02mix it right you can use both triangular
- 33:03tiles on just like tiles some cute eyes
- 33:06you've two dimensional of course
- 33:13the example you showed that you choose
- 33:21yes how did the game choose which
- 33:24direction to go yep so that's that's
- 33:28approaching general is called the mixed
- 33:29initiative approach we're like you asked
- 33:32user of some initiative and then the
- 33:33algorithm has some initiative
- 33:34the game isint makes finished it at all
- 33:36like that's all just being picked
- 33:39randomly both because of course as you
- 33:41saw in the example there were like
- 33:43sixteen options in the game there's like
- 33:45300 options so like how would you
- 33:47present that I'm sure there is a good
- 33:49way to make the proper intro having I'm
- 33:51sure there's a really good proper
- 33:53interactive tool in this but I haven't
- 33:54built it so no the game the game just
- 33:59like picks them according to different
- 34:01rules
- 34:02it starts with houses for example
- 34:04because the game the game relies on
- 34:06there being houses and also I have a
- 34:10bunch of things to drive it so I have
- 34:11like fiends and some boxes around these
- 34:15which like have names and they have
- 34:17different rules so some things for
- 34:19example have rules that they're not
- 34:21allowed to be next to themselves like
- 34:23copies of themselves quite an important
- 34:25rule is for modules I don't want to be
- 34:28next to a mirror of themselves because
- 34:30that usually looks quite bad when you
- 34:31have generic pieces next to each other
- 34:33and how comes quite often because of
- 34:34course a piece fits perfectly next to
- 34:36the mirror of itself but I also use
- 34:39these four themes right so I have some
- 34:41like have some cave parts here this is
- 34:44like the case which I only use for some
- 34:47levels and then I have some like so my
- 34:51ruining structures kind of
- 34:59there we go yeah it's this is not my
- 35:05normal work station but yeah I have some
- 35:09like Ruben type shapes too that I use
- 35:11for different than I then I have some
- 35:12with like some big boulders and rocks
- 35:14and things like that this is actually
- 35:15this level here's is a rock theme right
- 35:18so you see I have this little nice
- 35:20little overhang here it's just like a
- 35:24bridge so I had some themes like that
- 35:29just to keep you I mean that's also
- 35:30always a challenge with procedural
- 35:31generation that think things can look to
- 35:33see me and this is one of the ways I
- 35:36approach that I mean obviously also
- 35:37switching colors is searching foliage
- 35:39things like that also yeah
- 35:54no I'm sure that's good
- 35:58I'm sure there's a lot to be gained
- 35:59there it's everything so little pull
- 36:01here though so modulated myself this I
- 36:04mean like it's just a few triangles yeah
- 36:14actually you said like for one of the
- 36:16island the algorithm has to restart
- 36:18twice because the you find enough yeah
- 36:21but when do generic can can you like do
- 36:24you do you shift the weights of the
- 36:26different times you're gonna put or are
- 36:28you are doing this the same just they're
- 36:30just you're straying from the other I
- 36:33mean there's both forming the observers
- 36:35the adjacency constraints that have hard
- 36:38constraint right always but then there's
- 36:40also probabilities and I can put boxes
- 36:42around things and see like hey the tiles
- 36:44within this area nation and I was like
- 36:46the higher or lower probability so yeah
- 36:50but the beach thing that happens
- 36:53afterwards when it's like it
- 36:55this algorithm is done and then it's
- 36:57constructing the navmesh and then it's
- 36:59checking like is there enough beaches
- 37:01where ships good land if there's not
- 37:03enough than described gave in this time
- 37:05but it kind of fail very earlier in the
- 37:06back to and it can fail like there are a
- 37:09few validation sets after generation and
- 37:11there are a few during so if it closes
- 37:14the navigable island so the the network
- 37:17its building if that's if that gets
- 37:20closed before it reaches the bottom for
- 37:22example then you know there's no way
- 37:24this
- 37:25and then I can discard it before I do
- 37:32you
About this transcript
This page contains the full transcript of EPC2018 | Wave Function Collapse in Bad North | Oskar Stalberg by BUas Games, generated from the public captions YouTube serves with the video. The transcript has 6,335 words across 880 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.
What you can do with it
Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to translate the transcript into 100+ languages.
Free YouTube transcript tool
YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, translation to 100+ languages, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.