Hi,
is there anything like the glfrustum/gluPerspective to produce a fisheye lens which is able to see all 360°?
Thanks.
Greetings
Nope not there, but i guess you could write a vertex program that helps you.
gluPerspective(359, aspect, near, far)?
A vertex program won’t work very well if your polygons are large though will it? I need to be able to do fisheye to. At the moment I render five views instead. In theory it would be quicker to render a single fisheye using a vertex program but it won’t be if I have to split my wall polygons up.
V-man, gluperspective doesn’t work above 179 degrees. It also looks pretty bad above 150.
I think the only way to get good results (unless you have a very high geometry scene) is to render six views and do some processing on the pixels, like this guy has done. http://wouter.fov120.com/gfxengine/fisheyequake/index.html
render normal to a texture and then you use this texture on a warped geometry !
Originally posted by ToolTech:
render normal to a texture
render with 90 degree fov? how am I going to see what’s behind me?
Without using a vertex program I can’t see any way of avoiding rendering more than once.
Sorry. I ment render several normal views…
Matrox has a whitepaper on their developer site about “spherical curvilinear projections”. It won’t give you 360°, but it helps reduce the god-awful distortions you get when using extremely large field-of-views (up to 180°). They also have a demo of this that runs on all DX8 cards.
– Tom
Here’s a little spheremap building demo (VC++ project). http://www.reallyslick.com/src/Reflect.zip
I’ve used this code to build spheremaps for some of my apps. If you’re interested, I think I have a more refined version at home that I could dig up.
Thanks for all the hints.
I think, I will try to render six views and do some processing on the pixels, like the Quake-guy.
It should be possible to get 180° if you render 6 textures to a cube map and put it on a screen-size, hollow inside of a sphere. Then the edges are rounded without segmenting them.
Maybe 360° are possible if you compress the 6 textures on only 5 sides of the cube, leaving the 6th blank and doing the same thing with the sphere.
Kilam.
You guys are making this way too complicated. V-man has the right idea with the gluPerspective, his values might not be right though.
Originally posted by iNsaNEiVaN:
You guys are making this way too complicated. V-man has the right idea with the gluPerspective, his values might not be right though.
Like I said gluPerspective gives poor results at high FOV and gives you a blank screen above 179. This page shows the difference between flat projection (gluPerspective) and spherical projection. http://wouter.fov120.com/gfxengine/fisheyequake/compare.html