Jump to content

Fisheye projection for the Viewport?

Recommended Posts

Does anyone know whether or not a fisheye projection is possible to write for the viewport? I'm looking around on behalf of a friend, and I think it might be possible, from perusing the HDK, but can't tell for sure. If anyone knows whether this is possible or impossible, either way, it'd be great to know.


Share this post

Link to post
Share on other sites

No, you pretty much can't do this at the moment. Large angle FOV projections will severely mangle geometry with large triangles, so it'd have to render to a cubemap, then sample from there into a regular 2D image using a lens shader. I don't think that you could accomplish this with the HDK right now.

You could render a cubemap with the GL ROP in 16.0 and post-process that, though.

Share this post

Link to post
Share on other sites

Hi Mark,

goldleaf was asking about custom projections in the houdini openGL viewport on my behalf.

Thanks goldleaf!

It sounds like from your description, unfortunately, it's currently not possible.

However, I just wanted to check into your cubemap idea.

Here is an article about how someone creates a real time openGL fisheye in unity:


i.e. 5 cameras facing outwards, each with a 90 degree fov. their resulting openGL views are then mapped onto a spherical piece of geometry with their UVs set appropriately, in front of the scene camera. Such that the scene camera sees the view of the 5 cameras mapped onto the spherical geometry in real time. Giving the illusion of a fisheye ray.

Just wanted to check if there is any possibility of mimicking this approach, before closing this thread.


Share this post

Link to post
Share on other sites

It's sort of possible. You can write a HDK scene hook which completely takes over the beauty pass, then renders the scene 5x with 5 different projections to a cubemap. Then you'd take that cubemap as a texture input to a GLSL shader which does the fisheye lookup and writes it to the beauty pass framebuffer. I say "sort of" because the rendered image will be out of sync with everything else in the viewport, such as picking, handles, construction plane, etc. so in my mind it's not really a valid solution (more of a hack). This is probably something that'd be better in the OpenGL ROP or the Flipbook, which is less concerned about those other things.

  • Like 1

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now