Limitations regarding textures

How would I go about texturing a surface, that is rectangular but not square (for example, 2:1) and the texture is supposed to fit exactly, considering the constraints you are mentioning here:


For optimal performance, texture images used in a definition should be square and with a size a power of two (128x128px, 256x256px, etc…). If textures don’t follow these requirements, they will be resized by our servers.

What exactly does resizing do to the texture? For example, had I created a texture of 512x256 pixes to match the ratio of the rectangular surface, would the texture be stretched along its small edges to 512x512?

You can simply use a rectangular texture on a surface of the same ratio even without mapping. The texture will be resized to square behind the scenes but you will get visually correct result. However, this extra processing step costs computation time and it’s fine if you have only one or a few surfaces (images).

Texture size in power of two is for performance optimisation and it has to do with the way computers manage and process data in limited ‘chunks’, rather than all at once. More on this topic here. The best way is to create a power of two 512 x 512 “deformed image” and then apply a texture mapping that stretches the image back to the required result. This tutorial explains different aspects of texturing in depth.

1 Like

Thanks @pavol for this comprehensive explanation. That clears it up for me.