Hacker News new | comments | show | ask | jobs | submit login
Responsive Pixel Art (essenmitsosse.de)
1622 points by bpierre 442 days ago | hide | past | web | 122 comments | favorite

Hello this is Marcus, the guy who did the resolution independent illustrations. I just uploaded the current version of the site, so it will no longer freeze, when the image gets to small. I also updated the Tantalos image.

I am currently a bit blown away by the reaction to this. I finished this over a year ago but didn’t manage to make it public till now. I presented this at a meetup in Berlin yesterday and someone asked for an online version, which I postet to Twitter — then things escalated quickly.

So because a lot of people are asking: I am currently redoing my completely outdated homepage. The new one will include an in-depth explanation of what is actually happening there, what’s the idea behind it and how I want to apply this to actual web design to make resolution-independent work more easy and less restrictive for both designers and developers.

Until then I will try to answer some questions here …

Scalable Greetings Marcus

I have a hunch that one could build a GUI around this code-based image generation, maybe similar to what the Sketch-'n-Sketch interface[0] already does. Since you have actually coded this up, what are your thoughts on that?

[0] http://ravichugh.github.io/sketch-n-sketch/

Those were amazing!

  the resolution independent illustrations. 
Aren't those images kinda exact opposite of that? Because output image depends entirely on the resolution.

A lot of people refer to them as „responsive“ illustrations. But responsive basically means resolution-dependent. You do different versions of your design for different resolutions — and in between you just stretch or compress them.

These images work differently, there is no source image or something like that, the whole image is described that everything depends on the final resolution, so that the image is independent of its output size. There is no fixed, static sized image anymore.

I've been doing similar things with shaders. I'm fiddling with rewriting one of these in GLSL.

My idea was, that these principles could basically be applied to everything. Even 3d-stuff. Its mainly just about having an easy straight-forward way of designen stuff, thats coupled to some variables (in this case the output resolution)

https://github.com/bwhmather/missile-game/pull/9 Ben Mather and I were talking a bit about this. He suggested that we could compose signed distance sampling functions for shape rendering, and I implemented this in a demo ( http://codepen.io/xorgy/pen/dGmMLz ).

In this case, it's actually pretty easy to implement an editor for arranging functions like this. You could probably generalize the concept to other kinds of functions.

Would love to see a writeup on how these are built. Nice work!

I will definitely do a detailed explanation as soon as I am done with my new website.

Are you writing the image .px files by hand or generating them from another program, like Illustrator or something?

Since those are neither pixel or vector graphics and there is no such program (yet) they have to be done by hand. That’s definitely something I want to change in the future.

Amazing work! I love the thought that went into the artwork

Thanks :) actually the images where just case studies for me, so its nice to hear, people actually like them.

This is pretty cool. When I heard pixel art I thought about video games and a old game of a Mario World

Very nice, thank you for sharing this! When you move "Teiresias" its like he is dancing!

This is incredible stuff. Zeus in particular is amazing. It all seems to be done with weighted objects and a clever way of rendering them, but it's indistinguishable from magic from where I'm sitting.

Every image is made of JS. It's multiple ways of rendering put into single files.

It's not an algorithm, it's just well-designed art. The design is entirely different for every image. But it's still very, very cool.

"Isn't all code well-designed art?" says my co-worker sitting next to me.

It seems to be tying shapes and positions to aspect ratios and tweening them, but that would be an insultingly simple explanation. It's really an amazing piece of work.

The Zeus one is definitely tied to aspect ratio..

Changing the aspect ratio from portrait to landscape for many of them also results in really interesting interpretations of the same piece.

"Zeus" in particular is pretty cool in this regard

What sorcery is this!?


What a pernicious double-entendre.

So, necromancy.

This is really cool! If you look at the source, it appears that the images themselves are defined as JS code, almost like a vector image. For example, Zeus: http://essenmitsosse.de/pixel/scripts/zeus.px

