Page 1 of 1
Feature/tool request: Rectilinear Panorama
Posted: Sun Jun 09, 2024 12:48 am
by speltrong
Hi
I'd like to produce a very wide rectilinear panoramic image that covers up to 360 degrees of horizontal FOV if possible. I tried the various panoramic modes available, but there doesn't seem to be a way to undistort them.
I know there's software out there like Hugin that does this in post, but it'd be amazing to have that option built into the Universal/Panoramic camera so I can edit the scene and have it show up in the flat pano in realtime. Would it be possible to code something like this into Octane?
https://community.theta360.guide/t/hugi ... image/1271
Thanks!
-s
Re: Feature/tool request: Rectilinear Panorama
Posted: Mon Jun 10, 2024 12:12 am
by speltrong
After doing a bunch of research on projection, I'm not convinced it's possible to get what I really want anymore, but maybe implementing Miller or Compact Miller Cylindrical Projection would allow for some less-distorted wide fov/aspect images.
https://en.wikipedia.org/wiki/Miller_cy ... projection
Re: Feature/tool request: Rectilinear Panorama
Posted: Mon Jun 10, 2024 11:17 pm
by speltrong
one other thing that might be useful: +Z/-X/-Z/+X and/or -X/-Z/+X/+Z cubemap layouts (4x1s in the right order) to get a rectilinear-ish pano that makes sense while editing. Probably need the ability to flip the panels horizontally as well.
Re: Feature/tool request: Rectilinear Panorama
Posted: Tue Jun 11, 2024 4:24 pm
by frankmci
speltrong wrote:I'd like to produce a very wide rectilinear panoramic image that covers up to 360 degrees of horizontal FOV if possible. I tried the various panoramic modes available, but there doesn't seem to be a way to undistort them.
If I understand you correctly, no, there is no way to undistort an entire panoramic image (or perhaps more accurately, differently distort the entire image to look more like is single vector view perspective image) without discarding image area/information as well as a loss of image quality. The only way to view an "undistorted" panorama is from the center of 3D space containing the wrap-around image, whether that be spherical, cylindrical, or cubic. And that depends of the physical limitations of human sight.
You may be thinking of panoramas with relatively narrow vertical apertures that omit the most "distorted" areas. There will always be distortion perpendicular to the axis of rotation, that increases with distance to the image center along the same axis. Interactive panorama viewers invert the distortion (spherical, cylindrical, cubic) of a subsection of the image on the fly to show you an undistorted sample area of the image, but it can't be done of the whole image at once. Those viewer are digitally mimicking the limited view of a 3D space that holds the distorted image in its appropriate 3D form.
What is it you want to do with this 360 panorama? I may very well be misunderstanding you.
Re: Feature/tool request: Rectilinear Panorama
Posted: Tue Jun 11, 2024 4:58 pm
by speltrong
Thanks for the reply - that all makes sense.
I was mainly doing research for a guide on the Panoramic camera modes, and came to a lot of the same conclusions that you mentioned when diving into projections more.
https://www.behance.net/gallery/2007193 ... es-for-C4D
I think ultimately what I'd like to see is just a few more projection options for making less-distorted vertical center-crop flat panoramas (as opposed to utility ones for HDRIs, etc). I've given up on some magic conversion of spherical>rectilinear
Right now when the vertical FoV goes over maybe 60 degrees, the tops and bottoms get super wonky with Spherical/Equirectangular, and much worse with Cylindrical (which I believe is straight Mercator?).
I came across Miller and Compact Miller projections which are compromise forms of cylindrical projection that might give a bit more usable vertical FoV if I'm thinking about this right. I also think just a version of Cube map that has the tiles reordered could work well (+/-X and +/-Z ordered so they stitch properly in a row) in some scenes could also give some good results.
https://en.wikipedia.org/wiki/Miller_cy ... projection
-s
Re: Feature/tool request: Rectilinear Panorama
Posted: Tue Jun 11, 2024 6:54 pm
by frankmci
Yes, I think you are on the right track. The various projections of a sphere are all compromises of one sort or another. The few times I've needed to do full 360 x 180 panoramas, I've gone with cubic mapping. For simplicity's sake, I've built my own six camera rig for this, so that I have complete control of the image placement, and combine them in post (AE for animations, PS for stills). For post editing, cubic is certainly the easiest to wrap your head around and is nearly WYSIWYG.
One thing you might look into, which can be kind of fun, is using a mirror sphere/ellipsoid instead of a pano camera and baking its texture to generate your image. By altering the curvature of the sphere/sphereoid you can control amount of distortion at any given distance from center, although the total distortion will always be the same if you want to sample the full 180 vertical degrees. For instance, simply scaling the sphere up on the Y axis will shift the greatest distortion toward the top and bottom of the image in a smoothly graduated fashion. This way you can bias the least distortion toward the vertical center of the image.