Home Technical Talk

1024x512 texture stretching?

polycounter lvl 17
Offline / Send Message
Nate Broach polycounter lvl 17
Alright this is a noobish question but I've never made a texture that wasn't a square, and I wanted to try and make one that was a 1024x512. But when I changed the width and height it just stretches the texture. Like this...
helpme.jpg

how do I change it to a 1024x512 without it stretching the texture?

Edit: Im using Max 9

Replies

  • Asthane
    Options
    Offline / Send Message
    Asthane polycounter lvl 18
    I can't say anything about Max in particular, but UV co-ordinates are stored with a floating point number from 0-1 on each axis rather than pixel values, so while some programs can only display a square UV space, games will interpret it properly. One thing you can do is lay out your UV's from 0-2 on one axis (That is, half of your uvs outside of the box) and then scale them by half when you're done laying them out. They'll look squashed, but work properly.

    That said, Max may have an option to do it 'right', if so, I'm sure someone will mention it and make my post useless tongue.gif
  • killingpeople
    Options
    Offline / Send Message
    killingpeople polycounter lvl 18
    max 9 as far as i know fixed a lot of annoying issues with this shit, what Asthane is talking about above. rotating UV faces at this ratio would be nuts. before max 9, (or maybe it was 8... *shrugs*) you'd have to unwrap everything, and eyeball it before changing the UV ratio.

    i think your problem is that the texture being displayed in the background is a default checker texture, which is 1:1 in dimension and the UV area is 1:2.

    so to clarify, it's using a 512x512 texture to fill a 1024x512 space. if you apply a 1024x512 texture, it should work okay for you. that or you can create a checker material that's U tiling is double that of the V tiling; so U=10 and V=5.
  • Nate Broach
    Options
    Offline / Send Message
    Nate Broach polycounter lvl 17
    ha that makes sense, thanks killingpeople.
  • Ghostscape
    Options
    Offline / Send Message
    Ghostscape polycounter lvl 13
    The way I have always done this (to the point where I didn't know it was fixed in 9) is to unwrap it across two full squares, so its laid out 0-2, 0-1; then as the last step before calling the unwrap layout finished I'd simple scale it horizontally by 50%.
  • Asthane
    Options
    Offline / Send Message
    Asthane polycounter lvl 18
    [ QUOTE ]
    The way I have always done this (to the point where I didn't know it was fixed in 9) is to unwrap it across two full squares, so its laid out 0-2, 0-1; then as the last step before calling the unwrap layout finished I'd simple scale it horizontally by 50%.

    [/ QUOTE ]

    Gee, I wish I'd thought of that! laugh.gif
  • EarthQuake
    Options
    Offline / Send Message
    yeah thats what i've always done in modo, just unwrap to the upper half of the uvs, then scale 200%, or whatever ratio you need.
  • MoP
    Options
    Offline / Send Message
    MoP polycounter lvl 18
    I'm using Max8 with non-square textures all the time - it's really easy just to set the UVW Editor to "Use Custom Bitmap Size", which you'll find in the Advanced Options when you have Edit UVWs window open. That way, the UVW window will automatically size the UVW 0-1 range to match the aspect ratio of your textures, and will cope with this correctly when rotating/scaling etc.
    The only thing it has trouble with is the Relax function (or at least in Max8 it does, haven't tried Max9) - it still relaxes the UVs on the basis of a square 0-1 UV range, so you have to scale back (ie. 50% vertically if you're working on a 512x1024 etc.), but that's easy enough (Chuggnut's tools with the Offset/Scale type-ins is what I use all the time for this).

    Or if you don't have a bitmap with the correct ratio assigned to the material, you can set the custom aspect ratio manually in the Edit UVWs window Advanced Options, just set "render width" and "render height" to whatever you want, and it'll scale the UVW range accordingly.

    In regards to the "Relax" not scaling properly, I'm working on a script at the moment that will automatically find the bitmap ratio and scale the resulting relax accordingly, since this will personally save me some time. I find it easier to work in the "final" range rather than working with a square 0-1 range and scaling later, personally.
  • Jesse Moody
    Options
    Offline / Send Message
    Jesse Moody polycounter lvl 17
    Hey I actually just wrote a tutorial on how to do this. Well how I at least do it. So far this has been the easiest way I have done it.

    http://artbyjessemoody.com/unwrap_rect.html
Sign In or Register to comment.