YouTube2Text

EPC2018 | Wave Function Collapse in Bad North | Oskar Stalberg — Transcript

by BUas Games · 6,335 words · 880 segments · language en · Watch on YouTube

Full transcript

  1. 0:00all right hello everyone nice to be here
  2. 0:03yeah my name is Oscar solver I make
  3. 0:07procedural planets and pretty things I
  4. 0:10come from like an artist's background I
  5. 0:13studied at the game assembly mama which
  6. 0:15is a single place similar to this one I
  7. 0:17studied art there but then I should have
  8. 0:19ventured more and more into technical
  9. 0:21science and making more procedural
  10. 0:23things I used to work at massive I
  11. 0:26worked on the division I made that cool
  12. 0:29like holographic map maybe you've seen
  13. 0:30it I was good fun and side projects I've
  14. 0:36got a bunch of other like procedural
  15. 0:38interactive demos just to explore things
  16. 0:41myself but and I mean they habit of
  17. 0:42putting them out this interactive demos
  18. 0:44online too so both that little house
  19. 0:46there called brick block and not planet
  20. 0:49you can find on my web page and you can
  21. 0:50open them in the browser and it's just
  22. 0:52like tools to manipulate a house and
  23. 0:54manipulate a planet that's a very good
  24. 0:59way to do projects as student too by the
  25. 1:01way
  26. 1:01just like make things that you can
  27. 1:03publish that you don't just publish
  28. 1:04screenshots or videos that publish like
  29. 1:06interactive things because there's so
  30. 1:08much more likely to be shared and it's
  31. 1:10so much more impressive so do that
  32. 1:13yeah I said I worked with NASA for a few
  33. 1:16years I worked at us to model and say
  34. 1:19for a bit too but now I'm indeed making
  35. 1:23my own games well trying to make my own
  36. 1:26game one game called bad north looks
  37. 1:29like this right now but today I am going
  38. 1:33to talk to you about a procedural
  39. 1:38algorithm that we are using to generate
  40. 1:40these levels it's called weight function
  41. 1:42collapse I didn't name it wave function
  42. 1:44collapse so you know don't ask me about
  43. 1:47the connection to quantum mechanics but
  44. 1:49this is like a gift I came across this
  45. 1:51guy Maxim goomy is the guy who invented
  46. 1:54the concept or I mean he based it off of
  47. 1:57something else too but I think he did
  48. 1:59the bulk of it you mentioned so as you
  49. 2:02can see it's well the way he did it is a
  50. 2:05way to use like a small example bitmap
  51. 2:08and they create a larger bitmap that's
  52. 2:11consistent with that so what it really
  53. 2:13does it's like deriving adjacency
  54. 2:16constraints like which pixels are
  55. 2:17allowed to be next to which pixels from
  56. 2:20the example and then it can create
  57. 2:21something bigger out of that so
  58. 2:23obviously my first idea when I saw this
  59. 2:25one was like I bet you can use this for
  60. 2:273d I bet you can use this for other
  61. 2:28things than just textures to build
  62. 2:33little larger works because it tied him
  63. 2:35very neatly to like some problems I had
  64. 2:37looked at before
  65. 2:38like how to make nicely very sort of
  66. 2:41Compton's agnostic procedural algorithms
  67. 2:47so yeah this is the first little thing
  68. 2:53all right yeah there we go yeah he's had
  69. 2:58to download these is like half of these
  70. 3:00are just my old tweets that I downloaded
  71. 3:02again into the you should follow me on
  72. 3:05Twitter to a post about these kind of
  73. 3:06things but this is like my first
  74. 3:08implementation I hope the wave function
  75. 3:10cooks that I built and as you see it
  76. 3:12what it does it it's applied on like a
  77. 3:15triangular tiles model on spheres one in
  78. 3:19the middle there is like villages roads
  79. 3:24quite similar to the planet I did before
  80. 3:26but it can also it can do some things
  81. 3:28that that planet couldn't do like some
  82. 3:31ways of making roads and because that
  83. 3:32pipe didn't have worlds for examples
  84. 3:34they like are a bit different
  85. 3:35otherwise but you can also make you do
  86. 3:37like weird things you see this guy's
  87. 3:39just like building sort of also just to
  88. 3:43yeah I don't like UT I don't want the
  89. 3:45triangular tiles for that would look
  90. 3:46like this video doesn't seem too long
  91. 3:49but that's just another night concert so
  92. 3:51the core idea is that you just you just
  93. 3:53give it a title set and then it figures
  94. 3:56out how to assemble that tile set into
  95. 3:59one coherent model or environments
  96. 4:02people like whatever constraints are
  97. 4:04implied by how your tile set fits
  98. 4:07together it will solve for that so if
  99. 4:10you give it like if you if you if you
  100. 4:14haven't build a ton of transitions it
  101. 4:16will just figure out a way to build the
  102. 4:19environment with those transitions that
  103. 4:21you have did you have that build so this
  104. 4:24is another early example of what I did
  105. 4:26there so you see it's like building a
  106. 4:27little sort of safe walk something like
  107. 4:28that and these like to the left third
  108. 4:31that's actually all the inputs modules
  109. 4:33been used so it's not today it's quite
  110. 4:35quick to get started with it and then
  111. 4:37you figures out how to put it together
  112. 4:39into different things and this I think
  113. 4:45this is the album is algorithm is my
  114. 4:47contents agnostic fundamentally like it
  115. 4:49doesn't know that it's building a house
  116. 4:50it just knows that it needs to fit
  117. 4:52things together it makes it like a Civ
  118. 4:55artist you can build all these nice the
  119. 4:57whole sort of transitions between plates
  120. 4:59and you can build like extra little
  121. 5:01things use things like you can build a
  122. 5:03chimney and you can build like I have
  123. 5:06some larger peach some sort of extra
  124. 5:08features of my been going up here these
  125. 5:12little sort of divider here so yeah you
  126. 5:15can build things like that and then it
  127. 5:17will like three larger structures form
  128. 5:18it so now I'm going and this is another
  129. 5:21thing I tried to build this is actually
  130. 5:23invisible became I had worth a long time
  131. 5:25ago it looks like this and you played a
  132. 5:26little cat jumped around but then but
  133. 5:29that all changed it turned up then this
  134. 5:31is an important lesson it was too
  135. 5:32colorful it's very hard to put gameplay
  136. 5:35on top of an environment that's very
  137. 5:36colorful because then the gameplay is
  138. 5:38even more colorful
  139. 5:39unlike the UI
  140. 5:41the attention but it's also just an
  141. 5:44example of the kind of variation you can
  142. 5:45get from from the algorithm so now we're
  143. 5:50going to get into sort of the specifics
  144. 5:52of the algorithm how it actually works
  145. 5:55and as any of you looked at this other
  146. 5:58working before few people have that's
  147. 6:02good so my hope is here that actually
  148. 6:04has any of you built one yourself for
  149. 6:06trying to a few people that's really
  150. 6:10cool so my hope is that actually like if
  151. 6:11you've been interested in it you should
  152. 6:14from this presentation be able to get
  153. 6:16going and start sort of understanding
  154. 6:19the core ok so this is a very simplified
  155. 6:21version of it that's made specifically
  156. 6:24for presentations so you see here
  157. 6:27there's like the input modules and here
  158. 6:30is like a big possibility space and call
  159. 6:32cuz there's a bit and we do it too when
  160. 6:33you talk about tiles like it's a title
  161. 6:35where things go or is a tile what you
  162. 6:38place there so I split up the
  163. 6:39terminology into modules and slots so
  164. 6:42like come on each slot picks a module
  165. 6:44that's the terminology so right now you
  166. 6:47have everything being possible every
  167. 6:50single module here being possible inside
  168. 6:52each slot and I can just quick solve
  169. 6:55what so you see it like constricts
  170. 6:59different environments there our
  171. 7:02therapist is like how the particles
  172. 7:03input modules and this like this
  173. 7:05particular set of module because the
  174. 7:07algorithm can fail in some cases but
  175. 7:09with this input this input module it
  176. 7:12can't actually sell because it's too
  177. 7:13simple there are no what we're
  178. 7:14dependence is built into it and the way
  179. 7:18it works
  180. 7:18let's start by like these selecting so
  181. 7:23now I will only feed it to modules only
  182. 7:26too much was possible full sky or full
  183. 7:28dark so obviously since they don't have
  184. 7:30any transition between those modules I
  185. 7:32don't have any taught us that I'd like
  186. 7:33both sky on both dirt as soon as I
  187. 7:35select one of them everything turns into
  188. 7:38sky for example or everything turns into
  189. 7:41dirt because there's nothing like
  190. 7:43there's nothing to connect
  191. 7:44but if I had like this little connector
  192. 7:47here right so it's dirt at the bottom
  193. 7:49this kind of top if I slip sky here yeah
  194. 7:52everything above it I'm inviting that it
  195. 7:54has to be sky
  196. 7:55if I select dirt here yeah everything
  197. 7:57along with that and below that has to be
  198. 7:59dirt but here from still a bit ambiguous
  199. 8:00but as soon as I place the like the top
  200. 8:05line part there then like the entire
  201. 8:07class is done so the way and of course
  202. 8:15yeah you can has to see there like here
  203. 8:17it it errors because it can't solve it
  204. 8:18because it doesn't have any modules
  205. 8:19whatsoever I just give it like a coroner
  206. 8:22module it can't solve it either because
  207. 8:23there's no way to build a Korean system
  208. 8:25with just a quarter module if I gave it
  209. 8:27corners I'm sky then yeah it kind of go
  210. 8:29the corner of course guy he's there but
  211. 8:31that's it so the way it sort of cuz I
  212. 8:37feel like it you can see the solving
  213. 8:39happening in a little tiny slider here
  214. 8:42and this is also available their own
  215. 8:44lines you can you can open this as I
  216. 8:50click a peak so the core idea is that
  217. 8:52yeah you have this huge possibility
  218. 8:54space where everything is possible
  219. 8:55everywhere and then as soon as you place
  220. 8:57something what you're doing is not
  221. 8:58really placing something of what you're
  222. 9:00doing is you're removing all other
  223. 9:02possibilities from that tile until
  224. 9:05there's only one remaining and as those
  225. 9:07are removing though they look like if
  226. 9:10you have one that has like sky downward
  227. 9:13pointing if then you remove that one and
  228. 9:16that was the last one that had sky
  229. 9:17downward pointing then in the slot below
  230. 9:21it it has to remove everything that
  231. 9:24relied on having sky downward so
  232. 9:26everything that has sky upward and then
  233. 9:28you know that might have further
  234. 9:29implications and has to remove some
  235. 9:31other things that rely on those things
  236. 9:32so since this is like I don't have any
  237. 9:35overhangs so as soon as I play something
  238. 9:38with dirt it knows that everything below
  239. 9:41has to be dirt right you see how they
  240. 9:42created this big dirt pillar here and I
  241. 9:44was gonna make a similar Twitter I'm in
  242. 9:47the tweet because they don't have
  243. 9:48anything but with in between there so
  244. 9:50that's a that's a recursive like I don't
  245. 9:54have to because obviously the first name
  246. 9:56approaching that's a completely fine way
  247. 9:58to start with it it's just like when you
  248. 9:59have made any change just check the
  249. 10:01consistency of every single tire like
  250. 10:03are there still adjacent possible
  251. 10:06modules that would satisfy like these
  252. 10:10kiss drinks that's perfectly fine way to
  253. 10:12start but then you can then you can
  254. 10:15build it in like a smarter way word like
  255. 10:16as soon as you remove something it
  256. 10:18checks
  257. 10:19was I had the last of my type that was
  258. 10:21removed and if I was then might let the
  259. 10:24slope next to me know that hey there's
  260. 10:26nothing matching this anymore
  261. 10:27and that goes okay that means I have to
  262. 10:29remove this one and they're like that
  263. 10:31propagates too so if we if we for
  264. 10:37example we go for
  265. 10:48so you see how I can paste this little
  266. 10:50so this all anchorperson so it's all
  267. 10:52implied from one of them and it just
  268. 10:54picks the first one so in this
  269. 11:01particular case the the because this is
  270. 11:04just a 2d picture so you can derive your
  271. 11:06adjacency constraints depending on you
  272. 11:10know what kind of tiles and modules
  273. 11:12you're working with in this case I'm
  274. 11:13just working with a picture picks a
  275. 11:15picture and it's not a very complex
  276. 11:17picture
  277. 11:18so I've derived that by just like you
  278. 11:20see if I click this is here some other
  279. 11:22things like up to so like if I click
  280. 11:25this one see this is like siding sky
  281. 11:27this is like top and bottom sky this is
  282. 11:32like sighing dirt top and bottom dirt
  283. 11:36and it derives those in this case just
  284. 11:40by sampling the texture on three points
  285. 11:42just getting what's the color here here
  286. 11:44here like along the top explicit color
  287. 11:46there there there getting the color just
  288. 11:49turn that into a hash and then you know
  289. 11:51everything that has the same color in
  290. 11:53those three spots will get the same hash
  291. 11:55and then you can index that too and then
  292. 11:57it's all very simple so so this the
  293. 12:00little numbers you see here it's
  294. 12:01actually better that color on that point
  295. 12:04in like hex values but that doesn't
  296. 12:06really matter
  297. 12:07I mean it's helpful if it's somewhat
  298. 12:08meetable to you is that you can compare
  299. 12:10oh I thought these pieces would fit
  300. 12:11together but then you can look all know
  301. 12:13the color is actually slightly different
  302. 12:15because they accidentally did something
  303. 12:16wrong of course you can round off those
  304. 12:18things before you put the diamond hashes
  305. 12:20to if you don't want to be too tedious
  306. 12:25yes yes so yeah
  307. 12:31the court and this is so this is an
  308. 12:33example of there's a bigger field of
  309. 12:35programming that I didn't know when I
  310. 12:36got started with this called
  311. 12:38constraints based programming and it's
  312. 12:42sort of the idea that instead of you're
  313. 12:45writing an algorithm by it you're
  314. 12:47starting with just declaring what are
  315. 12:49the constraints here like what things
  316. 12:51are allowed together with which things
  317. 12:53in this case of course is strictly
  318. 12:56adjacency constraints so it's just what
  319. 12:58things aren't allowed to what things and
  320. 13:00then like in all constraint based
  321. 13:02programming you just like asked how
  322. 13:04we're going to give you a solution that
  323. 13:05satisfies those constraints you have two
  324. 13:07constraints which like hard rules and
  325. 13:09then you can also have heuristics which
  326. 13:11I like ok but when there are multiple
  327. 13:13options right like here it doesn't know
  328. 13:15what to do because obviously like it can
  329. 13:16put anything anywhere but then you can
  330. 13:19have heuristics that help like oh you
  331. 13:21know high probabilities you can have
  332. 13:22this random picking with noise and
  333. 13:23things like that too but yeah so this is
  334. 13:26one example of constraint based
  335. 13:28programming which is a very useful way
  336. 13:32of writing code and migrating pools in
  337. 13:34in general so that's the simplified
  338. 13:37version I also made a little go there we
  339. 13:41go I made a little just schematic to
  340. 13:44show like an even simpler version this
  341. 13:46one doesn't move unfortunately it's just
  342. 13:47a picture but you can see how like here
  343. 13:50I just have two types of sites I have 0
  344. 13:53& 1 & 0 is grass and one is Road so I
  345. 13:58have two slots with a very very small
  346. 14:00system and each in each of these slots
  347. 14:02four modules are possible and here we
  348. 14:04can see how they rely on each other
  349. 14:06right so how like the this road piece
  350. 14:09this piece here and this piece here both
  351. 14:11rely on this little piece here right so
  352. 14:15if I would remove that piece then like
  353. 14:18this mine gets cut and there's nothing
  354. 14:21feeding into this anymore so then it
  355. 14:23tells the next one okay you now need to
  356. 14:25remove this one and this one and I'm
  357. 14:27like those two
  358. 14:29that it would collapse that so yeah big
  359. 14:32possibility space and then collapse down
  360. 14:34and resolving implications of your
  361. 14:37constraints and then I'll show you how
  362. 14:41this actually works in our game no
  363. 14:46that's something else there we go
  364. 14:50so this is five mark again we're making
  365. 14:52and I'll show you I'll go ahead and
  366. 14:55generate some new levels it's like a
  367. 14:59campaign map that now I have turned on
  368. 15:00to you so I can just like also generate
  369. 15:02whatever I want here so I'll pick a
  370. 15:04level and the generation is going to
  371. 15:08happen so here you can see he's just
  372. 15:10like the wireframes of all the modules
  373. 15:12that would be possible on all these in
  374. 15:16all these slots like it's much it's much
  375. 15:19slower now by the way because this
  376. 15:20visualizing it has its within so you see
  377. 15:26it's sort of building a possibility
  378. 15:27spaces first right because it needs to
  379. 15:28do that needs to propagate everything
  380. 15:30everywhere and then it needs to resolve
  381. 15:32initial initial constraints cuz the
  382. 15:36previous one we saw it didn't have any
  383. 15:37additional constraints anything can go
  384. 15:38anywhere but here like I need to have
  385. 15:40sky on the outside the level can all be
  386. 15:43inside dirt right and I also it's island
  387. 15:46so I need to have water at the bottom so
  388. 15:48that like initially implies the bunch of
  389. 15:51constraints you have a bunch of things
  390. 15:52being removed right here somewhere
  391. 15:55around there yeah now we've resolved the
  392. 15:57basics the basic initial constraint so
  393. 16:00you can already like start to see like
  394. 16:02the shadow of the shape of the island
  395. 16:06here you have the first thing actually
  396. 16:08being placed it's it's it's a house it's
  397. 16:11a hole for a house because the house is
  398. 16:13did I've added later because they're not
  399. 16:14part of the Train and you see how
  400. 16:17already like some options around the
  401. 16:19south side of the house started
  402. 16:20disappearing because obviously there's
  403. 16:22already
  404. 16:24well they did but a little bit further
  405. 16:26and he seems like having youth placing
  406. 16:29new things and resolving constraints so
  407. 16:32like here it started adding a niche and
  408. 16:34there we seem like the shadows like now
  409. 16:36there's a gap here because there's
  410. 16:37nothing like that would be possible to
  411. 16:38place today that would but wouldn't
  412. 16:42conflict with this edge here so you see
  413. 16:44these sort of this sort of ghost to
  414. 16:46represent yeah and they're now it's all
  415. 16:47generator so it started like acid gets
  416. 16:50going into its faster and faster and
  417. 16:52faster because most of the implications
  418. 16:53are already been resolved nobody never
  419. 16:59look oh I think that's a different yeah
  420. 17:01but this is like what the result yeah
  421. 17:12see seeds getting constructed so
  422. 17:14building spaces spending that's what in
  423. 17:18slows parts and I was getting really
  424. 17:21slow like placing all these cuz there's
  425. 17:23no need to be like them I think around
  426. 17:24like a hundred thousand possibilities
  427. 17:26just this light guy I don't there's a
  428. 17:28few hundred modules and then they place
  429. 17:31one on each tile on might rotate to the
  430. 17:34mirror to
  431. 17:53now it's starting to collect it it's a
  432. 17:55bigger level yeah and of course that's
  433. 17:57with a lot of procedural things the
  434. 17:59generation time increases exponentially
  435. 18:02with sizes are the bigger the bigger
  436. 18:04than that the slower it is though we
  437. 18:08always be solved that if I play on small
  438. 18:09islands so yeah it's starting to shrink
  439. 18:20it like you see some shadows disappear
  440. 18:22here that my Chronicle ologist by the
  441. 18:23initial initial implications
  442. 18:38holies yeah and now it starts like some
  443. 18:41of the initial ones and start placing
  444. 18:43placing tiles and this is also really
  445. 18:45like one thing that's interesting a big
  446. 18:48problem with procedural generation in
  447. 18:50general and with this technique in
  448. 18:52particular this like sense the technique
  449. 18:54the core of the tech doesn't know what
  450. 18:56we are generating but I need to generate
  451. 18:59playable levels right like where you can
  452. 19:01actually go all the places where you
  453. 19:02have to go and that actually took me a
  454. 19:04while to figure out how to do that in a
  455. 19:06good way obviously I can after i
  456. 19:07generated a level i can go through it
  457. 19:10and like validate mike has like can you
  458. 19:12go from the beach up to the house
  459. 19:14everywhere where you're supposed to that
  460. 19:16works but obviously you can end up
  461. 19:18generating a bunch of levels that you
  462. 19:20just sort of have to throw away oh look
  463. 19:23at that
  464. 19:26no no no it's a whole there's a cave
  465. 19:29inside but we won't be able to see it
  466. 19:31okay yes another level for us it hides
  467. 19:41them when they generate them because
  468. 19:42this is like I suppose happened sort of
  469. 19:44offline
  470. 19:48but yeah but so the way we did with
  471. 19:50navigability is you see these green
  472. 19:52lines here like the modules have a very
  473. 19:54simplified idea of how you can navigate
  474. 19:59from them so this is like a flat area so
  475. 20:01it knows that it can go to adjacent
  476. 20:03modules so when when I generate I this
  477. 20:08is like the heuristics I was talking
  478. 20:10about before so when I get to because
  479. 20:12sometimes it's just implied and you just
  480. 20:14need to place the module somewhere
  481. 20:15because nothing else is low but
  482. 20:16sometimes you you get to pick like
  483. 20:18especially when you start with an empty
  484. 20:20canvas you get to pick which modules
  485. 20:21you're supposed to place where and that
  486. 20:24then I drive this with like a
  487. 20:25navigability heuristic so I start with
  488. 20:27one place that I know it's navigable I
  489. 20:29start with a house and then it tries it
  490. 20:33tries to pick tiles that expand that
  491. 20:36navigable island so you see how it keeps
  492. 20:40like building with these sort of these
  493. 20:42green lines outwards
  494. 20:44there we go and here actually it starts
  495. 20:47here we can see it is complaining that
  496. 20:49these levels don't have enough beach so
  497. 20:52we've discarded them and tried again so
  498. 20:53we have to do that few times that's also
  499. 20:56an interesting question of like
  500. 20:56backtracking in generation in general
  501. 20:58like would you when you make an error
  502. 21:00when you run into a contradiction do you
  503. 21:02go back and then try something else or
  504. 21:04do you I tried that a bunch of times but
  505. 21:06the thing is that you don't know how far
  506. 21:07back you have to go you don't know if
  507. 21:09you like maybe the error was implied in
  508. 21:12the first pylons you placed so in my
  509. 21:15case I solved it by just I say the
  510. 21:17initial state when it's resolved all the
  511. 21:19initial contradictions and then we just
  512. 21:21if something fails if it runs into a
  513. 21:23contradiction it just reload reload
  514. 21:25stack and collapse again this way faster
  515. 21:27than symmetric
  516. 21:46they should built this visualization
  517. 21:48like yesterday so quite happy with how I
  518. 21:52can get sort of shadowy view of so you
  519. 21:55sort of see how the way they imply
  520. 22:00possibilities and you see you can tell
  521. 22:04also that of course like keep hearing
  522. 22:06the corners there are way fewer
  523. 22:08possibilities even in the beginning
  524. 22:10because there can like there can be a
  525. 22:11corner corner beach there can be a
  526. 22:13little rough in the water
  527. 22:14and it can be water but that's basically
  528. 22:16it and that's all like that gets implied
  529. 22:20by by just by the initial contradictions
  530. 22:25this is a taller one so I guess yeah
  531. 22:27here we can see the these sort of the
  532. 22:30navigable network being a little bit
  533. 22:32more interesting we should be able to
  534. 22:33once you start building that work yeah
  535. 22:36you see like here it's sort of a little
  536. 22:38stair going on here so there's not a
  537. 22:40bubble network goes up like this and
  538. 22:42then it goes down right so it keeps and
  539. 22:44this reading books like encapsulate the
  540. 22:48navigable network so the way the way I
  541. 22:51do this time - both heuristic is like if
  542. 22:53the new tile would increase the size of
  543. 22:56a navigable box then that gets high
  544. 22:58score and I think that one
  545. 23:05oh yeah and we can have a look at all
  546. 23:11the pieces I'm using for this so this is
  547. 23:13like all the tires I'm using unshaded
  548. 23:18some wireframe on them so it actually
  549. 23:21spent like now there's a ton of them I
  550. 23:22concur just about like 300 so that's a
  551. 23:24lot but it just started out with like
  552. 23:27maybe these ones something like that
  553. 23:29because this algorithm as I said says it
  554. 23:31solves the constraints it because with a
  555. 23:34lot of companies kind of combinatorial
  556. 23:36things you need to create a lot of
  557. 23:37different permutations which is the pain
  558. 23:40but since this one is driven from the
  559. 23:42competence instead of the content being
  560. 23:45placed to sort of satisfy the the sort
  561. 23:50of higher level abstraction so for
  562. 23:51example voxels or something like that
  563. 23:53you can get it going with very very few
  564. 23:55things it will just figure out how to
  565. 23:56build structures from that so I started
  566. 23:59with something like these ones just to
  567. 24:01get a sense of right if they're really
  568. 24:02important things like what's the like
  569. 24:04what do my hedges look like what do my
  570. 24:06slopes look like what's the corner like
  571. 24:08how much detail do I want right because
  572. 24:10it's a really important part but then
  573. 24:13you know it's really easy to just keep
  574. 24:15adding new content and you can choose
  575. 24:17yourself how many like how much
  576. 24:19permutations you want to add like these
  577. 24:21are all of my sort of little stair cases
  578. 24:23which like obviously you need a ton of
  579. 24:25those for all kinds of situations but
  580. 24:28there are some other things that became
  581. 24:29sort of occur on just sort of one-off
  582. 24:31locations like this little rock here it
  583. 24:33just goes in the water it just goes into
  584. 24:36work I also added a little tool so you
  585. 24:39can check adjacency so here is if I just
  586. 24:43highlight the sites of things other
  587. 24:45things get highlighted that fit with
  588. 24:47that thing so this will type it here of
  589. 24:50course fits with all the other little
  590. 24:52side bits that's really useful when you
  591. 24:55alter you Compton's and you need to
  592. 24:56check the hilts and you think this
  593. 24:57actually fit with the lesson thanks I be
  594. 25:00able do they actually function burkas in
  595. 25:02maya and not like it's also a little bit
  596. 25:04in the fours
  597. 25:06yeah yeah this is one maybe yeah that's
  598. 25:09uh that's cuz I really detest like
  599. 25:11keeping a good structure in my mind
  600. 25:14since things like that so what I do is
  601. 25:17like on when I import the FBX to unity
  602. 25:20I just merge it all into one and then I
  603. 25:22go through and cut it up into little
  604. 25:23pieces and analyze the edges of it and
  605. 25:26and it can also make bigger pieces this
  606. 25:29is quite an important aspect that you
  607. 25:33can make right so this piece here
  608. 25:35stretches across two tiles which is
  609. 25:37that's a super useful thing to use just
  610. 25:40to sort of break up the obvious tiling
  611. 25:42of course so I still like I don't hide
  612. 25:44the time and you can see in the game
  613. 25:45it's clearly a Titleist game but you can
  614. 25:48still like just like sweep around
  615. 25:49corners a little bit more like those
  616. 25:51things are really nice so that you keep
  617. 25:53them on their toes they don't know
  618. 25:54exactly what's going on it's really good
  619. 25:57for those things and it's also written
  620. 25:58of course crucial for making visible
  621. 26:01staircases because they have to make it
  622. 26:04have to go from one level to another one
  623. 26:06so almost beginning back here you can
  624. 26:09see also these little green lines here
  625. 26:11is the sort of pieces of navigable
  626. 26:14network that it's using for that with
  627. 26:18the navigability heuristic that I used
  628. 26:21to explain it and the weight the weight
  629. 26:23just two minutes when I import them to
  630. 26:26cut it up into pieces the weight figure
  631. 26:27self which one are supposed to go into
  632. 26:29small pieces and which ones are supposed
  633. 26:31to go into big pieces and actually check
  634. 26:33the plate does this have a triangle that
  635. 26:35spans over to another tile and then it
  636. 26:39just merges those into what so it's all
  637. 26:42in how I model them so I need to place
  638. 26:44all the mic it doesn't actually cut the
  639. 26:47mesh it just takes all the triangles and
  640. 26:49then puts them into different titles and
  641. 26:51then like figures out if some of them go
  642. 26:52together and then they get merged which
  643. 26:56is super I have some more examples so
  644. 26:57just like those sort of grounding right
  645. 27:00like this a little bit here just past
  646. 27:03like just rounds all finacial Oh
  647. 27:05which makes this a bit nicer and this
  648. 27:08little playing here actually move the
  649. 27:11together Middleburg picks it's just
  650. 27:12moved to the side a little bit good this
  651. 27:14is your trick the thinking - thinking
  652. 27:15that this is just one big plane instead
  653. 27:17of kiting up in the little place but
  654. 27:19yeah and so one thing artistically I'm
  655. 27:22quite happy with you if you look at a
  656. 27:24corner it's slightly asymmetrical it's
  657. 27:28like this side here is a little bit
  658. 27:30smaller than this side here that's a
  659. 27:33very easy way to get a tiny bit of
  660. 27:36variation so like on top of like a
  661. 27:38pillar that if you take four different
  662. 27:39corners of some of them are mirror then
  663. 27:41like there are a bunch of different ways
  664. 27:43that those could look like and also it
  665. 27:46means I can add these little nice pieces
  666. 27:49which are sort of adapters but where I
  667. 27:51can have like a bit of a crack which is
  668. 27:53like it is a detail but it's also sort
  669. 27:55of meaningful in the way that it it
  670. 27:57flips the big mirrors orientation right
  671. 28:00so it's thick here to thin there it's in
  672. 28:02there but thank you and that's I think
  673. 28:04that's a nice way of thinking about
  674. 28:06detail in general like making detail
  675. 28:08this that's meaningful and that DS
  676. 28:10changing thing have a look at a look at
  677. 28:16generated level here
  678. 28:19yeah I'm dimension also something about
  679. 28:21the history speed of oh I mean there's a
  680. 28:26lot of technical things going on here
  681. 28:28but there's also a bunch of the stage
  682. 28:29things going on here
  683. 28:30and you can tell that the like the
  684. 28:34interesting thing is not what happens
  685. 28:38with like on surfaces the interesting
  686. 28:41thing is what happens where surfaces
  687. 28:43meet each other right like if I would
  688. 28:45just kind of like a super obvious tiling
  689. 28:48grass texture here that wouldn't like
  690. 28:50that doesn't really provide information
  691. 28:51right we sort of yeah we get it's grass
  692. 28:53but like so the stories instead
  693. 28:56additional stories are being told where
  694. 28:58surfaces meet each other right so the
  695. 29:01first weeding obviously if it's like the
  696. 29:03grass patches like where are those
  697. 29:04levels and then we have the little edge
  698. 29:06you got here between the grass and the
  699. 29:09and the clips and then you have another
  700. 29:12little edge word about the
  701. 29:13convex where you put these little brass
  702. 29:16pins which also might break up the
  703. 29:18timing know that those are procedurally
  704. 29:19in place of course the grass patches and
  705. 29:24then you get these little sort of yeah
  706. 29:27here you can see one of these still we
  707. 29:28were adapters being used just like so
  708. 29:31you have a yellow pine like normal
  709. 29:32normally the corners just align but then
  710. 29:34sometimes it shifts and there's a little
  711. 29:36bit of a crack in it so that's a good
  712. 29:38gear to like soft line but a little bump
  713. 29:41in it listen I think that's a nice
  714. 29:43approach to detail in general you don't
  715. 29:45eat detail everywhere you need detail to
  716. 29:47smell to tell small stories and usually
  717. 29:50making transitions between things that's
  718. 29:52what details should do typically yeah in
  719. 30:00fact sort of most of the anti of course
  720. 30:04keep spying in too because if we've put
  721. 30:07some units on here it's also the idea of
  722. 30:13right where the environment is it is a
  723. 30:15cannabis for the gameplay so the
  724. 30:17environment like the emergency be
  725. 30:19beautiful but it shouldn't have that
  726. 30:21many details because the details should
  727. 30:24come from the game terrain and it's the
  728. 30:27same it's also but these units because
  729. 30:28in this particular game of course you
  730. 30:30control small armies instead of
  731. 30:32individual units so each of the little
  732. 30:35each of an individual units is quite
  733. 30:38simple in its aesthetics to sort of and
  734. 30:41the focus is being put on how they move
  735. 30:43as a unit in stacks
  736. 30:47and of course the the items are also
  737. 30:51quite literally a canvas for the game
  738. 30:53played in that you do if they do get
  739. 30:54painted might have a little blood yep
  740. 31:01that sort of it's about yeah it the game
  741. 31:08isn't completely frame rates independent
  742. 31:10unfortunately because I didn't know that
  743. 31:11much when I built it certainly so when
  744. 31:14it's a bit of a lower frame rate yeah so
  745. 31:20that was it for my presentations
  746. 31:26[Applause]
  747. 31:33[Applause]
  748. 31:41like once they showed through the
  749. 31:44beginning I've tried triangles on the
  750. 31:45sphere and that's what I've tried
  751. 31:51something that I've been very that I've
  752. 31:54really been wanting to try is doing sort
  753. 31:58of sort of cubish so like X cubes and
  754. 32:03the modules are cubes but you distort
  755. 32:05them to fit together so sometimes you
  756. 32:07have a 5 quart like 5 cubes meeting more
  757. 32:10corners sometimes you have three keeps
  758. 32:11meeting in one corner I think you could
  759. 32:12and then you like just distort the tiles
  760. 32:14to fit them in there I think you could
  761. 32:16make really beautiful sort of medieval
  762. 32:18seats and things like that with my
  763. 32:19curving roads like that with the system
  764. 32:22like that just I I find when you build
  765. 32:26different tile structures sort of work
  766. 32:29for different things right the triangles
  767. 32:31so that's hexa bombs right because
  768. 32:33triangles and hexagons are related are
  769. 32:34really good when you make like for like
  770. 32:38the planet I showed first for example
  771. 32:40when you have bigger terrain shapes and
  772. 32:42then like face they're decent or two but
  773. 32:45four houses in smaller shape so it's
  774. 32:47quite hard to do with triangles it's
  775. 32:48much easier to do with with cuse because
  776. 32:51that's sort of good structure to shape
  777. 32:52yeah but yeah you can do it with
  778. 32:54whatever rigid one you don't even have
  779. 32:56to do with a grave you can do it with my
  780. 32:58completely arbitrary graph and you can
  781. 33:02mix it right you can use both triangular
  782. 33:03tiles on just like tiles some cute eyes
  783. 33:06you've two dimensional of course
  784. 33:13the example you showed that you choose
  785. 33:21yes how did the game choose which
  786. 33:24direction to go yep so that's that's
  787. 33:28approaching general is called the mixed
  788. 33:29initiative approach we're like you asked
  789. 33:32user of some initiative and then the
  790. 33:33algorithm has some initiative
  791. 33:34the game isint makes finished it at all
  792. 33:36like that's all just being picked
  793. 33:39randomly both because of course as you
  794. 33:41saw in the example there were like
  795. 33:43sixteen options in the game there's like
  796. 33:45300 options so like how would you
  797. 33:47present that I'm sure there is a good
  798. 33:49way to make the proper intro having I'm
  799. 33:51sure there's a really good proper
  800. 33:53interactive tool in this but I haven't
  801. 33:54built it so no the game the game just
  802. 33:59like picks them according to different
  803. 34:01rules
  804. 34:02it starts with houses for example
  805. 34:04because the game the game relies on
  806. 34:06there being houses and also I have a
  807. 34:10bunch of things to drive it so I have
  808. 34:11like fiends and some boxes around these
  809. 34:15which like have names and they have
  810. 34:17different rules so some things for
  811. 34:19example have rules that they're not
  812. 34:21allowed to be next to themselves like
  813. 34:23copies of themselves quite an important
  814. 34:25rule is for modules I don't want to be
  815. 34:28next to a mirror of themselves because
  816. 34:30that usually looks quite bad when you
  817. 34:31have generic pieces next to each other
  818. 34:33and how comes quite often because of
  819. 34:34course a piece fits perfectly next to
  820. 34:36the mirror of itself but I also use
  821. 34:39these four themes right so I have some
  822. 34:41like have some cave parts here this is
  823. 34:44like the case which I only use for some
  824. 34:47levels and then I have some like so my
  825. 34:51ruining structures kind of
  826. 34:59there we go yeah it's this is not my
  827. 35:05normal work station but yeah I have some
  828. 35:09like Ruben type shapes too that I use
  829. 35:11for different than I then I have some
  830. 35:12with like some big boulders and rocks
  831. 35:14and things like that this is actually
  832. 35:15this level here's is a rock theme right
  833. 35:18so you see I have this little nice
  834. 35:20little overhang here it's just like a
  835. 35:24bridge so I had some themes like that
  836. 35:29just to keep you I mean that's also
  837. 35:30always a challenge with procedural
  838. 35:31generation that think things can look to
  839. 35:33see me and this is one of the ways I
  840. 35:36approach that I mean obviously also
  841. 35:37switching colors is searching foliage
  842. 35:39things like that also yeah
  843. 35:54no I'm sure that's good
  844. 35:58I'm sure there's a lot to be gained
  845. 35:59there it's everything so little pull
  846. 36:01here though so modulated myself this I
  847. 36:04mean like it's just a few triangles yeah
  848. 36:14actually you said like for one of the
  849. 36:16island the algorithm has to restart
  850. 36:18twice because the you find enough yeah
  851. 36:21but when do generic can can you like do
  852. 36:24you do you shift the weights of the
  853. 36:26different times you're gonna put or are
  854. 36:28you are doing this the same just they're
  855. 36:30just you're straying from the other I
  856. 36:33mean there's both forming the observers
  857. 36:35the adjacency constraints that have hard
  858. 36:38constraint right always but then there's
  859. 36:40also probabilities and I can put boxes
  860. 36:42around things and see like hey the tiles
  861. 36:44within this area nation and I was like
  862. 36:46the higher or lower probability so yeah
  863. 36:50but the beach thing that happens
  864. 36:53afterwards when it's like it
  865. 36:55this algorithm is done and then it's
  866. 36:57constructing the navmesh and then it's
  867. 36:59checking like is there enough beaches
  868. 37:01where ships good land if there's not
  869. 37:03enough than described gave in this time
  870. 37:05but it kind of fail very earlier in the
  871. 37:06back to and it can fail like there are a
  872. 37:09few validation sets after generation and
  873. 37:11there are a few during so if it closes
  874. 37:14the navigable island so the the network
  875. 37:17its building if that's if that gets
  876. 37:20closed before it reaches the bottom for
  877. 37:22example then you know there's no way
  878. 37:24this
  879. 37:25and then I can discard it before I do
  880. 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.