Principia Discordia

Principia Discordia => Bring and Brag => Topic started by: Triple Zero on July 31, 2011, 05:57:55 PM

Title: multiscale turing patterns
Post by: Triple Zero on July 31, 2011, 05:57:55 PM
some kind of not-quite-fractal reaction-diffusion pattern I came across last week, it looked awesome and I just had to write code to reproduce it :)

explained here:
http://www.jonathanmccabe.com/Cyclic_Symmetric_Multi-Scale_Turing_Patterns.pdf
http://softologyblog.wordpress.com/2011/07/05/multi-scale-turing-patterns/

but you probably just want to gaze upon the eye candy I produced and uploaded to vimeo. The main improvements on the algorithms described above is that I tried to add some colours to the mix (the originals are in greyscale only):

http://vimeo.com/27055590 -- first attempt at colour, not very good, looks like rainbow puke :)

improving further, the next ones are much better:

http://vimeo.com/27083238 -- purple/yellow
http://vimeo.com/27090684 -- greens
http://vimeo.com/27109742 -- red-orange/blue

I wrote the code to produce these videos in Python using Numpy and Scipy. A friend of mine added Weave/Blitz to the mix, which lets you write performance-critical bits in C++ (as strings in Python! compiling on the fly!) but I haven't incorporated it yet. Should bring down the rendering time from a few hours to 30 mins or so, I hope.
Title: Re: multiscale turing patterns
Post by: Triple Zero on August 02, 2011, 12:07:06 AM
really big awesome rendering:

(http://img41.imageshack.us/img41/9022/big020s.jpg) (http://img220.imageshack.us/img220/8493/big020.png)

click the image for its full 1600x900 desktop background sized glory :)
Title: Re: multiscale turing patterns
Post by: Triple Zero on August 02, 2011, 12:07:38 AM
also, click the vimeo links, damnit! see how it looks when it's MOVING :D
Title: Re: multiscale turing patterns
Post by: Luna on August 02, 2011, 12:12:02 AM
Oh, neat...
Title: Re: multiscale turing patterns
Post by: Anna Mae Bollocks on August 02, 2011, 12:22:31 AM
That's awesome...like a weather map and a 60's light show all mixed up.
Title: Re: multiscale turing patterns
Post by: Telarus on August 02, 2011, 12:59:08 AM
Very cool. Can you make it Tileable?
Title: Re: multiscale turing patterns
Post by: Triple Zero on August 02, 2011, 02:05:48 AM
Quote from: Telarus on August 02, 2011, 12:59:08 AM
Very cool. Can you make it Tileable?

It's already tileable.

The whole algorithm runs with periodical boundary conditions.

You want tiles at different sizes? Just ask :)

I even made a tweak to make it tileable in time, so you can loop it forever, I'll post tomorrow.
Title: Re: multiscale turing patterns
Post by: Cramulus on August 02, 2011, 09:31:09 PM
WALLPAPER'D
Title: Re: multiscale turing patterns
Post by: Telarus on August 03, 2011, 03:10:34 AM
Bad ass. I'd love tiles in the stock power of 2 sizes (256, 512, 1024)... the time-loop would be amazing too. I could do some nifty things in the UDK with that.
Title: Re: multiscale turing patterns
Post by: Triple Zero on August 03, 2011, 05:25:01 PM
sure thing I'll set my comp to generate a whole bunch of random 512x512 ones tonight when I'm away.