The author then has a renderer to turn these into pixel data. It seems to render them down to an actual pixel image on the fly.

The amazing part about the Tantalos slide was that its responsive implementation actually captured the ethos of the myth itself - no matter how far he reached, the fruit moved ever farther away. outstanding work.

I think there's a lot of thought that went into these. The "Teresias" one has the character's bald head and beard morphing into longer hair, I think suggesting that the gender changes as in the myth of Tiresias [1].

I think he (Marcus Blättermann) presented at a meetup in Berlin [2] in a talk called "Resolution-Independent Illustrations in Pure JavaScript". Does anyone have more information on how this was created?

[1] https://en.wikipedia.org/wiki/Tiresias

[2] http://up.front.ug/2016/03/08/meetup/

Besides moving your mouse around, zooming in and out also works beautifully (might put a bit of a strain on your system though).

Given the sheer amount of work for one piece, with The Three Graeae appearing to be around 1000 lines of code, I'm also quite amazed he managed to produce seven. Brilliant, and Art indeed.

Zooming just decreases the resolution for me. I'm on Windows+Chrome. What does it do for you?

Very much the same (also as daodedickinson wrote), and I hope I didn't send you on a (short) wild-goose chase with this. I was pleasantly surprised to see that the author took resizing / zooming the window into account and I thought it gave some nice insight on how the features of the pixel art change with scale (without the canvas actually visually shrinking).

Zooming in decreases the resolution and zooming out increases the resolution for me on Windows 8.1 + up to date Chrome.

Reminds me of the following different project for content aware image resizing or retargeting:



I thought the same, and also about the Structured Image Editing [1] that was linked from the Image Analogies thread [2] two days ago:

[1] https://vimeo.com/5024379

[2] https://news.ycombinator.com/item?id=11234793

7 years old demo.... are there any paint tools (commercial, open source) available in the market nowadays implementing these algorithms?

So freaking awesome, this just rules!

My faves are 1- Zeus, and 2- Teiresias

Those two look like they took the most work, and are most technically challenging. The Man-Eagle-Bull-Snake morph especially.

Halfway random tangent, and halfway related, but I'm really super looking forward to wider adoption of SVG 1.2 precisely because it adds absolute unit constraints in addition to the relative constraints, so you can do some of the same kind of stuff in an SVG image, and have authoring tools to support it. Not the pixel art side of it, and nowhere near as crazy as this project, but it will still be really useful.

Awesome. I didn't really get it until I looked at the Brother picture, but that is brilliant.

Brother shows off a good use case.

Zeus is just fun

I wonder if this can be applied to high quality pixel images as well or if the distortion would look weird.

Check out Seam Carving:


It's pretty cool at altering images to fit an aspect ratio.

How are you seeing different pictures? I don't see any way to pick different images. On Windows+Chrome.

There's a gray sidebar on the right with a list of names and 2 arrows. If you click on any of the names, it goes to that picture.

Oh weird. It wasn't there before but now it is!

I don't see the navigation bar to navigate through the images with my browser in a portrait aspect ratio. Works fine in a landscape ratio though.

I'm seeing a grey menu bar on the right side. Also Windows+Chrome.

Are you some kind of wizard? This may be the coolest tech demo I've seen all year.

This is the kind of stuff I come to HN for! MORE OF THESE KINDS OF POSTS PLEASE!

I got a good chuckle out of the Sphinx one -- the guy is standing in front of it saying "look, a sphinx!", and then if you make it vertical he's all "oh shit! a sphinx!". At least that's how I saw it.

Pretty awesome!

As others have stated, this is an amazing demo! I've played around in the past with designing responsive web comics with no real luck, but could you imagine creating a web comic using the techniques used in this demo?

The potential!

Would love to read some explanation on how this is made. Very impressive!

I encourage the author to do a write-up about the design of this. Fascinating.

Does this work on anyone else's phone? I just get a heavily pixelated virtually unrecognisable picture. (iPhone 6 - same for both Chrome and Safari)

