Forum Discussion
AngelJ
12 years agoExplorer
Anaglyph 3D in the Rift
I'm adding support for viewing anaglyph 3D in Deskope. I have zero experience with anaglyph 3D and there's not much online about what I'm doing since it's kind of a weird thing to do.
Anyway, since I don't know how it's supposed to look, I'm not a very good tester. Can you tell from these screenshots and my shader code if I'm doing it right?
Deskope 2013-07-12 10-01-36-26.png
Deskope 2013-07-12 10-01-47-15.png
Deskope 2013-07-12 10-01-57-93.png
Anyway, since I don't know how it's supposed to look, I'm not a very good tester. Can you tell from these screenshots and my shader code if I'm doing it right?
Deskope 2013-07-12 10-01-36-26.png
Deskope 2013-07-12 10-01-47-15.png
Deskope 2013-07-12 10-01-57-93.png
sampler Tex0;
float4 BlendColor : register(c0);
// fetch texture and blend with a color
float4 main( float2 Texture : TEXCOORD0 ) : COLOR0
{
return tex2D(Tex0, Texture) * BlendColor;
}
15 Replies
- geekmasterProtegeAnaglyph perception is heavily dependent on viewing natural images. With artificial images like this I keep seeing only whichever eye is dominant at the moment, with occasional glimpses of the correct color. Try the same thing with an anaglyph version of a natural image, like a bowl of fruit and vegetables, or a nature scene with grass and trees and flowers. It helps to see skin tones too (but not too much skin -- we want to be family friendly here, right?)...
:D - AngelJExplorerLike this?
Deskope 2013-07-12 10-55-58-88.png
Deskope 2013-07-12 10-55-23-53.png
Images from http://www.3dtv.at/knowhow/anaglyphcomparison_en.aspx
Are you viewing these in 3D somehow? They shouldn't be viewable in the Rift because of some settings I use for development. - geekmasterProtege
"AngelJ" wrote:
Like this?
...
Images from http://www.3dtv.at/knowhow/anaglyphcomparison_en.aspx
Are you viewing these in 3D somehow? They shouldn't be viewable in the Rift because of some settings I use for development.
MUCH better. The arms look relatively skin color (with a bluish tint that can be corrected by darkening your cyan image a little), but that is generally what you see looking at anaglyph anyway.
I see no yellowish colors in the flower image. It helps to have things like bananas and oranges in the picture for known reference colors. Anaglyph color needs some perceptual cues like that, to prevent the temporarily dominant eye from supplying all the color information.
But yes, much better color than trying to view those color blocks in the earlier post.
I am using wide-eye viewing directly in this web browser, on my desktop LCD panel. - AngelJExplorer
"geekmaster" wrote:
I am using wide-eye viewing directly in this web browser, on my desktop LCD panel.
Oh, I should have turned off the distortion correction then! :lol:
Thanks geekmaster! My shader code was too simple, I thought for sure there had to be more to it. - geekmasterProtegeI would darken the cyan filter a bit, to get better skin tones. Perhaps that could be user-adjustable, but I think a constant value that looks good in skin flicks as judged by yourself may well suffice. ;)
Team AngelJ! ;) - AngelJExplorer
"geekmaster" wrote:
I would darken the cyan filter a bit, to get better skin tones. Perhaps that could be user-adjustable.
Maybe it's not as simple as I thought. I thought you were saying those color issues came with the territory with anaglyph. Currently what I'm doing is super simple: for BlendColor I provide RGB(1, 0, 0) for the left eye and RGB(0, 1, 1) for the right eye.
Is there maybe room for improvement over paper anaglyph glasses since we have a software filter rather than a physical one? Would user-adjustable be best or maybe there's some fancy algorithm to do this dynamically?"geekmaster" wrote:
Team AngelJ!
:lol: - geekmasterProtege
"AngelJ" wrote:
... Currently what I'm doing is super simple: for BlendColor I provide RGB(1, 0, 0) for the left eye and RGB(0, 1, 1) for the right eye.
Without looking at the code right now to answer my own questions:
1) Are those floats?
2) Can you decrease G+B or increase R a little to achieve improved color balance (over what normal anaglyph glasses typically provide, depending on color filter quality)? - AngelJExplorer
"geekmaster" wrote:
Without looking at the code right now to answer my own questions:
1) Are those floats?
2) Can you decrease G+B or increase R a little to achieve improved color balance (over what normal anaglyph glasses typically provide, depending on color filter quality)?
I only posted my pixel shader code, and it's so simple it'll probably take you longer to read this post. :P
1) Yup, BlendColor is a float4.
2) Yeah, I can provide any color to the shader. But from the little research I did I thought it was as simple as providing pure red / cyan, green / magenta, or blue / yellow since the algorithms that make anaglyph images assume that's what they're going to be filtered through. - geekmasterProtegeWhat you have works fine, but even REAL anaglyph glasses can have color tint adjustments in the pigments. Although not required, better skin tones could possibly enhance immersion a bit (or some approximation of it, considering that it is anaglyph after all).
Not critical, but if not hard, then why not? Just fudge those '1' numbers a bit, perhaps? - AngelJExplorer
"geekmaster" wrote:
Not critical, but if not hard, then why not?
This was exactly my attitude about adding anaglyph support in the first place! :lol:"geekmaster" wrote:
Just fudge those '1' numbers a bit, perhaps?
Yeah, I'll do some experimenting later. It helps to know that colors are supposed to look natural after your eyes blend the images together. Like I said, I have no experience with anaglyph.
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 8 months ago
- 4 months ago
- 2 years ago
- 10 years ago