Author Topic: Stereoscopic geometry test  (Read 17473 times)

0 Members and 1 Guest are viewing this topic.

Offline Stonemonkey

  • Pentium
  • *****
  • Posts: 1315
  • Karma: 96
    • View Profile
Stereoscopic geometry test
« on: May 03, 2010 »
Been having a bit of a look at the stereoscopy again and made a basic test to try some things out.

It's source and exe and the colours are for the colorcode glasses from CH4s 3d week but it's easy to alter colours for other glasses and make a few other adjustments for viewing.

Don't expect too much from it though, it's only a wireframe cube moving in and out but I think it is quite effective.
« Last Edit: May 03, 2010 by Stonemonkey »

Offline combatking0

  • JavaScript lives!
  • Senior Member
  • DBF Aficionado
  • ********
  • Posts: 4569
  • Karma: 235
  • Retroman!
    • View Profile
    • Combat King's Barcode Battler Home
Re: Stereoscopic geometry test
« Reply #1 on: May 03, 2010 »
I'll have to get some better celophanes - everything is visible through my blue and yellow filters.

I tried adjusting the colours in the .bas file, but it had no effect.

It looks promising - better than my wire-frame ball test, which I built in Flash ages ago but gave up on. I'll see if I can dig it out.
You are our 9001st visitor.
Challenge Trophies Won:

Offline Stonemonkey

  • Pentium
  • *****
  • Posts: 1315
  • Karma: 96
    • View Profile
Re: Stereoscopic geometry test
« Reply #2 on: May 03, 2010 »
Even very slight ghosting can destroy the illusion so some sort of filter made for the job is probably best. Tthis is just something I'm trying out to mess around with the geometry without having to worry about anything else although the line drawing is a bit rough and needs some improvement.

Offline Stonemonkey

  • Pentium
  • *****
  • Posts: 1315
  • Karma: 96
    • View Profile
Re: Stereoscopic geometry test
« Reply #3 on: May 03, 2010 »
Added a solid version to the zip, it's a bit slow here atm but i think it's looking pretty good.

Not so simple to alter the filter colours now though so theres a colorcode sub and a redblue sub.
« Last Edit: May 03, 2010 by Stonemonkey »

Offline Stonemonkey

  • Pentium
  • *****
  • Posts: 1315
  • Karma: 96
    • View Profile
Re: Stereoscopic geometry test
« Reply #4 on: May 05, 2010 »
After playing about with this a bit some things have become apparent, I kind of knew already but this has demonstrated it quite well to me.

If an object is centred in the view both the stereo images show it off centre but when viewed your brain manages to interpret it as being back in the centre, probably so obvious that it's not even really thought about but is handy for understanding how it works.

While the addition of stereoscopy adds a lot to the depth behind the screen giving a lot of scope for object placement the same is not true for in front of the screen. Imagine a pyramid on it's side with the tip at your eye and the base is the screen, that's the available space and if any object isn't entirely inside that pyramid then the illusion suffers a lot, the effect of perspective and closer objects appearing larger adds to this problem. So a lot of care has to be taken when objects are coming out the screen.

Offline Clyde

  • A Little Fuzzy Wuzzy
  • DBF Aficionado
  • ******
  • Posts: 7271
  • Karma: 71
    • View Profile
Re: Stereoscopic geometry test
« Reply #5 on: May 05, 2010 »
Finally found my Channel 4 specs and very cool dude.
Still Putting The IT Into Gravy
If Only I Knew Then What I Know Now.

Challenge Trophies Won:

Offline Kirl

  • Senior Member
  • Pentium
  • ********
  • Posts: 1217
  • Karma: 230
    • View Profile
    • Homepage
Re: Stereoscopic geometry test
« Reply #6 on: May 05, 2010 »
Cool idea, unfortunatly I don't have any colored glasses around anymore. I always wanted to do this with 3d animation software but never actually did it. Doing it with code is much cooler anyway though!
www.kirl.nl
Challenge Trophies Won:

