Equirectangular projection resolution

do environment lights care about a 2:1 aspect ratio equirectangular map? I know that’s a typical format, and the aspect ratio of the provided equirectangulars in the samples/maps folder.

My question is, if I’m coming from a 1024x1024 cubemap to a projectionTOP, should i leave the projectionTOP output resolution to use input, generating a 2048x2048 map, or use custom resolution to make it 2048x1024, or 4096x2048? will it have much of an effect on the quality or scaling of the environment light?

I imagine if you’re dealing with 2k on the smaller axis it won’t matter too much. however you’re probably “losing” information encoding it down to a square, or wasting memory/bandwidth, depending on if you err on the small size or larger size.

I think equirectangulars are 2:1 because the image on u wraps around the spheres entire circumference, while the image on v goes only from north pole to south pole of the environment sphere.

Also, environment lights rely on internal mipmaps to generate reflection maps for different roughness levels of a material . So, whatever res you go with ideally you’re using mip map friendly sizes like 1024 , 2048, 4096, etc. Though you can certainly get away with odd resolutions, the lowest mip levels can get weird.

Another way to look at it is a cubemap also represents a “sphere”( imagine a poly smoothed cube, the 6 faces would be spherical) and so I think the top that is converting the cube to equi would be ideally set 2:1 to capture consistent detail density on both axis

1 Like

Thanks @lucasm , this was what I was thinking but was thrown off by the default of converting a cubemap to projectionTOP equirectangular as being a 1:1 image instead of 2:1.

In this case, if I had a cubemap with 6 1024 squares as faces, would the optimal resolution that avoids scaling/wasting pixels for the equirectangular conversion be 4096x2048, or 2048x1024?

That I’m not exactly sure about! Maybe 4kx2k would be a good match, but lower more performant.

My question is really more about how the projectionTOP packs a cubemap; if each face is 1024, is there a custom resolution that is the least demanding, or closest to native resolution to the input texture? I want the equirectangular map to maintain the highest quality before I’m just upscaling