IPhone 6s, the image dragging works, but only the first picture is displayed. The selector doesn't appear.

IPad Air, works perfectly. Image selector appears and you can switch images. Dragging works as expected.

it "works" on my iphone, but the minimum and maximum scales are too close to appreciate what it's capable of. that is, you can't really resize the picture by any significant measure.

i didn't "get it" on my phone but when i switched to my desktop it blew me away.

I like this. A little bug has snuck into the code somewhere: If you move your mouse pointer directly into a corner, the script fails with "Uncaught TypeError: Cannot read property '0' of undefined". I presume it is a division by zero when the image height or width becomes zero.

A likely related buglet, if you resize down to a single horizontal pixel line the pic gets stuck at one line.

I'm a jaded, cynical, cranky, old curmudgeon. Still I say that was pretty flippin awesome. Especially Zeus!

It breaks if you position the mouse to the top or the left edge of the canvas.

same here (Chrome 48 on Win 10)

I kept resizing the window until I realized that there was a simpler way already implemented. Thought that was a bug first. Really nice!

Holy crap, very cool! At first glance I thought it was just a neat little resizing trick, but then Zeus morphed right before my eyes and I did a double take. The way it responds to your movement makes it really effective in a way that would be extremely hard (impossible?) to reproduce in a static image or even a video.

This is amazing!

I really like that in "Teiresias", if you make the canvas narrow enough, the man jumping (presumably Teiresias) changes position and gets a white beard instead of white long hair. Just to still give the impression that it's an old sage, in small vertical space.

No, it's showing the sex change. He goes from long hair with breasts to losing his hair but getting a long beard.

"In Greek mythology, Tiresias... was a blind prophet of Apollo in Thebes, famous for clairvoyance and for being transformed into a woman for seven years."

That's amazing. What scaling algorithm does it use?

I don't think it's scaling. Go on the Zeus example and play with it. You'd be surprised. This is beautiful.

There's certainly more than just scaling involved, but there's definitely scaling in there.

I have the feeling is that the algorithm involves different pictures that superficially look the same but represent different things, and the code decides which picture to show according to the coordinates of the mouse, and them rescale it.