Offline Kirl

  • Senior Member
  • Pentium
  • ********
  • Posts: 1217
  • Karma: 230
    • View Profile
    • Homepage
Re: Stereoscopic geometry test
« Reply #7 on: May 21, 2010 »
I recovered an old pair of RG glasses and I'd like to give this a try too. My recent game BackBack
www.kirl.nl
Challenge Trophies Won:

Offline Jim

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 5301
  • Karma: 402
    • View Profile
Re: Stereoscopic geometry test
« Reply #8 on: May 21, 2010 »
Fryer's the expert, but you need to cameras slightly apart, and they need to point inwards towards each other slightly so they intersect somewhere in the middle, depending on how far away you want them to focus.
You could also try pointing both cameras at the object of interest, that's kind of how your eyes work when they swivel in their sockets instead of turning your head.
Jim
Challenge Trophies Won:

Offline bikerboy

  • Amiga 1200
  • ****
  • Posts: 349
  • Karma: 12
    • View Profile
Re: Stereoscopic geometry test
« Reply #9 on: May 30, 2010 »
this is a very interesting effect, i've never seen an anaglyph demo/intro before.

what you should do is to make the yellow line into red ;)

the correct color values for anaglyph imaging are those (bright turquoise) RGB is R-000 G-255 B-255.

and the direct opposite of the bright turquise is R-255 G-000 B-000.

the spacing between the two images/shapes should be approximately the spacing between the human eyes, but you can play around with spacing for the optimal effect.

hope i helped :cheers:


Offline Kirl

  • Senior Member
  • Pentium
  • ********
  • Posts: 1217
  • Karma: 230
    • View Profile
    • Homepage
Re: Stereoscopic geometry test
« Reply #10 on: May 31, 2010 »
I was planning on adjustable colors, so you could even adjust it to the color of your beverage and use your beer to filter out the yellows! :)

However, my problem is backBack is semi-3d and for the pop-out effect to work, I'll need to get both views to cross at a certain point. This would actually require true 3d rotations, around the aproximated eye positions. I initially thought it'd be a quick and easy adjustment by simply offsetting the vanishing point or the geometry for each eye, but failed to realize nothing would ever pop out this way, because the views don't actually cross.

So this has been put off for a little while until I finish some other, slightly more urgent projects. :(
www.kirl.nl
Challenge Trophies Won:

Offline bikerboy

  • Amiga 1200
  • ****
  • Posts: 349
  • Karma: 12
    • View Profile
Re: Stereoscopic geometry test
« Reply #11 on: May 31, 2010 »
it's seems confusing but it's not ;)

those two links here explaint the methods a lot better than me  :P

and have very nice examples of images and their distance for the left and right eye.

http://en.wikipedia.org/wiki/Stereoscopy

http://en.wikipedia.org/wiki/Anaglyph_image


Offline Stonemonkey

  • Pentium
  • *****
  • Posts: 1315
  • Karma: 96
    • View Profile
Re: Stereoscopic geometry test
« Reply #12 on: June 03, 2010 »
I recovered an old pair of RG glasses and I'd like to give this a try too. My recent game BackBack

First, this is all just my opinion on this and I may have some of it wrong but I have spent a bit of time on it and it seems to make sense to me even though some of the information I've found online doesn't really agree. In the demo I posted I get quite a good impression of the cubes coming right out the screen and floating somewhere between me and the screen which particularly in movies is something I often have difficulty with especially when there's even slight ghosting so I reckon I'm on the right track. I am of the opinion that any system just using two cameras, real or virtual, will not be quite right

Most of the information I found related to using two cameras with some seperation and either parallel or slight cross over but when I tried that there was always some problems and there were difficulties setting up the camera offsets and the perspective calculations.

So what I'm doing is the transforms to screenspace as usual with the virtual dimensions matching (or somewhere near) real dimensions then instead of the usual perspective I am tracing vectors from every vertex to both eyes and finding the points where they intersect the screen and draw the image using the points for each eye to different buffers then finally combine the buffers. Also, I'm not clipping on the z plane as the objects have to be seen on both sides of the screen but I will have to put it back in in some form (clipping to eyes instead of screen) for more complex scenes.

