08-23-2014 12:02 PM
I've had an experience similar to what you describe - not being able to focus on the reflected image quite right in scenes rendered in the rift (not just unity, but toolbag 1 and 2 and half life 2).
In the real world you'd get slightly different reflection images because each eye has a slightly different perspective on the shiny object, but you're right that in real life you can resolve images on such objects (at any distance including infinity). So I don't really buy " "" "'s explanation there - the problem i've experienced isn't insufficient reflection parallax but the opposite. I'll have to defer to him somewhat though since he has the goggles!
08-25-2014 08:30 AM
08-25-2014 08:26 PM
08-26-2014 03:10 AM
08-26-2014 02:45 PM
08-26-2014 05:46 PM
"Infinite" wrote:
I wonder if this is a shader implementation issue, an engine issue, or SDK issue?
08-27-2014 05:47 AM
"owenwp" wrote:
The problem with conventional environment maps is that they are effectively reflecting light from infinitely far away. That's fine for the sky, but for closer objects it looks obviously wrong.
Parallax corrected cube maps are one fair alternative, and Unreal 4 uses them extensively. Specular from point light sources should also be correct.
The ultimate answer is we need true real time global illumination to give us correct per-pixel reflections.
"vrdaveb" wrote:"Infinite" wrote:
I wonder if this is a shader implementation issue, an engine issue, or SDK issue?
In most cases, it is a shader issue. The game needs to render the reflected image with the correct projection. That usually means an off-axis frustum. Unity's mirror shader seemes to do it right, but Shyshop might be doing something else.
08-27-2014 11:34 AM
I'm wondering if you've tried Skyshop's parallax corrected reflections (box projected skies) and if they help at all.
Also, as of Skyshop 1.08 or 09, I've converted to computing the eye vector as _WorldSpaceCameraPos - worldPos instead of relying on Unity's viewDir parameter. If this has fixed reflections, viewDir derivation in Unity's shader system is to blame. If this does not fix it, I'm willing to bet cameraPos is not configured properly for the two eyes.
If someone from Unity or Oculus could tell us how the two cameras are derived and which matrix the eye split is stored in, we'd have more clues to go off of.
Ah yes, this old problem. Andres and I spent a bit of time discussing it this morning. The conclusion is that we still aren't sure 😛 I can I think rule out a few things though, and I have one more guess.
One is that it's not an issue of parallax correcting the cube map (or rather, that's a different problem). Surfaces should be able to be rendered with infinite reflections without the painful artifacts we've seen. Proper parallax correction of cube environment maps would be a nice improvement for local reflections, but I don't think that's what we're dealing with here.
I think I can also fairly safely rule out some trivial bugs on our part regarding off-axis frustums or the like - we do very carefully use the correct camera positions from the SDK, as do many other apps, and the problem still remains in all of them. If you're using Skyshop in unity specifically, and there's some discrepancy between the unity shaders and ours, then there's likely a bug, and we'd like to hear more, as Andres says.
I have a reflective sphere on my desk, because I'm that kind of person. When I pick it up and hold it at arms length, and alternately close each eye, I can't tell much difference between the reflected images. If I move it much closer to my nose however and do the same, I can tell a large difference between each eye. With both eyes open its not possible for me to converge on features reflecting near the edges of the sphere (where there is the most distortion). This, qualitatively, is the same sensation I get with the headset on. Try it!
So, a new theory:
It's hard to resolve reflections when the object size/distance is comparable to your eye separation distance. This is because the distorted reflections vary so drastically from one eye to the other that your brain can't quite resolve it as a clear image. So I think one has to be careful noting the eye separation distance vs the distance to the subject - since one doesn't have focal cues with the headset on you have to be careful that you aren't "holding your subject against your nose" so to speak, as reflections are more sensitive than general parallax is to this effect.
Hope that's helpful,
08-27-2014 02:49 PM
"Infinite" wrote:
Would you be able to link to an example of the mirror shader you mentioned?
08-28-2014 05:39 AM