Up and Coming
June 1, 2013
Creating fisheye views with the Unity3D engine
- 9 replies
- 12029 views
I have been posting for some time here and at MTBS3D that we really need to stop doing the Rift pre-warp so late in the rendering pipeline (which adds more distortion artifacts of its own, that people have been complaining about).
It is my firm belief that the correct method of providing a fisheye view that compensates for the Rift lens pincushion distortion is by using a virtual fisheye lens on the virtual camera(s), as documented by Paul Bourke back in 2004 (with source code).
EDIT: The 2011 example from Paul Bourke (quoted below) may not be a good example of the fisheye lens modelling that I have suggested previously. His 2004 article remains appropriate for our needs, however.
The tragic news about the senseless death of Oculus co-founder Andrew Reisse led me to this post that he made on this forum:
Notice that each render pass yields a 90-degree FoV, when are then combined into a 180-to-250-degree FoV. For the Rift, we do not need this much. We do not need more than 110-degrees FoV under any circumstances, and they way most people seem to configure their Rifts, less than 90-degrees should be plenty. For 90-degree FoV, we only need a single-pass render, so we can get by with less processing power than a multi-pass rendering method would require.
That page liked above also says "A discussion of the general technique for a 180 degree fisheye and 4 cube faces can also be found here":
It is my firm belief that the correct method of providing a fisheye view that compensates for the Rift lens pincushion distortion is by using a virtual fisheye lens on the virtual camera(s), as documented by Paul Bourke back in 2004 (with source code).
EDIT: The 2011 example from Paul Bourke (quoted below) may not be a good example of the fisheye lens modelling that I have suggested previously. His 2004 article remains appropriate for our needs, however.
The tragic news about the senseless death of Oculus co-founder Andrew Reisse led me to this post that he made on this forum:
"At
Creating fisheye views with the Unity3D engine
...
Here I discuss a means of producing a fisheye image using the Unity3D gaming engine. The approach has been introduced here for the spherical mirror. In that case a 180 degree fisheye is generated and subsequently warped. A 180 degree field of view can be achieved with a 4 pass approach, that is, 4 renders with camera frustums passing through the vertices of a cube with the view direction towards the midpoint of the edge between the left and right faces of the cube. In the following a wider field of view is created, namely up to a maximum of 250 degrees. It is based upon the same multipass render approach except now 5 cube faces are used, left-right-top-bottom-front, and the view direction is towards the centre of the front face. ...
A small sample Unity3D (Pro required) that illustrates a 210 and 240 degree fisheye is provided: Unity_5cube2fish.zip.
Notice that each render pass yields a 90-degree FoV, when are then combined into a 180-to-250-degree FoV. For the Rift, we do not need this much. We do not need more than 110-degrees FoV under any circumstances, and they way most people seem to configure their Rifts, less than 90-degrees should be plenty. For 90-degree FoV, we only need a single-pass render, so we can get by with less processing power than a multi-pass rendering method would require.
That page liked above also says "A discussion of the general technique for a 180 degree fisheye and 4 cube faces can also be found here":
"At The Right Stuff" to me! :D