Because it uses the vertex->eye vectors I think it would work perfectly with headtracking too a long as the actual headtracking was accurate enough.

Offline Dr_D

  • Atari ST
  • ***
  • Posts: 151
  • Karma: 29
    • View Profile
Re: Stereoscopic geometry test
« Reply #13 on: July 24, 2010 »
Heya... I messed around with this a bit a while back. It's pretty fun. I think I need to change the colors in yours for my glasses to work because I have those old style red/blue ones. Anyway, here's the thing I made if you wanna have a look. :p

http://drd.owlbox.net/download.php?id=88


I tried a few things, but where I got the best results was this: Render each eye to a separate image, fudge them over a bit and then blend. So, I moved the left render right by n pixels, and moved the right render left by n pixels.That fudging thing wasn't based on anything except messing around with images in Photoshop. It does seem to look a bit better to me, but that may just be me.
« Last Edit: July 24, 2010 by Dr_D »
The Dr. is INsane!!!

Offline bikerboy

  • Amiga 1200
  • ****
  • Posts: 349
  • Karma: 12
    • View Profile
Re: Stereoscopic geometry test
« Reply #14 on: July 24, 2010 »
Heya... I messed around with this a bit a while back. It's pretty fun. I think I need to change the colors in yours for my glasses to work because I have those old style red/blue ones. Anyway, here's the thing I made if you wanna have a look. :p

http://drd.owlbox.net/download.php?id=88


I tried a few things, but where I got the best results was this: Render each eye to a separate image, fudge them over a bit and then blend. So, I moved the left render right by n pixels, and moved the right render left by n pixels.That fudging thing wasn't based on anything except messing around with images in Photoshop. It does seem to look a bit better to me, but that may just be me.

that is a very nice effect !! and it would also look awesome as a screen saver  :P


Offline Stonemonkey

  • Pentium
  • *****
  • Posts: 1315
  • Karma: 96
    • View Profile
Re: Stereoscopic geometry test
« Reply #15 on: October 31, 2010 »
Been playing around with stereoscopic raytracing, sorry but only colorcode (amber/blue) glasses atm to view this image as it takes ages to draw.

Offline Dr_D

  • Atari ST
  • ***
  • Posts: 151
  • Karma: 29
    • View Profile
Re: Stereoscopic geometry test
« Reply #16 on: October 31, 2010 »
Shit, that's awesome man!
The Dr. is INsane!!!

Offline Clyde

  • A Little Fuzzy Wuzzy
  • DBF Aficionado
  • ******
  • Posts: 7271
  • Karma: 71
    • View Profile
Re: Stereoscopic geometry test
« Reply #17 on: October 31, 2010 »
Loaded that up in paint shop, wOw!
Still Putting The IT Into Gravy
If Only I Knew Then What I Know Now.

Challenge Trophies Won:

Offline ninogenio

  • Pentium
  • *****
  • Posts: 1668
  • Karma: 133
    • View Profile
Re: Stereoscopic geometry test
« Reply #18 on: November 01, 2010 »
after checking my bloody valintine 3d's case i realised i havent got the right glasses but thats awsome work fryer as always :).
Challenge Trophies Won:

Offline Stonemonkey

  • Pentium
  • *****
  • Posts: 1315
  • Karma: 96
    • View Profile
Re: Stereoscopic geometry test
« Reply #19 on: November 01, 2010 »
That's the magenta and green glasses nino? I'll look into how to filter for those. I'm going to tidy up the code a bit too before I post it as it was just done over the weekend and it's all over the place.

Some very good 3d stuff in my bloody valentine, have you seen resident evil 3d? Some fantastic looking scenes in that too, also went to see pirahna 3d and it was awful, it was shot in 2d then converted to 3d and it doesn't work and just becomes distracting and from what I've heard clash of the titans suffered the same.