Home Unreal Engine

UV's not being 1:1, but 1:2 ?

polycounter lvl 13
Offline / Send Message
Linkitch polycounter lvl 13
I'm using 3DsMax 2012 and exporting to FBX.
If I have an object that I've unwrapped to use eg. 512x256, UDK seems to make it 512x512 no matter what.

Is this something you can change somehow?
It seems really inefficient when thinking of Lightmaps, since it doesn't really need that extra 256 pixels in the height.

Replies

  • Oniram
    Options
    Offline / Send Message
    Oniram polycounter lvl 16
    in the material editor bring up a Texture Coordinate node (U+Click) and set it to tile 2x1. plug it into your textures.. bam.
  • Linkitch
    Options
    Offline / Send Message
    Linkitch polycounter lvl 13
    Oniram wrote: »
    in the material editor bring up a Texture Coordinate node (U+Click) and set it to tile 2x1. plug it into your textures.. bam.
    How do I apply that to only affect the Lightmap?
    UV0 having a normal 1:1
    UV1 having 2:1
  • Xendance
    Options
    Offline / Send Message
    Xendance polycounter lvl 7
    Linkitch wrote: »
    How do I apply that to only affect the Lightmap?
    UV0 having a normal 1:1
    UV1 having 2:1

    You can't.
  • Vailias
    Options
    Offline / Send Message
    Vailias polycounter lvl 18
    Edit: misread the question

    Really the lightmap may not. Need that high of res anyway. Try it as a 256^2 maybe?
  • Oniram
    Options
    Offline / Send Message
    Oniram polycounter lvl 16
    why is your lightmap 2:1 anyway if your regular UVs are 1:1? just out of curiosity.
  • Linkitch
    Options
    Offline / Send Message
    Linkitch polycounter lvl 13
    Oniram wrote: »
    why is your lightmap 2:1 anyway if your regular UVs are 1:1? just out of curiosity.
    If I just have a tileable texture applied to an object. But the object is elongated, so having a 1:1 lightmap would become stretched and be a waste of space.


    That being said I'm having some problems figuring this out.

    If I have a texture that's 512x128. Then I need to unwrap the object so that the UV's take up 1:1.
    If I make the UV's take up 4:1, then I need to make the texture tile 4 times in UDK, making me get the same end result.

    So I either need to make the Texture 1:1, resize in UDK and I can get a 4:1 light map.
    Or make the texture 4:1 and the lightmap becomes 1:1 in UDK.
  • Vailias
    Options
    Offline / Send Message
    Vailias polycounter lvl 18
    Um... Normally you'll have the uv's fill 0-1 space on each axis even if the texture is rectangular. The uv's look distorted in your DCCA but the texture applies just fine as its indexed from 0-1 on each axis anyway. One axis just ends up with a higher texel density.
    So yeah you'll have some waste on the light map for that particular asset. Is it really worn significant rework and stress to save a few Kb of texture size?
  • Linkitch
    Options
    Offline / Send Message
    Linkitch polycounter lvl 13
    Vailias wrote: »
    Um... Normally you'll have the uv's fill 0-1 space on each axis even if the texture is rectangular. The uv's look distorted in your DCCA but the texture applies just fine as its indexed from 0-1 on each axis anyway. One axis just ends up with a higher texel density.
    So yeah you'll have some waste on the light map for that particular asset. Is it really worn significant rework and stress to save a few Kb of texture size?
    No it's obviously not worth it, I was just curious as to why it's not possible to do.
  • Oniram
    Options
    Offline / Send Message
    Oniram polycounter lvl 16
    ive recently made it a rule that wasted space on a lightmap is no big deal.

    also. if you're using a tileable texture on a mesh.. meaning no unique uvs.. its ok to go outside 0-1. so if your first UV channel has a texture that would "fit best" in a 4:1 uv space.. leave it as 1:1.. it'll tile on its own. then keeping your 2nd uv channel 1:1 and fit objects where you can. break it if you need to. rule of thumb.. with tileable textures applied to meshes, always keep 1:1.
  • haiddasalami
    Options
    Offline / Send Message
    haiddasalami polycounter lvl 14
    Agree with Oniram. I've been doing a lot of moduluar texturing and just leaving my lightmaps 1:1 and making sure there's tonnes of padding incase the lightmap mips.
Sign In or Register to comment.