the timeloop thing I only so far made to create this avatar GIF loop:
(http://i.imgur.com/qlRh7.gif)
which I haven't used yet cause I see only robots anyway :)
Title: Re: multiscale turing patterns
Post by: Triple Zero on August 04, 2011, 12:11:28 PM
WELL IF THAT DOESNT POOP BLAST TURDLETS THROUGH MY SHITNOZZLE.

... I can't get my avatar to upload and stay animated :( I think it only works if I would have made it exactly 105x105.
Title: Re: multiscale turing patterns
Post by: Triple Zero on August 04, 2011, 01:59:18 PM
For your texturing enjoyment:

http://devio.us/~tripzilch/mstp512/

click on the thumbs for the full 512p size.

the code on the right are the parameters and colours used for rendering, I could for instance re-run the simulation in other resolutions, it would give roughly the same sort of patterns except the blobs would always be in other random positions.

I set the randomization of the parameters quite high, I'd rather have a lot of variation with a few "bad ones", than most of the stuff looking the same. I did try to restrict the colour schemes to be mostly harmonious, though. Which mostly worked.

currently re-rendering img32 at 1536x900 desktop size, and later probably some other choice "good ones".
Title: Re: multiscale turing patterns
Post by: Cramulus on August 04, 2011, 03:00:53 PM
these are really cool! very "biomorph"

I'm finding that they make for very noisy desktop wallpapers though. all the bright colors make it hard to see the icons/text...

Right now I'm using this one, which I think has the most muted colors

(http://devio.us/~tripzilch/mstp512/img19.png)(http://devio.us/~tripzilch/mstp512/img19.png)(http://devio.us/~tripzilch/mstp512/img19.png)
(http://devio.us/~tripzilch/mstp512/img19.png)(http://devio.us/~tripzilch/mstp512/img19.png)(http://devio.us/~tripzilch/mstp512/img19.png)


Title: Re: multiscale turing patterns
Post by: Triple Zero on August 04, 2011, 03:58:51 PM
Quote from: Cramulus on August 04, 2011, 03:00:53 PM
these are really cool! very "biomorph"

I'm finding that they make for very noisy desktop wallpapers though. all the bright colors make it hard to see the icons/text...

Hmm good point. You might try to open them in GIMP and adjusting the colour Curves a littlebit to mute the colours somewhat to your liking.

Possibly even do filter>map>tile to tile it to desktop size, add an extra layer and overlay a semi-transparent gradient over it so if most of your icons are on the left, the colours are darker/muted there, but shade to more vibrancy on the right, or something (it's a trick I sometimes use when a desktop image isn't quite suitable).

My (Ubuntu) desktop doesn't really have icons on it, it's just a pic that sometimes shows through when I don't happen to have any windows open :)

So, this one in large size just finished. It's probably also too vibrant, sorry bout that:
http://img21.imageshack.us/img21/1075/niice.jpg
Title: Re: multiscale turing patterns
Post by: Triple Zero on August 04, 2011, 06:06:41 PM
Two more big ones:

http://img11.imageshack.us/img11/29/aap0.jpg
http://img846.imageshack.us/img846/9420/noot0.jpg
Title: Re: multiscale turing patterns
Post by: Telarus on August 04, 2011, 09:50:24 PM
These are great. I'm totally going to be using some in UDK, eventually. I'll bump the thread when I have something to show.
Title: Re: multiscale turing patterns
Post by: Triple Zero on August 04, 2011, 09:57:13 PM
What's UDK again? A 3D engine for a game or rendering/modelling tool? Would be awesome to see what you do with them, no matter what you do :)

also, another 1536x900 one, last one for tonight:
http://img59.imageshack.us/img59/7783/mies0.jpg

BTW the big rectangular images also tile, except rectangularly, so that might not be very useful for textures (unless you rescale, but then the aspect ratio changes, which may or may not be a problem cause they're quite random patterns anyway and you'd just get a sort of directional preference)

(License is: free to use for anyone from PD but I'd like some credit and notice what you used it for. For anyone else it's CC-BY-SA-NC 3.0)
Title: Re: multiscale turing patterns
Post by: P3nT4gR4m on August 04, 2011, 10:14:52 PM
Can you do the last one 2000x3000px? If you can I can drip P3nT's awesome creation juice all over it :ninja:
Title: Re: multiscale turing patterns
Post by: Telarus on August 04, 2011, 10:58:39 PM
UDK is the Unreal3 Engine's "free version", so a game engine... I've been working with code for a few weeks now (non-UDK), but I need to get back to my lighting, texturing, and environment art in that engine...

Thanks Trip!
Title: Re: multiscale turing patterns
Post by: Triple Zero on August 05, 2011, 02:14:22 AM
Quote from: P3nT4gR4m on August 04, 2011, 10:14:52 PM
Can you do the last one 2000x3000px? If you can I can drip P3nT's awesome creation juice all over it :ninja:

my poor little netbook is going to croak, but I'll try and see if I can run that over the night or something :)

to give you a rough idea what it will have to do:

- fill the 2000x3000 with random noise
- duplicate that into 14 layers
- apply a different Gaussian Blur to each layer with radiuses varying from about 2.3 up to 72.
- subtract the layers in a clever way and make the pixel brighter or darker depending on whether the smallest difference is positive or negative
- repeat the above duplicate/blur/subtract sequence about 30 times.

now your computer is prolly all fast and would do that shit for breakfast :) mine's gonna need a night for it, though :) :)

it's the blurs that soak up most of the time and fortunately there's some ways to get a pretty good almost-gaussian blur much much faster, but we haven't made it yet (it works by applying a box-blur, which is ultra-fast, three times or so, and it's nearly gaussian).
Title: Re: multiscale turing patterns
Post by: Triple Zero on August 05, 2011, 03:15:24 PM
sorry P3NT, but early this morning I woke up to an out-of-memory error during the very first iteration.
Title: Re: multiscale turing patterns
Post by: P3nT4gR4m on August 05, 2011, 03:54:41 PM
Don't sweat it I'll try make do with upscaling the original. Planning on overpainting the shit out of it anyway so a bit of blur won't be the end of the world
Title: Re: multiscale turing patterns
Post by: Triple Zero on August 05, 2011, 07:13:06 PM
ok, upscaling would look different than what I'd have generated as well. cause the blobs and bits would have stayed the same size, there'd just be more of them.

and once more, they all tile. If you fudge it a bit so the tiled parts are on the edges, who's gonna know :) ["offset filter" in PS, afaik. basically just does sliding things around while wrapping, also very useful for making your own seamless tiles]

really curious what you're going to do with these :)

BTW all images are made from two layers, one with the colours and one greyscale for the brightness which is multiplied on top of it. In case it'd be useful I could get you both separate.
Title: Re: multiscale turing patterns
Post by: P3nT4gR4m on August 05, 2011, 07:54:31 PM
I don't really think it'll matter. This is like tracing paper with built in tripping balls. And the fucking thing NEVER REPEATS!!!! All I have to do is spend a couple of minutes staring at a bit of it until I see something jump out. Like staring at clouds.

checkit - when finished (in about seven or eight hundred years!) it will be 80-90% overpaint
(http://i75.photobucket.com/albums/i312/P3nT4gR4m/nightmare-factory-WIP1.jpg)
Title: Re: multiscale turing patterns
Post by: Triple Zero on August 05, 2011, 08:52:06 PM
OH FUCK!!! YOu'RE GONNA PAINT GEIGER ALIENS AND ZALGO INTO IT

SHIT YEAH :D :D :D ( <-- that's actually one grin but mine's 3x as big as the single emote )

that's so awesome, if you need anything, just holler :) for example as you can see on the prev page in the avatar animation, I can sort of "seed" the pattern to respond to a certain shape (notice how the lines and blobs kinda follow she shapes of my face). although I understand that's the wrong way around, you take the randomness and be inspired by it.

I do agree, I personally love that technique as well and as you mention it, these weird-ass organic shapes are quite perfect for it.

A bit like when I made this other random doodle generator and Cram painted/WOMPed goatseman into it :lol:
Title: Re: multiscale turing patterns
Post by: Triple Zero on August 06, 2011, 12:00:23 PM
Quote from: Triple Zero on August 05, 2011, 08:52:06 PM
A bit like when I made this other random doodle generator and Cram painted/WOMPed goatseman into it :lol:

Linking this here for reference and ease of finding back my own threads:
http://www.principiadiscordia.com/forum/index.php?topic=24311.0