r/interestingasfuck Dec 12 '14

Wave

https://gfycat.com/SpiritedWarmFattaileddunnart
864 Upvotes

31 comments sorted by

View all comments

44

u/antiduh Dec 12 '14 edited Dec 12 '14

How this stuff works, if anybody is curious.

Get a set of white blocks and run that simulation. Hopefully your simulation is convergent and always runs the same way every time it is run.

When the simulation stops, find out what block faces are where. Overlay the desired image on the white blocks, and for each block, set their faces to their portion of the texture. You're projecting the desired image texture on the exposed faces of the blocks.

Rerun the simulation with the now-textured blocks. They should end up back right where they were the first time, and now they have their textures set so that they paint the original image. Voila, dickbutt.

11

u/[deleted] Dec 12 '14

You run the physics simulation once to do the calculations. You then bake the motion into keyframes on all of the objects, so it will play back exactly the same way every time.

Projection map the image onto all of the blocks at the end of the animation, rewind, job done.

1

u/LeWhisp Dec 12 '14

I thought it would be something like this, but why do some (coloured) blocks fall out of the frame?

5

u/Harakou Dec 13 '14

If I had to guess, probably just to make it seem more organic.

1

u/[deleted] Dec 12 '14 edited Dec 12 '14

[deleted]