Texture sizes that is other than a square?

(Merlin The Wiz4rd) #1


I have a question regarding texture sizes other than a square (1:1).

I currently have a texture that is at a ratio of 2:1 (2048x1024) and it seams to get compressed when importing it to the ratio of 1:1 instead of keeping the correct ratio of the image. Is there a way to correct this other than making a square texture instead?


(Mrchlblng) #2

Hey @MerlinTheWiz4rd,

our texture processing is a bit complex. We have 3 flavours for textures:

  1. the original file (converted to png/jpg as it needs to be readable by the browser): the resolution is unchanged; if the original format is not png or jpg, we convert to png hopefully not modifying pixels and we keep the dimension as they are
  2. from the original file, we generate a 32x32 png used for thumbnail in the editor and as a "preview" texture (until bigger resolution are downloaded); if a dimension is bigger than a threshold (today set at 4096), we generate a version that is will be usable by most devices and that keeps the ratio
  3. after materials are changed, we optimize textures and generate a bunch of versions that should preserve the aspect ratio

Generation of images 2. and 3. may take a bit of time so you might temporarily not see all these files.

That being said, we always try to keep the aspect ratio and we should only change the ratio if

  • some dimension is greater than our threshold; as we want to keep the highest number of pixels, the way we clamp dimensions may break the aspect ratio
  • dimensions are not power-of-2: same thing as above, we try to keep as many pixels from the original texture so it might break the aspect ratio

I hope this clarifies the way we handle textures. If after a little while (just letting some time for us to process your images) you still think that the texture being used is not correct, let us know!