[GZDoom][pull request]Stereoscopic 3D in gzdoom

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: [GZDoom][pull request]Stereoscopic 3D in gzdoom

Re: [GZDoom][pull request]Stereoscopic 3D in gzdoom

by The Bright Side » Wed Feb 10, 2016 4:54 pm

Wow, thanks so much for your responses, guys. I will tinker around with this some more. I have the glasses at the office with me today and just did the re/green/blue test you posted, and the glasses seem to do a decent job at it.

Re: [GZDoom][pull request]Stereoscopic 3D in gzdoom

by biospud » Wed Feb 10, 2016 1:39 pm

The Bright Side wrote:I'm wondering if any of you guys know if there's a significant difference between red/blue glasses and red/cyan glasses when it comes to red/cyan 3D? Today, I went on a tour throughout my town (Montreal), visiting around 15 stores that I thought might have anaglyph 3D glasses, and I was unable to find anything. It seems like any of that stuff is really hard to come by these days, unless you import from Hong Kong (I did order from there, but it'll be weeks until those packages arrive).

The only pair of glasses I have seem to be red/blue instead of red/cyan, and even when I twist and turn my screen's colour settings, they do virtually nothing in DOOM. It's almost as if I wasn't wearing them. The glasses could be simply crap, but I'm wondering if it's perhaps because the blue lens is really blue, and not so much cyan?

Have you considered adding a red/blue mode to GZ(3)Doom, in addition to red/cyan?
Red/blue glasses should work just as well as red/cyan glasses: with maybe slightly worse color fidelity but slightly reduced stereo crosstalk. But it does take some getting used to. I have not seen anaglyph glasses in a physical store in ages; I usually get them by mail order. I usually mail pairs of paper glasses to folks who send me a friendly private message asking for them.

I should really hurry up and implement a mode for nvidia 3D vision glasses. For folks who are able to use the appropriate monitor, windows computer, and electronic glasses, the experience in a hundred times better than those anaglyph modes give.

Re: [GZDoom][pull request]Stereoscopic 3D in gzdoom

by Rachael » Wed Feb 10, 2016 1:33 pm

Green phosphor already comes through the blue filter on anaglyph 3D glasses. That is why the split is red/cyan and not red/blue.

██████

You should be able to check using those blocks. Put your glasses up to your screen, and put the filtered lenses over the colors. You should notice that through the blue lens, red is nearly black, but the other two come through just fine. On the red filter, green may somewhat come through but barely - it should be nearly black, and blue should actually be black.

If it really bothers you though, enable the red/cyan mode and type this in the console:

Code: Select all

testcolor ff00ff 255
That will render everything except colored sectors magenta and desaturate them too since color information is now useless anyway without the green channel.

If that is really truly better, you'll have to submit a new feature request so that this can be done at the rendering level rather than modifying the level with a debug command.

Re: [GZDoom][pull request]Stereoscopic 3D in gzdoom

by The Bright Side » Wed Feb 10, 2016 12:08 pm

I'm wondering if any of you guys know if there's a significant difference between red/blue glasses and red/cyan glasses when it comes to red/cyan 3D? Today, I went on a tour throughout my town (Montreal), visiting around 15 stores that I thought might have anaglyph 3D glasses, and I was unable to find anything. It seems like any of that stuff is really hard to come by these days, unless you import from Hong Kong (I did order from there, but it'll be weeks until those packages arrive).

The only pair of glasses I have seem to be red/blue instead of red/cyan, and even when I twist and turn my screen's colour settings, they do virtually nothing in DOOM. It's almost as if I wasn't wearing them. The glasses could be simply crap, but I'm wondering if it's perhaps because the blue lens is really blue, and not so much cyan?

Have you considered adding a red/blue mode to GZ(3)Doom, in addition to red/cyan?

Re: [GZDoom][pull request]Stereoscopic 3D in gzdoom

by The Bright Side » Tue Feb 09, 2016 10:56 am

This is awesome, thanks so much for implementing this feature. I got myself a pair of anaglyph red/cyan glasses and right now, I'm seeing a shitload of crosstalk... But after reading up on it, that seems like it's hard to avoid until I find a pair of glasses that match the colour settings of my screen, and/or until I find the right colour settings to stop this madness. Will keep trying... :-) Very much worth it!

Re: [GZDoom][pull request]Stereoscopic 3D in gzdoom

by Rachael » Sun Jan 31, 2016 11:46 am

Gez wrote:Cinemas in my experience have moved to polarized 3D glasses or active shutters
https://en.wikipedia.org/wiki/Polarized_3D_system
https://en.wikipedia.org/wiki/Active_shutter_3D_system
I had a friend once who had a polarized television. I looked at it real close to see how it was actually done - turns out all it does is alternate the row order between left and right on each line. This is quite possible to do on GZDoom - but it would still require a specialized monitor to show it, and GZDoom would have to be aware when it is in Windowed mode whether its window starts on an odd or even line.

GZDoom also would not be able to show this at any non-native resolution on said monitor except in Windowed mode - where it would be expected the desktop itself is set to the monitor's native resolution.

Re: [GZDoom][pull request]Stereoscopic 3D in gzdoom

by Gez » Sun Jan 03, 2016 1:04 pm

You need red-cyan or magenta-green anaglyph glasses.
https://en.wikipedia.org/wiki/Anaglyph_3D

Cinemas in my experience have moved to polarized 3D glasses or active shutters
https://en.wikipedia.org/wiki/Polarized_3D_system
https://en.wikipedia.org/wiki/Active_shutter_3D_system

Re: [GZDoom][pull request]Stereoscopic 3D in gzdoom

by Nash » Sun Jan 03, 2016 12:50 pm

This sounds cool! Can you suggest any brand of glasses where I can see this effect work? Is it like one of those glasses they give you at the cinema for 3D movies?

Re: [GZDoom][pull request]Stereoscopic 3D in gzdoom

by biospud » Fri Jan 01, 2016 7:52 am

Graf Zahl wrote:Looks ok, although the ApplyColormask call in RenderState:Apply seems unnecessary, since all uses of the color mask need to apply immediately.
True, all current code paths apply the color mask immediately. But I felt that ApplyColorMask() is semantically part of Apply(), and during development I thought maybe I might rely on Apply() occuring automatically in some cases, but that did not end up happening. It still seems to me that ApplyColorMask() "belongs" in Apply(), but I agree that it is not currently required for the correct functioning of the program, so perhaps as a minor optimization it should be removed.

Re: [GZDoom][pull request]Stereoscopic 3D in gzdoom

by biospud » Fri Jan 01, 2016 7:46 am

_mental_ wrote:... this branch compiles without a problem.
...including the changes to that branch from yesterday?

Re: [GZDoom][pull request]Stereoscopic 3D in gzdoom

by _mental_ » Thu Dec 31, 2015 1:19 pm

It's impossible to test your changes directly because the old renderer is still used on OS X. After merging and conflicts resolution they seem to work fine.
Also, I can say that this branch compiles without a problem.

Re: [GZDoom][pull request]Stereoscopic 3D in gzdoom

by Graf Zahl » Thu Dec 31, 2015 11:49 am

Looks ok, although the ApplyColormask call in RenderState:Apply seems unnecessary, since all uses of the color mask need to apply immediately.

Re: [GZDoom][pull request]Stereoscopic 3D in gzdoom

by biospud » Thu Dec 31, 2015 11:27 am

Graf Zahl wrote:I think it's ok, except for 3 things:

1. none of the new files contain a copyright/license notice. At least the .cpp files should.
2. I'm not too fond of using std::vector here, because the codebase intentionally avoids using this in favor of its own TArray.
3. Using of glGet... for the color mask. It doesn't harm performance on my system but I don't really know how other drivers behave. Some may actually stall the render pipeline on a glGet call. I think this should better be cached locally, that's what gl_RenderState is there for.
I have fixed all three of these issues. The first two were trivial, and won't require much review.

In the third case, I refactored gl_RenderState to track glColorMask state, and refactored the stereo 3D code to use that state. The 3D modes are working. But I worry that maybe I did not use gl_RenderState quite the way it was meant to be used, since this is my first serious look at gl_RenderState.
_mental_ wrote:I merged stereoscopic 3D into OS X fork and tested it with red/cyan glasses.
This mode looks OK for me with default settings, at least the same as other red/cyan stuff like pictures and videos.
Thanks _mental_ for testing this. Would you be willing to test whether these latest changes also compile correctly, at least, on OS X?

Re: [GZDoom][pull request]Stereoscopic 3D in gzdoom

by biospud » Thu Dec 31, 2015 7:40 am

Graf Zahl wrote:I think it's ok, except for 3 things...
Good. Thank you for taking the time to review the code. I will make these changes, then report back when I've finished.

Re: [GZDoom][pull request]Stereoscopic 3D in gzdoom

by Graf Zahl » Thu Dec 31, 2015 6:26 am

I think it's ok, except for 3 things:

1. none of the new files contain a copyright/license notice. At least the .cpp files should.
2. I'm not too fond of using std::vector here, because the codebase intentionally avoids using this in favor of its own TArray.
3. Using of glGet... for the color mask. It doesn't harm performance on my system but I don't really know how other drivers behave. Some may actually stall the render pipeline on a glGet call. I think this should better be cached locally, that's what gl_RenderState is there for.

Top