
Show HN: MagicEye.js – Generate Magic Eye in Your Browser - peeinears
http://peeinears.github.io/MagicEye.js/
======
junto
I hate these things. Ever since I was a child I've never been able to see
them, no matter how far away, how much I squint, nothing, nada.

As a child I became convinced that everyone was taking the piss out of me.
Aged nearly forty, I stand by that!

I still can't see the damn things ;-)

~~~
Sarkie
So I learnt how to do it as a kid.

Basically, what I do is, imagine you are looking through the image and past
it, like if you were looking through a tiled window and wanted to focus on the
on something outside small. Then after refocusing your eyes (you can't blink
or else it'll reset your eyes) keep doing it, it can take you ages, what
you'll see are the tiles.

Also what helped me, is focusing on a single point and moving back and forth.

Good luck!

~~~
junto
To be honest, I actually think it is something (medical) to do with my
eyesight. I have poor eyesight in one eye, and a bit better on the other. I
also have astigmatism in both eyes.

------
mkoryak
It would have been better if the demo image was not a random generated shape
thing. I spent a few minutes trying to figure out what the hell I was looking
at in there.

Is it a wave? A recursive wave? wtf, X

~~~
jrapdx3
That's my opinion too. I love 3D. I've made _lots_ of 3D images, classic LR
pairs, and SIS, but I'm not enamored of RSIS. One thing about the random
stereograms commonly produced, including the demos here, is that having too
many horizontal repeats makes the image harder to fuse at usual viewing range.

I'd suggest limiting vertical panels to 7 or so, which would make it easier to
see in 3D on a small screen. That goes for any SIS, whether random or bitmap
slice "surface". To my sensibilities, the random dot type, as opposed to a
normal bitmap image slice used as the vertical panel, is much less visually
interesting and gives the viewing eyes much less to grab onto.

IMO a carefully chosen bitmap thematically or visually coordinated with an
elegant carefully drawn depth map creates a work of art that can be
appreciated for its interesting shape and color even by viewers who can't grok
the 3D effect.

Besides, looking at something beautiful can motivate people to keep trying to
see the 3D part come into focus, and eventually some do succeed. When that
happens it really is like "magic".

------
JelteF
To this day the thing I think about when someone mentions a stereogram is this
version of tetris.

[http://3dimka.deviantart.com/art/3D-Stereogram-
Tetris-367952...](http://3dimka.deviantart.com/art/3D-Stereogram-
Tetris-36795242)

------
happyshadows
When Lord? When the hell do I get to see the goddamn sailboat?

~~~
zachrose
Relax your eyes!

I've never been able to see one of these things on a screen until now. Now
that I have, I really want too see an animated one.

The coolest thing so far is that you can click "redraw" and you'll cut to the
next one and your eyes will already be focused for it.

~~~
peeinears
Look, it's a schooner! ;)

There's pretty recent music video that's all autostereogram:
[https://www.youtube.com/watch?v=2AKtp3XHn38](https://www.youtube.com/watch?v=2AKtp3XHn38)
The dots at the beginning are helpful.

I don't think MagicEye.js is fast enough to do a bunch of frames on the fly
for some real-time animation, unfort. But if you already have the frames
rendered you could stitch them together into a gif.

~~~
phst
I did an animated 3d plasma for js1k some time ago. It's not fast but it's
animated:
[http://js1k.com/2013-spring/demo/1412](http://js1k.com/2013-spring/demo/1412)

h key toggles the height map.

It uses a simplified version of the MagicEye.js algorithm which generates
horizontally repeating patterns for hard height changes in the source image.
That's why I went with a plasma in the end.

Source is available here: [https://github.com/philippstucki/sird-
plasma/blob/master/3dp...](https://github.com/philippstucki/sird-
plasma/blob/master/3dplasma.js)

~~~
jasonkostempski
Really cool! I've wanted to see a dynamic animated MagicEye in action ever
since I saw an Oculus Rift demo video with side by side left/right views and
was able to get a 3D effect in the middle by focusing on it like a magic eye.
It was hard to do because of the distance and looked pretty ugly because the
separate L/R views were still visible. I tried to make my own but quickly gave
up. If snappier animation is possible, there's definitely some fun to be had
in game form. Recreations of the old vector based arcade games would be really
fun. I wounder if there would be any effect, bad or good, on your eyes staring
at one for too long.

------
pontifier
You haven't really seen magic eye unless you've played quake with the magic
eye mod. I had headaches for days!

~~~
vyrotek
This... sounds amazing

------
robert_tweed
If you don't quite have the knack for relaxing your eyes to see these, here's
"one weird trick".

Position yourself with something behind you (such as a window) that you can
see reflected on the screen. Focus on the reflection so you are looking
"through" the screen. Now re-focus on the screen, but not immediately! Hold
your focus and let it "slip" as slowly as possible. At some point your eyes
will converge at the right depth and you'll catch a glimpse of the shapes
behind the screen. When you see the pattern starting to come into focus, lock
your eyes onto it. The first few times you'll probably catch a glimpse but
fail to lock on. Repeat until you get the hang of it.

~~~
zbowling
Nope. Doesn't work. Everyone's advice fails to work for me. I tend to think
this is just a mass conspiracy or giant elaborate joke. I'm going to use this
JS script to generate tests to see if I can get people who can do this to tell
what the number is behind this "magic eye". Call everyone on their bullshit.

~~~
lukifer
Here's how I (accidentally) learned to do it: hold up a forefinger from each
hand, pointed at each other, with a very small gap in between. Now look at
something in the distance through the gap: you should see a magic "hot dog
finger" floating in the air between them.

Once you can see this, alternate between looking at your fingers and looking
at the distance. Once you've got the mechanic down, you can start
intentionally unfocusing without anything in the distance to look at, which is
what it takes to see a magic eye.

~~~
zbowling
Nope. Doesn't work.

~~~
lukifer
Out of curiosity: did the finger hot dog trick not work, or did it not
translate to the magic eye?

------
ivanceras
I wonder if we could use Magic eye as a replacement for captcha.

~~~
zbowling
they don't work on a significant portion of the population.

edit: like myself.

~~~
ivanceras
I would really like to participate in "What are you working on this week"
thread such as in Lobste.rs but I couldn't since they require invites only,
which I don't know anyone who has accounts already. The purpose of their
invites-only was to avoid spam. If that's what they really want, then Magic
Eye will make spammers bleed their eye, and the potential users who really
want to join will have to take time learning Magic Eye, which I think pays the
trade off.

~~~
Raphmedia
Yes, let's cut off all user with visibility problems from our websites!

------
mark-r
I think it works better if the 3D object isn't allowed too near to the edge of
the image. I had trouble keeping it in focus as my eyes went to the right
side.

------
thomasfl
It's actually quite hard to see the 3D images. I remember giving my mom a book
full of this 3D stereoscopic images as a present some years ago. She still
hasn't been able to see any of the 3D images, even after hours of viewing.

------
tokenizerrr
Some explanation of what this is supposed to be would be helpful I think. Just
looks like a strange grainy image to me.

------
runeks
Would be nice to make animations with this. And with textures that aren't
dots.

------
RichardZite
Nicely done. I just wonder where to embed these...

------
prezjordan
What a fantastic idea! Just drew my name, love it.

~~~
sika_grr
Wait, did it get your name right? It's kinda buggy for me, it draws every
letter twice for me (twice in 3D, of course it has to draw it twice in 2D).

~~~
sika_grr
Nevermind, I managed to squint enough to get the letters to combine into a
perfect image. It should not be possible to get more than 1 correct 3D image,
the period of the background should be increased.

------
calebm
Wow, this is awesome! Have an upvote.

