<p>Assuming your final image is the world map (see Figure 1), if you were looking at the equator, the <code>cubemap width * 4</code> would fit perfectly. But: If you move north or south of the equator, your pixels in the equirectangular image will remain constant, while the number of cubemap pixels will decrease. If you are at the poles, you will have about 1 pixel in the cubemap and still 4096 pixels in the equirectangular image. Figure 2 shows how a cubemap is mapped onto an equirectangular image. There you can see that the black lines at the bottom and top represent about 1 pixel in the cubemap.</p>
<p><strong>Figure1</strong></p>
<p><a href="https://i.sstatic.net/hqErE.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/hqErE.jpg" alt="enter image description here" /></a></p>
<p><strong>Figure2</strong>
<a href="https://i.sstatic.net/DRuSE.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/DRuSE.png" alt="enter image description here" /></a></p>

CC BY-SA 4.0
2024-03-05T13:52:53.123Z
2024-03-05T13:52:53.123Z
Thomas
<p>Suppose I want to render out 6 cubemap cameras (90 degree FOV etc.) with the intention of combining them together in post-production into an equirectangular (latlong, 2:1) image.</p>
<p>Suppose I also know the intended final resolution of the equirectangular image - for arguments sake, let's say it's 4096 x 2048.</p>
<p>What resolution of each individual cubemap face would I need in order for there to be no perceivable loss of resolution when going from cubemap -&gt; equirectangular?</p>
<p>The first, perhaps naïve thought is that the width/height of the cubemap image would need to be a quarter of the size of the final equirectangular image, but it seems to me that because of the reprojection, some fidelity will be lost, and that I would actually need a higher resolution cubemap face to start from, but I can't find any reference to a formula for this online. I can of course go via trial and error, comparing against a 'ground truth' spherical camera rendering of the same scene, but I'm just wondering if there is an efficient way of working this out.</p>

<projections>
Formula for cubemap resolution for intended equirectangular resolution
kinkersnick
# Formula for cubemap resolution for intended equirectangular resolution

(Asked by: username_0 on 2024-03-04)

Suppose I want to render out 6 cubemap cameras (90 degree FOV etc.) with the intention of combining them together in post-production into an equirectangular (latlong, 2:1) image.

Suppose I also know the intended final resolution of the equirectangular image - for arguments sake, let's say it's 4096 x 2048.

What resolution of each individual cubemap face would I need in order for there to be no perceivable loss of resolution when going from cubemap -> equirectangular?

The first, perhaps naïve thought is that the width/height of the cubemap image would need to be a quarter of the size of the final equirectangular image, but it seems to me that because of the reprojection, some fidelity will be lost, and that I would actually need a higher resolution cubemap face to start from, but I can't find any reference to a formula for this online. I can of course go via trial and error, comparing against a 'ground truth' spherical camera rendering of the same scene, but I'm just wondering if there is an efficient way of working this out.

**Tags:** projections


---

## 1 answers

### Answer by username_1 on 2024-03-05. Score: 0

Assuming your final image is the world map (see Figure 1), if you were looking at the equator, the `cubemap width * 4` would fit perfectly. But: If you move north or south of the equator, your pixels in the equirectangular image will remain constant, while the number of cubemap pixels will decrease. If you are at the poles, you will have about 1 pixel in the cubemap and still 4096 pixels in the equirectangular image. Figure 2 shows how a cubemap is mapped onto an equirectangular image. There you can see that the black lines at the bottom and top represent about 1 pixel in the cubemap.

**Figure1**

[![enter image description here](https://i.sstatic.net/hqErE.jpg)](https://i.sstatic.net/hqErE.jpg)

**Figure2**
[![enter image description here](https://i.sstatic.net/DRuSE.png)](https://i.sstatic.net/DRuSE.png)


---

