sensics / OSVR-RenderManager

Apache License 2.0
64 stars 45 forks source link

Overfill factor and distortion correction #369

Closed YxingC closed 5 years ago

YxingC commented 5 years ago

When overfill and distance scale not equal to 1, it might have some problem in current implementation. For example, if overfill=1.25 and distance scale = 2 and COP=(0.5,0.5), then origin four corners of uv will times overfill first, then map into D space(distance scale). Overfill factor make uv become (-0.125, -0.125), (1.125, -0.125), (-0.125, 1.125), (1.125, 1.125). After map into D space, everything got wrong. It doesn't consider that overfill will make uv not keep in range 0 - 1.

russell-taylor commented 5 years ago

The relationship among these values and how they are supposed to behave is described in some detail in an upcoming book chapter at https://www.reliasolve.com/wp-content/uploads/2018/05/VR_Concepts_Illustrated_Using_OSVR.pdf which hopefully clarifies the interdependence among these parameters. See the "Overfill and Oversampling" section for how the math is handled when overfill is set larger than 1.

If your concern is theoretical, then the above reference should clarify it. If the problem is that you are seeing unexpected rendering behavior, please describe "everything got wrong" more specifically so I can try to help debug.

YxingC commented 5 years ago

Thanks for your replied and info you gave. I think that I understand concept of overfill. I gave the wrong value in config file, which cause that error. I'm sorry for taking your time.