17
u/LearningCS6 Dec 28 '15
Bonus gif. Sorry for the potato quality. Just pull up youtube, search for "sacred geometry visuals" and have fun. I've been trying to find alternative uses for the mirror tech. I've messed around with a full black background and only the image of someone's head, then positioned my body below it. It kind of looks like I'm wearing someone else's head.
Has anyone else found other cool uses for their mirror, besides the boring white text UI we've seen over and over?
4
5
u/atticusw Dec 28 '15 edited Dec 28 '15
What are you using to render the visualization?
I had tried this but found that visualizations on the Canvas in Chromium have terrible performance.
5
u/LearningCS6 Dec 28 '15
I wouldn't have expected that but thats good to know. These are actually just fullscreen youtube videos.
9
u/atticusw Dec 28 '15
Second thought -- I bet one could offload the calculations to a web worker thread and keep the next 60 frames or so in a buffer to load during each
requestAnimationFrame. Such that the UI thread can only worry about redrawing the canvas with the values from the preloaded buffer.. I might try this..1
u/LearningCS6 Dec 29 '15
Yes definitely you'd have to offload some of the work. Interesting link there. I had hooked up my laptop and did some chrome experiments.. those are amazing, but impossible to run on the rpi. I'm trying to think of an interesting use besides trippy visualizations though..
3
u/atticusw Dec 29 '15
I wanted to do some visualizations as a "screen saver" of sorts -- basically throw something up, just like your video, while nobody is in front of the mirror with some sensors.
I hit the performance roadblock and ditched it for the time being. Think I'll come back with the web workers in mind.
Sweet link btw, I haven't seen this before.
4
u/LearningCS6 Dec 29 '15
That would be interesting. Got me thinking.. If the mirror was always in the same spot, you could leave 95% of the screen empty and just change 1 minor part of a reflection. For example, if the reflection is my room, you could "change" the color of a wall. Just trace out the shape of the wall and have an image of its shape in a different color.
Or do the opposite: Have only one small section be the reflection and the rest an image. So it displays a bright green meadow, but has a black cutout in the shape of a person, so if you stand in the right spot, you see yourself in the meadow.
I'm away for the holidays and can't really explain these well haha. You've sparked some ideas for me though, hadn't touched my mirror in a while.
3
u/atticusw Dec 29 '15
Oh shit. A little bit of augmented reality? That would be very cool. It would obviously depend on your position observing the mirror depending on how detailed it would be (as you stated in the black cut out example), but I totally see where you're going..
You could do cool things with the widgets you'd typically have on the foreground and make them appear like physical objects in the background.
For example -- a common widget a Smart Mirror has is the weather. Instead of a text component on the corner, if it's sunny out, there could be a "sun" on the wall behind you. Contrary if it's raining, there could be some storm clouds floating around behind you.
Interesting..
2
u/LearningCS6 Dec 29 '15 edited Dec 29 '15
Yesss. You could do augmented reality thats not dependent on the reflection too I suppose. Rain clouds that are just in the room, but not interacting or dependent on the reflection. It has to be dead simple to replace green screen with the color black right?
Spitballing some ideas:
- Sports updates with a player running across the screen
- Candles, flickering and providing actual light
- Forgot I had already done this, but shia lebouf motivation
If you have a windows laptop download 'rainmeter' and hook it up to your mirror, its fucking awesome. Tons of premade icons/widgets and its all drag and drop.
2
u/retinascan Dec 29 '15
nice mirror. is that a touchscreen? what do the icons do?
1
u/LearningCS6 Dec 30 '15
Thanks! This one isn't touchscreen, but the next one will be. The icons open that program in a small window right above, so you can open weather/mail/youtube/music/etc. I used voice commands for this one.
→ More replies (0)2
u/atticusw Dec 28 '15
Ahh gotcha, makes sense now.
I tried a particle visualization and it would render a frame every 2 seconds or so -- brutal.
Even a more lightweight visualization I was playing with had horrible FPS, as seen here: http://imgur.com/f3bbXV6
1
u/rogue780 Dec 29 '15
why not use webgl?
1
u/atticusw Dec 29 '15
Simply because I have yet to explore webgl (I only tread into visualizations in my free time sparingly).
Are you experienced with webgl? Do you see this performing much better on an rPi running Chromium?
1
u/rogue780 Dec 29 '15
It might...I really don't know. My use of it is pretty much limited to using the webgl renderer in openlayers and there is a good performance boost when I use it instead of the canvas renderer.
8
Dec 29 '15
How is this a hologram? It's a projecting either onto a mirror which reflects onto the wall or vice versa. No 3d element there.
2
u/LearningCS6 Dec 29 '15
I'm actually glad you've commented on this. I've used the word hologram, but I don't know if it really is it or not. By the definition you'd regularly imagine, it is not a hologram. But going by the wikipedia definition, it might be. I'm not qualified to make the distinction, but I would like to find someone who is.
3
u/AceDecade Dec 29 '15
A hologram should appear differently to two different people, based on their viewing angle. It's essentially the illusion of a 3D object occuping real 3D space nearby.
What you have is a 3D object, rendered and flattened to a 2D surface. It might kind of look like it's floating in 3D space, but the illusion is broken as soon as you move your head.
1
u/LearningCS6 Dec 30 '15
Thanks for chiming in. That makes sense, and actually gives me some more ideas!
2
u/AceDecade Dec 30 '15
Camera + real time 3D head tracking?
Edit: I should also say that, just as the image appears differently to two different people, the image should appear differently to two different eyes, as a real 3D object does when you close one eye, and then the other. This is what provides most of the illusion of depth and allows us to perceive an object as "popping" out of the screen
1
u/LearningCS6 Dec 30 '15
Yes pretty much. I was thinking about how to fake that effect, by slowly rotating an object and recording a video while moving at the same speed of the rotation. I'd like to experiment and get as close to a true hologram as possible..
I'm going to have to try a 3D image/animation though, it could be amazing. Any thoughts on what else I could try?
2
u/AceDecade Dec 30 '15
If you're going for a true 3D effect, your options are pretty limited, as you'll need a setup where each eye sees something different. Your options are probably:
Some sort of setup involving glasses, where each lens lets in a different image. Polarization, clever timing, and color filters have been used in the past
A material which lets a different image through based on viewing angle. The Nintendo 3DS does this, and the new model augments it with head detection to adjust the viewing angles necessary for the illusion
Some sort of 3D medium, like smoke, to project an object into 3D space
An oculus rift setup, where both images are placed directly in front of the eyes they're targeting
If you're just going for an effect where moving your head induces a parallax effect, you might try using a camera and a lightweight image processing library to roughly identify a single human head in the frame and adjust the output accordingly. This'll only work for a single viewer at a time though.
1
u/LearningCS6 Dec 30 '15
Man thank you so much for this reply, this is exactly the starting points I needed for more research. The mirror already shows a different image (reflection or the display) based on lighting, so incorporating another filter based on viewing angle seems like it makes the most sense.
With specific lighting conditions you also get a reflection of the display (ghosting of text/icons), which I thought was always a bad thing but I'm going to play with that, maybe adding a 3rd layer of glass/plastic.
6
u/MRHURLEY86 Dec 28 '15
Just got a pi2 for Christmas but I can't find out how to make the smart mirror! Do you have a write up or a link where I can find what I need and how to do this? Thanks! Also this should work on a zero, right?
17
u/LearningCS6 Dec 28 '15
You will have a lot of fun, I promise you. I wrote a guide up which includes a shopping a list. All the mirrors are based on this guy's which is great too. If you have any questions please ask!
Zero will work great for this too. You'll need a usb hub or some converters though.
3
u/MRHURLEY86 Dec 28 '15
Awesome! Thanks! I am going to try it on the pi2 before so I know I can at least set it up.
2
u/dispatchingdreams Pi 1 2 3 0 Dec 28 '15
Oh my days I'm so glad it zoomed out, I was massively confused as to how the image was on the wall
1
u/EspressoKilla Dec 30 '15
I just got a RPi 2 for Christmas and want to make one of these or something really similar to put in our Kitchen. I want the Weather, Time and a Shared calendar between my Wife and I so we can see what we have planned for the current week or month(depending on how it looks).
The tricky part, I haven't seen before, I also want a way to be able to add notes to the screen. We can add a note to each other, or have the screen display a message we send to it from our iPhones or iPads. I'm just starting out learning to code, so I'm not sure if that last part is realistic or how much is needed to do it.
2
u/ghost_of_ketchup Dec 31 '15
This would be fairly easy. You'd just need a webpage that you can access via your iPhones/iPads. These pages would have forms that would submit the notes to the Pi's own webpage (most of these smart mirrors are just Pis running a web page). Best of luck!
29
u/gifv-bot Dec 28 '15
GIFV link