I tried briefly to read the code to see if I was right but failed so - I'm not good at reading other people's code :( - so someone please correct me if I'm wrong.

If you look at the "image" description files (e.g. http://essenmitsosse.de/pixel/scripts/zeus.px, linked by another comment), then it looks like the files define a set of constraints on the "components" in an image such as Zeus's arm , the bird beak, the cow's leg, etc. When the mouse moves, my guess is those constraints determine which components are rendered and where they appear on screen.

So is this some kind of specialized constraint solver? I'm looking at the JS source for the various art and it seems to be defining relationships alongside the shapes and styles.

This is absolutely bloody amazing. The cleverness with the `Zeus` artwork was equally entertaining as it was bloody amazing ².

I'd love to hear about the inspiration behind the project.

Very well done! Just a small QA note for the creator, it's possible to hit the "next" arrow until you reach a broken page [1].

[1] http://essenmitsosse.de/pixel/?showcase=true&slide=7

This is really awesome. At first I was going to write a comment about how this completely ruins pixel art by changing the pixels which are hand placed by the artists. But then after viewing a few images I realized that this is hand tooled changed, not just compression. Bravo.

This reminds me of those flip-books you made when you were younger (or of current age, whatever).

How do you get to the other images? Or is it broken on mobile (Android Chrome)

I agree with the many comments here. This is stunningly good work down with such a simple canvass. I'll be taking it to show my kids (who enjoy Greek mythology) this evening.

The style reminds me of Sword and Sworcery...


>That's right, I'm tracking this side

Do you mean you're tracking visits that hit "view page source"? Does that work? I can't find any info about that on Google.

It looks like the GA script is itself dynamically loaded, by injecting a script tag into the document. Fetching the document via "view source" won't execute this, which will produce a log entry on the server side that can't be correlated with a GA page view. That'd make it possible to identify page loads which didn't execute Javascript, which is a decent proxy for "tracking this side" unless somebody decides to be a jerk with curl and while (1) {}.

I think he meant "site". It's just regular Google Analytics.

The author is a German speaker. German 'Seite' can translate to both 'side' and 'page', so it is a kind of false friend with English 'side'.

I like how you can save the image as png! Pretty awesome stuff!

It reminds me of: http://xkcd.com/1037/ "Umwelt"

Try hitting Cmd - a bunch of times.

What happens? I can't notice anything, on Safari..

He meant 'Zoom Out'.

By the beard of Zeus! Bravo, loved this.

That's how image resizing should behave. But I guess this will only happen when AIs take over ^^

Just like responsive web design, only those who "resize" will enjoy it. blink

I wonder if this could be extended beyond pixel art by rendering it with webgl.

It's rendering to a <canvas> so no reason why not...

Now we just need neural networks to do this in the style of Jan van Eyck.

Some pretty awesome stuff!

pretty cool stuff! but is anyone else not able to resize the drawing after the cursor is moved out of the window when either the drawing width or height is at 1 pixel?

Grab the lower right corner of the image frame and drag it.

Just realized on desktop you don't have to grab, sorry. On MOBILE devices, you can touch a corner and drag it.

There appear to be a resize bug... for example with The Sphinx, if you go wide and short, the guy is pointing left with his arms, but if you go tall and skinny, the guy is pointing up with his arms...

I think that's intentional. The images change a lot depending on the aspect ratio. Just try Zeus. Magical!

Can you upload source code for Brothers?

This is absolutely nuts... extraordinary.

Only Zeus becomes a serpent in 16:9.

Two-parameter morphing, cool :-)

That's great work.

Zeus is the winner! ;)

This is stellar.

A joke right?

this is incredibly impressive!

Wow, epic!

Should've been tagged <NSFW>

I'm not sure about others, but I also had a NSFW picture load up. Are the pictures random, some of which are NSFW? (Maybe in some places it is different, but even classical art can be considered NSFW in parts of the US.)

are we referring to "the three graces"?

at what point along the spectrum of "abstract" does a boob become SFW?

it's a rectangle with a rectangle inside of it, for fucks sake.

Where I live, if it can be recognized as anything similar to something NSFW, then it is NSFW. Yes, the culture is extra prudish and I wish it wasn't, but I don't have any control over it.

Saying "this should be tagged NSFW" is taking personal control over it and directly contributing to that prudish culture.

It is labeling what it is given the current culture.

Saying 'smoking pot is a crime' is only a statement of what something is given the current law. It in no way implies that it should be a crime, only that to that person in that jurisdiction, it is currently a crime. The same logic for laws holds for mores.

If nobody is saying it should be labelled NSFW, then I fail to see why it was brought up at all.

Why do people find this interesting? Is there more to it than the insight that one can define a function that maps image-dimensions to an image?

Personally, I'm impressed by how the image dimensions were mapped to the image, not the fact that it can be done at all. There are plenty of boring and simple ways to map dimensions to an image. This was clever and well-implemented, imo. :)

Make the Zeus image tall and skinny. Then make it short and wide. Then make it square.

So this has over 1000 upvotes because it's good art, not because it's an interesting algorithm?

I think it's because it invokes the "Oh, that's so cool" feeling in people. It's a good feeling, even if it isn't due to learning about an interesting algorithm. Hackers and Painters I guess.

I think it's both. I haven't dug into the source code like others have, and whatever algorithms are in use may not be generalizable, but the tweening is cool and the art is cool.

I have to agree I was surprised by the number of upvotes as it didn't strike that chord with me, but I can see it has with other HN-ers so who am I to argue. I am impressed by the obvious amount of effort gone into it and the originality.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact