3 ms·
A little while ago, I did an animation in HTML5 that uses various 3D hinting techniques to create an illusion of depth http://seanmcbeth.110mb.com/stereo.html h
by moron4hire 16y ago
A little while ago, I did an animation in HTML5 that uses various 3D hinting techniques to create an illusion of depth
http://seanmcbeth.110mb.com/stereo.html http://seanmcbeth.110mb.com/stereo.html
- JeffJenkins 16y agoThat's neat looking, though it isn't doing anything for me. What are the things you tried to do? Can someone else with stereoscopic vision tell me if it's doing anything for them? I'm really interested in 3D techniques which work for people without the brain mechanisms to fuse the images of their eyes (unsurprisingly).
- moron4hire 16y agoWell, from this Wikipedia article: http://en.wikipedia.org/wiki/Stereoscopy http://en.wikipedia.org/wiki/Stereoscopy The techniques I'm using are: == Stereopsis: in this case, simple linear transformation in X-axis proportional to Z-axis as an approximation to a real 3D transformation == Occlusion of one object by another: basic Z sorting, i.e. "painters algorithm" == Subtended visual angle of an object of known size: I scale the object size proportional to its distance in the Z-axis == Haze, desaturation, and a shift to bluishness: I interpolate the object color proportional to its distance in the Z-axis If you can get the effect to work well, it goes from being a fairly incomprehensible jumble of grey circles (too information-dense for 2D display) to a box of bouncing balls where you can easily track individual objects as they move around. EDIT: looking at the code, it seems I forgot about a technique that I used! I also threw in the "Vertical position" bullet point from the Wikipedia article, but without a frame of reference in the rendered scene you wouldn't be able to tell.
- bradleyland 16y agoThis particular example requires that you cross your eyes to 'overlap' the two images, so those without good sight in both eyes will not perceive any depth.
- raimondious 16y agoThat works for me, nice job. You could improve it by faking a light source and having them cast shadows. Shooting 3D photos, I've found that shadows really enhance the feeling of depth. Edit, kind of related, here's a "virtual" stereo where I only used shadows to create the effect: http://www.flickr.com/photos/miura-ori/294022551 http://www.flickr.com/photos/miura-ori/294022551 It works best if you use the large version of the photo.
- moron4hire 16y agoInteresting, I'll have to give that a try. I had originally started doing this as an attempt to turn my Android phone into a stereoscope: http://picasaweb.google.com/lh/photo/MOz-Qmv8VS1pcz0zZ7D0lToH4BZbzETnRAD7IQv0FT0?feat=directlink http://picasaweb.google.com/lh/photo/MOz-Qmv8VS1pcz0zZ7D0lTo... http://picasaweb.google.com/lh/photo/ybf2b3eh3j05J2urDrz3LzoH4BZbzETnRAD7IQv0FT0?feat=directlink http://picasaweb.google.com/lh/photo/ybf2b3eh3j05J2urDrz3Lzo... Unfortunately, the rendering speed just isn't there. The bottleneck actually seems to be the timer for running the animation, because reducing the number of objects doesn't seem to have a significant effect on the performance. I'll probably end up reworking this as an OpenGL application.
- raimondious 16y agoI look forward too hearing how that goes. Too bad the HTML version didn't work out — it's pretty slow on my iPad too. I vaguely remember a company that sold a plastic parallax barrier you could put onto touchscreen phones to do glasses-free stereoscopy. I'll post it if I find it. Edit: http://www.spatialview.com/en/node/489 http://www.spatialview.com/en/node/489 here it is, supposedly iPhone only, but I'm sure it can be hacked.