7

Update

This is now possibly natively as of 2.74. See my answer below.


Is it possible to render a panorama in cycles that is not a full 360x180 view?

E.g. 360° x 30°?

How can I achieve this?

gandalf3
  • 157,169
  • 58
  • 601
  • 1,133
  • The panoramic camera has three types - the two fisheye types have field of view / fov and lens – sambler Dec 15 '13 at 07:40
  • @sambler I only see FOV on Fisheye Equidistant. Anyway, I was hoping for something that looked more like a stitched panorama (not a fisheye lens). – gandalf3 Dec 16 '13 at 02:56

3 Answers3

4

This is not a very efficient way of doing this because it requires rendering the entire $360^\circ \times 180^\circ$ image and then cropping off a good chunk of it, but it seems to be the only option.

Here is a diagram:

enter image description here

$H$ is the height of the $360^\circ \times 180^\circ$ image, $h$ is the height of the cropped ($360°\times n^\circ$) image, and $n$ is the desired angle. When $n$ is $180^\circ$ we can see that $D$ would be $\frac{1}{2}$ the height of the image so $D=\frac{H}{2}$. From here it is just a little simple trigonometry and we can get:

$$ h = \sin(\frac{n}{2})\frac{H}{2}2 = \sin(\frac{n}{2})H $$

Using your example of $30^\circ$ we get $h = \sin(15) H ≈ 0.26 H$ A slight rearrangement gives $H ≈ \frac{h}{0.26}$ which you can use to plug in the desired height and get the height you must use to render.

Omar Emara
  • 22,639
  • 5
  • 55
  • 103
PGmath
  • 25,106
  • 17
  • 103
  • 199
  • Some using some python to set the render border should fix the efficiency problem. (will accept after I test it) – gandalf3 Nov 06 '14 at 20:32
3

This is now possible as of this commit (will be in 2.74).

Cycles: Adding field-of-view options to the equirectangular panorama camera

This patch adds the option to set minimum/maximum latitude/longitude values for the equirectangular panorama camera in Cycles, as discussed in T34400.

gandalf3
  • 157,169
  • 58
  • 601
  • 1,133
1

360°x180° puts out a 2d image that's distorted so that the angles are now x and y axis correct?

Just render the 360°x180° and cut the x120° (two thirds of the 180°) that you don't want off?

B Newmark
  • 1,240
  • 1
  • 12
  • 12
  • Could you add how to determine how many pixels to cut off? (convert degrees to pixels?) – gandalf3 Dec 17 '13 at 19:18
  • 1
    @gandalf3 to simply crop the 360x180 image to be the same size as a 360x(n) image you can use the formula h'=h*sin(n/2). Where h' is the height of the new image and h is the height of the 360x180 image. – PGmath Nov 05 '14 at 21:35
  • @PGmath Throw that in an answer and I'll accept it ;) – gandalf3 Nov 05 '14 at 21:46