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.

Thanks!

Link to comment
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.

Link to comment
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:

http://paulbourke.net/dome/unity3d/

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.

thanks

Link to comment
Share on other sites

  • 3 weeks later...

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
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...