• Welcome to Dark Bit Factory & Gravity.
 

Stereoscopic geometry test

Started by Stonemonkey, May 03, 2010

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Stonemonkey

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.

combatking0

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:

Stonemonkey

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.

Stonemonkey

#3
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.

Stonemonkey

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.

Clyde

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:

Kirl

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:

Kirl

I recovered an old pair of RG glasses and I'd like to give this a try too. My recent game BackBack might be suited to try a bit of stereoscopy on.

I'm not entirely sure about the implementation though. First I thought just offsetting all geometry to left and right would suffice (to render POV of both eyes), but then the balls would never actually 'cross the screen' or pop out like they do in your example (where the colors flip sides).

So now I´m confuzzled, should I adjust the vanishing point for each pov, or what´s the trick?
www.kirl.nl
Challenge Trophies Won:

Jim

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:

bikerboy

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:


Kirl

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:

bikerboy

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


Stonemonkey

Quote from: Kirl on May 20, 2010
I recovered an old pair of RG glasses and I'd like to give this a try too. My recent game BackBack might be suited to try a bit of stereoscopy on.

I'm not entirely sure about the implementation though. First I thought just offsetting all geometry to left and right would suffice (to render POV of both eyes), but then the balls would never actually 'cross the screen' or pop out like they do in your example (where the colors flip sides).

So now I´m confuzzled, should I adjust the vanishing point for each pov, or what´s the trick?

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.

Dr_D

#13
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.
The Dr. is INsane!!!

bikerboy

Quote from: Dr_D 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


Stonemonkey

Been playing around with stereoscopic raytracing, sorry but only colorcode (amber/blue) glasses atm to view this image as it takes ages to draw.

Dr_D

Shit, that's awesome man!
The Dr. is INsane!!!

Clyde

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:

ninogenio

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:

Stonemonkey

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.