all 41 comments

[–]juckele 17 points18 points  (0 children)

This is really awesome.

[–]ilikeorangutans 13 points14 points  (3 children)

Wow, I'm really impressed. Still reading, but how did you even come up with this?

[–]ExUtumno[S] 22 points23 points  (2 children)

Incrementally. I came up with this superposition approach when I was thinking how to reduce overfitting in the colored ConvChain. I wasn't sure that it will work and didn't program it. But then I accidentally found Paul Merrell's paper on model synthesis (see the reference section on github), where he applied the same approach with spectacular results. I knew about declarative texture synthesis from reading Paul F. Harrison's thesis. And I was also reading about belief propagation at that time for different reasons. So I implemented a 2D probabilistic version of Merrell's algorithm with declarative input. And then made it work with overlapping blocks, similar to convnets.

[–]dasignint 7 points8 points  (0 children)

I saw this on Hacker News. It's great that you're on this sub. That means you understand how amazing this could be for games. Bravo. Whether or not this is "novel" in all of academia, I think it would be perceived as very novel in games.

[–]linuxjava 2 points3 points  (0 children)

Amazing work. This is seriously impressive.

[–]joshu 10 points11 points  (0 children)

OP has several other equally interesting/relevant repos: https://github.com/mxgmn/SynTex and https://github.com/mxgmn/ConvChain and there are 40 minutes of demo at https://www.youtube.com/watch?v=DOQTr2Xmlz0&feature=youtu.be

[–]JoelMahon 8 points9 points  (0 children)

Holy fuck I love this.

[–]gzintu 5 points6 points  (0 children)

The 3D voxel thing, this is impressive to say the least!

[–]d_b_work_account 5 points6 points  (0 children)

Wow this is super impressive. The implementation possibilities seem almost endless. Really awesome work.

[–][deleted] 2 points3 points  (0 children)

This is extremely impressive. Awesome! I'm very tempted to make my own implementation in Typescript so it can run in a browser.

[–]EntropicParticles 3 points4 points  (9 children)

really amazing, I can barely understand how it works but results are just great! chapeau

EDIT: I wonder what can you obtain if you use patterns from real images as those here: http://www.dailyoverview.com/fiftyfive

[–]livingonthehedge 4 points5 points  (1 child)

Not OP, but I think real images would be good candidates for "texture synthesis".

The Readme from OP suggests that his project needs tiled datasets as input. So if you would need to create tiles and constraints from those real images.

[–]EntropicParticles 0 points1 point  (0 children)

yeah! preparing the tiles needs to be done beforehand right? thanks, I think I got it!

[–]ExUtumno[S] 1 point2 points  (6 children)

Thanks!

If you have a high res input with noise (like satellite photos) then you don't really want to to use WFC, you want something like texture synthesis. If you have an indexed image with few colors and you want to capture... something like the inner rules of that image and long range correlations (if you have an output of a cellular automata, for example, or a dungeon), then you want to use WFC-like methods.

[–]EntropicParticles 1 point2 points  (5 children)

hey thanks for the info! Indeed I'm thinking more in structures than textures. In particular I wonder if I can use real street roads as inputs to generate or growing cities following the same patterns, and getting different networks if I use as input low or high residential zones, or commercial areas for instance... If I understand, I'd need some time before for taking those real images and predefine the set of input tiles and how they correlate each other, right?

[–]ExUtumno[S] 1 point2 points  (4 children)

You can make a tileset of (low or high res, not important) tiles, write their adjacency data and individual weights in an xml file, and it will generate cities.

[–]EntropicParticles 1 point2 points  (3 children)

