Creating Little Castles with Wave Function Collapse

2024 ж. 19 Мам.
28 069 Рет қаралды

In this video i create some castles procedurally using the wave function collapse algorithm and describe how it works under the hood.
Further videos to watch on the subject:
Superpositions, Sudoku, the Wave Function Collapse algorithm.
Martin Donald
• Superpositions, Sudoku...
Coding Challenge 171: Wave Function Collapse
The Coding Train
• Coding Challenge 171: ...
EPC2018 - Oskar Stalberg - Wave Function Collapse in Bad North
BUas Games
• EPC2018 - Oskar Stalbe...
Music (Sourced from Epedemic Sound):
Subliminal Space - Lama House
JJJreact incase jacksfilms wants to watch it.

Пікірлер
  • I’m a simple man. I see a video about wave function collapse, I click it.

    @NakedGeep@NakedGeep4 ай бұрын
    • I'm a simpler man: I see a video, I click. Today I learned about wave collapse and that it isn't a surfing term

      @CLove511@CLove5112 ай бұрын
    • Let me guess, the adjecent videos that could have been clicked would not have been colapsable because the wave function collapse wouldn't have allowed any other video to be clicked, because it wasn't possible in the first place, leaving this video with the only option left to be clicked?

      @csx5882@csx58822 ай бұрын
  • 2:06 oh yes, the good old "lemme quickly write a script for that..."

    @Rafloka@Rafloka2 ай бұрын
  • Now I finally understand what wave function collapse is. I'm surprised that this doesn't have more views for a video of such high quality. Can't wait to see this channel grow!

    @woudy7@woudy76 ай бұрын
    • Appreciate it! I'll try my best to keep making interesting videos 😊

      @TechArtTom@TechArtTom6 ай бұрын
    • It usually takes a few but I hope he keeps it up.

      @AdobadoFantastico@AdobadoFantastico5 ай бұрын
  • Well explained! A video of exactly how you did it in the UE would be great. The popping, the noises... the best way to create the meshes. If you were the only one who would explain it like that, your channel would definitely push it.

    @unrealopenworld@unrealopenworld5 ай бұрын
  • Incredible quality for such a small channel! Thank you for the great explanations

    @mgiraldeau@mgiraldeau6 ай бұрын
    • Glad you enjoyed it! Thanks for the kind words ❤

      @TechArtTom@TechArtTom6 ай бұрын
  • Wave Function Collapse is just the name given to something I feel like I came up with on my own when I was a teen lol

    @JakubSK@JakubSKАй бұрын
  • Adore the chill vibes and excellent explanation! Great bit of concentrated knowledge!

    @Soundy777@Soundy7772 ай бұрын
  • Major Tom strikes again! Super clear and the quality of the visualisations is great, looking forward to the next one!

    @ericfear@ericfear6 ай бұрын
    • Thanks Eric!

      @TechArtTom@TechArtTom6 ай бұрын
  • Great video! Super high production quality, and really interesting topic! I love it when mathematical algorithms directly apply to game development and WFC is a great example of that.

    @nivmiz0@nivmiz06 ай бұрын
    • Thanks man, appreciate it!

      @TechArtTom@TechArtTom6 ай бұрын
  • Great video, I enjoy it and understand what he said. He gave complex information in a simple, understandable way. I love this video and hope to see more

    @ShadedGG@ShadedGG5 ай бұрын
  • Okay this is really sabastian lague esque and i love it!

    @honestlynuts__@honestlynuts__4 ай бұрын
    • Thanks! Glad you liked it

      @TechArtTom@TechArtTom4 ай бұрын
  • I've done similar experiments with procedural world generation in Godot, and have been thinking about precisely an algorithm like this for generating rooms in a fashion similar to the mazes in SCP Containment Breach. It's weird to realize I've already thought of this exact thing before learning of its official definition just now. At the same time this provides a few details I haven't thought of, like how to go about correctly picking the proper neighbors using a reduction system: I believe my idea was to give each opening on the module piece (window, door, corridor ending, etc) a tag represented as a position / rotation / name then randomly pick another module that has an identical tag connecting to it and position / rotate it accordingly... this would have supported tiles of multiple sizes (powers of 2) unlike a fixed tile size, but that's a much bigger pain to deal with so I'm glad I didn't go there.

    @MirceaKitsune@MirceaKitsune5 ай бұрын
  • Wonderful video. Subscribed, please more of these!

    @Kayotesden@Kayotesden4 ай бұрын
  • Woooooiiiioooiiioi what a cool video. I love the little sound effects ❤

    @evali5201@evali52016 ай бұрын
    • Me too 😊

      @TechArtTom@TechArtTom6 ай бұрын
  • Woah! Great video, cant believe you're not more popular!

    @nayzal@nayzal6 ай бұрын
    • Thanks! Things like this always take time to grow, and I'm just at the beginning so I can't expect too much 😅

      @TechArtTom@TechArtTom6 ай бұрын
    • @@TechArtTom Fair enough, can't wait to see where you go next :)

      @nayzal@nayzal6 ай бұрын
  • Cute, informative, and inspiring!!!

    @calebmichael6433@calebmichael64334 ай бұрын
  • giving heavy sabastian vibes and im loving it keep it up

    @touie7220@touie72204 ай бұрын
  • Really great quality on the video!

    @perftaco@perftaco5 ай бұрын
  • hi tom, you've made the best video for people to understand what wfc is

    @lolaswift111@lolaswift1115 ай бұрын
    • Thanks so much! Your kind words mean a lot :)

      @TechArtTom@TechArtTom5 ай бұрын
  • Great video! Subscribed.

    @Jejkobbb@Jejkobbb5 ай бұрын
  • Good stuff man

    @ThomasStewartDev@ThomasStewartDev4 ай бұрын
  • Great video! ...I'd kinda love to see a video about how you made the graphics for this video😅

    @robosklegs@robosklegs3 ай бұрын
  • Been watching a bunch of WFC vids and this has been really useful but what I'm looking for is how to set more complex constraints on map gen. For instance a thought that comes to mind is to have path start/end (attaches to building/location and regular path) and intersection tile, keep a count on path length and allow a termination or intersection to appear after x path length.

    @simplygreen5832@simplygreen58326 ай бұрын
    • Those are interesting use cases, I've seen Oskar stalberg expand on wave function collapse in his game "Bad North" to add additional checks to ensure the map is playable. I think what you are suggesting could work though there may be other solutions that are better suited to path generation rather than trying to bend the WFC algorithm to fit that particular problem. For instance you could use WFC to generate your map with buildings then do a separate pass to connect them up with paths. In my experience I've found adding too much to one system can add a lot of complexity when it may be better to separate it into more specific pieces.

      @TechArtTom@TechArtTom6 ай бұрын
    • @@TechArtTom It was more a musing than a functional use case, my initial thought was to pre-pass the map with location foundations and connect them with paths, in effect pre-culling the available tiles per coordinate. As you point out other algorithms are better suited to the purpose. I just thought it might be an interesting experiment to try forward generation with constraints. The Path comes to mind. Edit: Looked into Bad North, saw an article that mentioned Caves of Qud using regions. I'm thinking of taking a similar approach, say using random distribution to tag a forest region and switching tilesets rather than using transition tiles directly. A similar approach can be taken for different locations/tilesets and usefully I can separate roads/paths into their own tileset.

      @simplygreen5832@simplygreen58326 ай бұрын
  • I wonder if you could wace function collapse an entire house by just using building code and some standard design practices

    @goodboiadvsp3297@goodboiadvsp32973 ай бұрын
  • Awesome! Instead of automating what can connect with what perhaps an easier approach is to just build some example structures with the grid pieces manually and have a script keep note of what is allowed to neighbor what. Though downside is you then limit generations to variations of what you’ve manually constructed but I bet some cool results would still pop up.

    @giantneuralnetwork@giantneuralnetwork3 ай бұрын
  • That sound effect is from townscaper ;)

    @Zero-4793@Zero-47934 ай бұрын
  • Question: How do you go about creating pieces of 3D geometry that ensure the socket vertexes match up perfectly? In my mind it seems like it would be really tedious to do.

    @fletchthebirb@fletchthebirb3 ай бұрын
  • Sadly they've done the same thing with large language models and image generation

    @taureanwooley@taureanwooley2 ай бұрын
  • two questionss plz, did you do this in python? and did you use unreal engine for this?

    @Novallovesgames@Novallovesgames4 ай бұрын
    • Hey sorry for the slow response - I used python for setting up the data in blender automatically - but the implementation of the algorithm was done inside unreal engine using blueprints.

      @TechArtTom@TechArtTom4 ай бұрын
  • Is there a bug there which makes all the walls the same height? There seems to be a tile to go up and down on the wall but it is never used.

    @Spedley_2142@Spedley_21426 ай бұрын
    • That tile is just a top cap so it's just placed on the highest level, it's not used to transition between a higher and lower level. Though an implementation like that could certainly be possible!

      @TechArtTom@TechArtTom6 ай бұрын
  • More ._.

    @toastyPredicament@toastyPredicament4 ай бұрын
  • Where can i get those 3d assets? or can you share the unity project?

    @acronym5231@acronym52314 ай бұрын
    • It's in unreal engine!

      @TechArtTom@TechArtTom4 ай бұрын
    • @@TechArtTom ah, thanks i'll search for it.

      @acronym5231@acronym52314 ай бұрын
  • Why spend an hour labelling things by hand when you can spend 8 or 9 hours making a program to do it for you! The pain is real...

    @AMTunLimited@AMTunLimited4 ай бұрын
  • Wave function P R O L A P S E OwO

    @itryen7632@itryen76323 ай бұрын
KZhead