Jump to content

Real 3d with anaglyph glasses


Aily
 Share

Recommended Posts

I found that my geForce 250GTS can render stereoscopic graphics in games. I need only glasses. Maybe somewhere have glasses for Nvidia Vision, but in my town little complex to find such, and it will be cost a lot.

 

Yesterday i went to the book store and by book about dinosaurs for kids with anaglyph images and GLASSES!!!! 4$ it cost for me.

 

Left eye - red (1,0,0)

Right eye - cyan (0,1,1)

 

It's simplest stereo rendering technology in world, but it's so amazing to play all games with it!!!

 

Tutorial to enable here:

http://3dvision-blog.com/tag/red-cyan-glasses/

 

After this all i run Leadwerks and so sad that OpenGL can't render stereo by default :P

 

So today i write simple postfilter for Leadwerks, that explode result image by two color channels depending on Z-buffer, GUYS!!!! TUNNELS EXAMPLE IS FANTASTIC LOKKING NOW!!!!

 

Here is image (look on it in colored glasses), and shader. Put shader in "shaders\PostFilters\HNPHan" - you will loose FSAA, but you can play with real 3D!

post-260-0-14664300-1309660999_thumb.jpg

anaglyph.rar

"Better" is big enemy of "good"

Link to comment
Share on other sites

Yeah, tried this a while back with my nVidea driver as my copy of Batman Arkham Asylum came with a set of coloured 3D glasses. It was really impressive but I found I couldn't watch anything for more than about half an hour before my eyes started to hurt. I tried Batman, Stalker COP, Mass Effect, Dreamfall and Crysis! Never tried any Leadwerks. The modern shutter glasses are way better people tell me (much clearer 3D effects) and you can use those for hours with no bad effects :P

Intel Core i5 2.66 GHz, Asus P7P55D, 8Gb DDR3 RAM, GTX460 1Gb DDR5, Windows 7 (x64), LE Editor, GMax, 3DWS, UU3D Pro, Texture Maker Pro, Shader Map Pro. Development language: C/C++

Link to comment
Share on other sites

Yeah, tried this a while back with my nVidea driver as my copy of Batman Arkham Asylum came with a set of coloured 3D glasses. It was really impressive but I found I couldn't watch anything for more than about half an hour before my eyes started to hurt. I tried Batman, Stalker COP, Mass Effect, Dreamfall and Crysis! Never tried any Leadwerks. The modern shutter glasses are way better people tell me (much clearer 3D effects) and you can use those for hours with no bad effects :)

 

Agree with you :) But current i can't change my money to cool glases, so, will be use this extreme brain explosives :)

"Better" is big enemy of "good"

Link to comment
Share on other sites

Agree with you :) But current i can't change my money to cool glases, so, will be use this extreme brain explosives :)

Yeah me too :)

Intel Core i5 2.66 GHz, Asus P7P55D, 8Gb DDR3 RAM, GTX460 1Gb DDR5, Windows 7 (x64), LE Editor, GMax, 3DWS, UU3D Pro, Texture Maker Pro, Shader Map Pro. Development language: C/C++

Link to comment
Share on other sites

Oh, you can make those expensive glasses yourself, even turn regular LCD into 3DTV with the right kind of cellophane for like 10$... i've experimented with this stuff a lot.. and other "VR" methods, I even written my own webcam lights/eyes tracker.. if you're lucky enough to own a projector, you must try build yourself one of these:

 

I haven't looked at your shader yet, but there's some things that can be done to make red/cyan anaglyph more pleasing and minimize eye strain. The biggest offender is the red channel, so it's best to tone it down, usually they put in the red channel just the grayscale version of the image and in cyan only the green and blue, or use a specialized weighted grayscale for the red channel.. I can't find the website right now which had great articles about optimizing red/cyan colors.. another thing is the separation of the left and right images, if it's too big, it causes a LOT of strain on the eye and if it's too little the 3d effect diminishes leaving only dull colors.. From the looks of it you made this as a post filter only? Going from single rendered frame? ... i've never thought you can get as much out of it.. the way i've done it was with 2 seperate renders of my scene (with dynamic offset depending on where the view focus was), but it halved my frame rate this way :rolleyes: ... will try your method out

Link to comment
Share on other sites

  • 2 weeks later...

Oh, you can make those expensive glasses yourself, even turn regular LCD into 3DTV with the right kind of cellophane for like 10$... i've experimented with this stuff a lot.. and other "VR" methods, I even written my own webcam lights/eyes tracker.. if you're lucky enough to own a projector, you must try build yourself one of these:

 

I haven't looked at your shader yet, but there's some things that can be done to make red/cyan anaglyph more pleasing and minimize eye strain. The biggest offender is the red channel, so it's best to tone it down, usually they put in the red channel just the grayscale version of the image and in cyan only the green and blue, or use a specialized weighted grayscale for the red channel.. I can't find the website right now which had great articles about optimizing red/cyan colors.. another thing is the separation of the left and right images, if it's too big, it causes a LOT of strain on the eye and if it's too little the 3d effect diminishes leaving only dull colors.. From the looks of it you made this as a post filter only? Going from single rendered frame? ... i've never thought you can get as much out of it.. the way i've done it was with 2 seperate renders of my scene (with dynamic offset depending on where the view focus was), but it halved my frame rate this way :( ... will try your method out

 

Thanks for info about grayscale in red channel, will try it :D

And yeah, it's postfilter, very easy to implement. It's not real 3-D, but objects is far or near on screen, i thinking thats enough :D

"Better" is big enemy of "good"

Link to comment
Share on other sites

Depth is too strong :rolleyes: Possible to break eyes

 

#define COLOR texture1
#define DEPTH texture3

uniform sampler2D COLOR;
uniform sampler2D DEPTH;

uniform vec2 buffersize;
uniform vec2 camerarange;
uniform float camerazoom;

include "depthtozposition.frag"

void main( void )
{
vec2 ps = 1.0 / buffersize;
vec2 tc= gl_FragCoord.xy / buffersize.xy;

float depth = texture2D( DEPTH, tc ).x;
float lineardepth = DepthToZPosition( depth );

float shift=clamp(lineardepth,0,10)/2;                          ///     divide color shift.

vec4 color_l=texture2D(COLOR,vec2(tc.x-ps.x*shift,tc.y));
vec4 color_r=texture2D(COLOR,vec2(tc.x+ps.x*shift,tc.y));

vec4 left=color_l*vec4(0,1,1,1);
vec4 right=color_r*vec4(1,0,0,1);

gl_FragColor=left+right;
}

"Better" is big enemy of "good"

Link to comment
Share on other sites

Guest Red Ocktober

this is cool... and not to take away from this... but you guys know my feelings on this sorta stuff...

 

this short vid will give you an idea of what "real" 3d virtual reality is all about...

 

would you walk out on some scaffolding near the top of a skyscraper... check out the reaction of some people who've been immersed into the virtual world atop a skyscraper...

 

--Mike

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...