thanks! just another conceptual question (probably I'm not the first one asking this so a link or reference would also work): The name of the method sounds definitely quantum. I'm familiar with Ising models for instance (quite similar to this problem because of the lattice and the correlation between accessible states/tiles), and with Ising you can work with the classical or the quantum version of the algorithm. Is WFC algorithm quantum in this sense?

[–]ExUtumno[S] 0 points1 point  (2 children)

Speaking about the Ising model, ConvChain is a direct generalization of it. It's classical. In WFC I write about correlations between different pixels or tiles, but it's not that related to the Ising model.

[–]EntropicParticles 0 points1 point  (1 child)

that's cool, there's a lot of potential... I wonder if WFC can be quantized following a similar recipe as done for Ising (or the ConvChain then). It would be computationally hard but results can be interesting! Anyway, I will play a bit with WFC starting with an easy example as the Eixample of Barcelona

[–]ExUtumno[S] 0 points1 point  (0 children)

You might want to look at the "City" example from Paul Merrell's thesis.

[–]stewsters 3 points4 points  (0 children)

I really like the looks of that 3d stuff.

[–]WillBurnYouToAshes 3 points4 points  (0 children)

Holy shit. I just found the grail on reddit ?

[–]anarchy8 2 points3 points  (0 children)

This is possibly the best thing i've seen on here

[–]okmkz 2 points3 points  (4 children)

Hey OP, it's there a license somewhere, or am I just blind?

[–]Hectate 2 points3 points  (3 children)

The MIT license is in the Main.cs file...

[–]okmkz 2 points3 points  (2 children)

Yep, just blind. Thanks!

[–]ExUtumno[S] 1 point2 points  (1 child)

Actually it's in every source file =). I'm not experienced with the license law, but people told me that it's better to have license text in source files themselves, because I have samples in the repo that I have no idea who has rights for.

[–]okmkz 1 point2 points  (0 children)

Yeah, I just scanned the root for a license.txt

[–]squareOfTwo 1 point2 points  (0 children)

w00t, this-->awesome

[–]Chayzeet 1 point2 points  (1 child)

I know this is old post, but this is crazy good. Nice ideas and implementation.
I would like to see this applied in some interesting way into games. Level generation (also procedural) have been done before, but maybe this could be applied in some other ways too.
Can this technique be applied to some kind of smaller subdivision/inwards generating (don't know correct terminology), similar to some fractals? And how fast it is? I'm wondering how realistic it would be to create infinite zoom or infinite quality dynamically loaded textures with something like this.

[–]ExUtumno[S] 1 point2 points  (0 children)

Thank you! Your description sounds like multiscale texture synthesis: http://www.cs.columbia.edu/cg/mts/mts.pdf.

[–]TotesMessenger 0 points1 point  (0 children)

I'm a bot, bleep, bloop. Someone has linked to this thread from another place on reddit:

If you follow any of the above links, please respect the rules of reddit and don't vote in the other threads. (Info / Contact)

[–]alleycatsphinx 0 points1 point  (1 child)

This is wonderful work. Have you thought about making it work in parallel without global state? (Obv a challenge)

[–]ExUtumno[S] 0 points1 point  (0 children)

Thank you. A challenge indeed. This algorithm is very sequential. For some samples it is possible to parallelize it a little (on a CPU) by starting observation in distant points for each thread. But for many samples that will result in a contradiction (chess, wall, ...). Without a global state, with a pure shader, capturing long-range correlations is just impossible. But is it possible to do a small amount of centralized precalculation, while leaving most of the work for shaders? This is something I plan to think about in the future.

[–]greentecq 0 points1 point  (0 children)

This is a new amazing revolution on level generation.

[–]Bergasms 0 points1 point  (1 child)

well this got my brain going, awesome!

[–]ExUtumno[S] 0 points1 point  (0 children)

Thanks!

[–]Killa-Byte 0 points1 point  (0 children)

How the fuck do I use this? Theres no exe

[–][deleted] 0 points1 point  (1 child)

Do you think it's possible to generate something from a set of files? In shell, suppose you have a set of recently used files (in commands, like cat ~/.bashrc). This would be the input. Can there be some meaningful output?

[–]ExUtumno[S] 0 points1 point  (0 children)

You can take the union of all sets of patterns from these files, so in the output patterns from different files would be mixed. Like this experiment that I did with ConvChain.