You can kill the background for speed, if you wish.[x]

Friday, April 1, 2011

Hey look, I made some xk3d!

So last night someone on Facebook linked to xkcd, which for April Fools' day converted several of their comics to 3D with some clever Javascript and image slicing. In typical xkcd style, Randall also posted a link with instructions about how the system worked, and importantly, how you could convert older comics to 3D yourself if you wanted. If you did so and sent them in, they may put them on the site.

So I, of course, immediately checked my all-time-favorite xkcd comics - the five-part barrel series. None of them had been done, so I decided to tackle my favorite, the culmination. It was a lot of fun - slicing, cloning, sorting, all of course in GIMP, and by the end I had a nice 3D version of the comic, so I sent it in, figuring that a million other geeks also held these comics near and dear, and at least a bunch of those had gotten around to it before me.

But this morning, I checked my email, and what do you know, I had a email that said "Thanks!" in reply to my submission, and sure enough, there was my 3D conversion, with my name at the bottom and everything! How cool is that?

So of course, I had to go through and convert the rest of the barrel series - If it's still April Fools', you may notice that all of them are now 3D. I sent them in about half an hour ago, and got a prompt reply saying they'd all been put up, and complementing me on dealing with the "slice-orthogonal plane". Awesome, and totally worth being a few minutes late to Engineering Probability and Stats for.

I also had to hack together a version of the webpage to test these guys with - fortunately, since it was all Javascript magic, that was as easy as saving and modifying a copy of the homepage. It was as easy as adding a parameter to the omgitsin3d initialization function for the comic num, and have it use that as the folder to take the images from in the script, which let me throw each set into its own folder, modify the JSON in the HTML file, and adjust as necessary. Then it was just a copy/paste of the JSON into the comics.json file and they were done. In case anyone else wants to do some conversions but doesn't want to go through the trouble of building a testing thing, I zipped this guy up with the original comic I did, and you can download it if you like. You'll still have to read up on how it all works, but this should help testing it out. And of course, xkcd is CC-noncom-by-attrib, so this all, of course, is thanks to Randall and xkcd, and is based off of his comics.

1 comment:

Lilleke said...

If anyone wants to check these out the 3d versions today, go to "".

All comics are there in their 3d glory!