Maintaining length/width ratio when UV mapping

Is there a way I can maintain the length/width ratio of my unwrapped mesh when I’m UV mapping?

Basically, I’m modeling a room. Let’s say one wall is 10 units long and 4 units high. When I unwrap it into the UV image editor and there isn’t an image loaded, it’s the correct ratio. As soon as I load an image, the ratio gets messed up (no longer 10:4). I want to keep the original ratio so that the texture I’m using won’t be stretched in any direction.

Keep your image that you are using in the same ratio as the object you are texturing. Imagine a textured plane as a canvas for a painting. If the planel was not the same ratio as the picture, it would get all squashed. Like putting the Mona Lisa on the wall you mention, it would have to be all squashed to fit. In your example, you would load an image that is 100x40 pixels.

If you dont want to do that, then after you load, select all the UV’s and Scale them in the Y direction.

Hmm… what I’ve made is a texture that represents say 1m x 3m. All my walls are 3m high, but they vary in width. So, what I want to do is just have that texture repeated horizontally to match the width of a wall without any stretching (which is why I want to maintain the original ratio of my walls).

I guess I can rescale the UV’s by eye, but is there a way to just keep them in their original ratio? Or scale them exactly?

In the texture panel is a repeats buttons and settings to control how many times a texture repeats for a material. X or Y is horizontal depending on the Orco local axis of the wall.

To keep the UV’s in their original ratio, by that you mean keep them in ratio to their corresponding vertices, keep the UVtexture in the same ratio as the mesh.