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

Follow up to this… If I want to make equirectangular content by converting a cubemap render to equirectangular with projectionTOP, it comes out squished by default to a 1:1 texture the width of the cubemap. If I convert with a projectionTOP and force it to 2:1, is it actually converting it with that resolution as expected with equirectangular content, or am I just scaling up 1:1? Is forcing it to that 2:1 resolution the standard practice for converting to equirectangular from cubemap? should it be the default behavior in TD if you’re converting from cubeMap to equirectangular for it to spit out 2:1?

1 Like

Oh yeah forgot it did this… I feel like 2:1 is correct just from seeing that ratio on every hdri I ever downloaded anywhere.

1:1 def feels like loss of data territory. If you take a cube map, forget about the top and bottom face, that right there is a 4:1 ratio once unwrapped. So that’s got to go somewhere or get lost.

2x1 for Equirectangular is good.

For consistency, we don’t change the output resolution when you change parameters, in this case the output or input type menus parameters.

1 Like