Home Technical Talk

Help understand texel density and few other texture related stuff - modular enviro

Tzur_H
polycounter lvl 9
Offline / Send Message
Tzur_H polycounter lvl 9
Hi guys,

Myself and few other class mates got an assignment to create a game level environment in UE4. We got the concepts and reference and broke it down into modular assets that we will be re-using across the level, so far so good.

The problem is, we're not sure how to tackle the texturing aspect. We know that we need to keep an even texel density so the textures would look the same size across all assets, but how do you determine the px/cm size for the assets? We're using UV Deluxe for Maya to set the texel density up.
Another thing we're not sure about is regarding efficiency and performance in the game engine, is it better to have a few big texture sheets (4096x4096) for all of the assets, or break it down into small textures (512x512) for each asset? We do want to create tiling textures for walls, floors, metal pipes etc. we only got a few unique models.

Thanks for the help!

Replies

  • Eric Chadwick
    Options
    Offline / Send Message
    Since you're starting out, I would advise keeping complexity to a minimum. So it's better to use multiple tiling textures, rather than one big atlas and tiling in the shader (which can get complex quickly). If you want to learn about that we have some links here http://wiki.polycount.com/wiki/Texture_atlas

    As for texel density, if you're using tiled textures then the easiest thing is to make a checker texture, apply it to everything, and adjust the UV tiling so they all match.

    Choose a texel-per-meter number to use (like 200 or whatever, depends on budget/style/etc.), make a checker texture which shows 200-pixel divisions, make a 1-meter cube, and UV it onto the cube. Then use this cube as your ruler to compare all your models' UVs against. Make sense?

    We have some nice UV checkers here, to get you started.
    http://wiki.polycount.com/wiki/TextureCoordinates#UV_Map_Grids
  • Tzur_H
    Options
    Offline / Send Message
    Tzur_H polycounter lvl 9
    I've tried making an atlas today, prior to reading your post, Eric, didn't go as expected...

    I made a simple plane in Maya, 1 meter x 1 meter and a 1024x512 texture map which I divided into 2x 512x512 textures, left side was bricks and right side was metal. I then tried to tile the texture onto a plane using repeat UV from the material node attributes (Maya) - my intention was to get only bricks on the plane, but I got some metal texture as well, I didn't know how the program is tiling but now I thinkg I do :]
    So just to clarify this, from my understanding on how tiling works, when using multiple tileable textures on 1 texture sheet, you can only tile along the U OR the V? Not both?

    If I want a tileable brick texture to tile on U and V for use on walls for example, I need to have it as a unique texture sheet? But I can make a trim texture that would tile along the U only and in this scenario I'd be able to put multiple trim textures into 1 sheet and reduce texture files needed?
    As for texel density, if you're using tiled textures then the easiest thing is to make a checker texture, apply it to everything, and adjust the UV tiling so they all match.

    Choose a texel-per-meter number to use (like 200 or whatever, depends on budget/style/etc.), make a checker texture which shows 200-pixel divisions, make a 1-meter cube, and UV it onto the cube. Then use this cube as your ruler to compare all your models' UVs against. Make sense?

    I don't understand what you mean by saying "adjust the UV tiling", is that inside the engine using the TexCoord node? Like the repeat UV in Maya? Or actually scaling the UVs of the assets inside of Maya so the texture would tile?

    Any tips on how should one determine the right texel-per-meter size to use for their project?

    And, when you say "200 pixel division" you mean that I should create a 200 pixel x 200 pixel checker texture and compare using that when applied across all assets in Maya?

    Thanks a lot for you help Eric! I'll read all the good stuff on the Wiki tomorrow.
  • Eric Chadwick
    Options
    Offline / Send Message
    When you pack multiple tiling textures into one atlas, then there are a few ways to isolate the individual textures.

    If you don't want to do fancy shader work, then you need to arrange the textures side-by-side on one axis, so you can tile across the other axis. If the textures are placed side-by-side across the width of the texture, then you can only tile across the height. That's what a "trims" atlas does, except usually the trims are stacked vertically (to be tiled horizontally) because trims are generally wide instead of tall.
  • Eric Chadwick
    Options
    Offline / Send Message
    Tzur_H wrote: »
    If I want a tileable brick texture to tile on U and V for use on walls for example, I need to have it as a unique texture sheet? But I can make a trim texture that would tile along the U only and in this scenario I'd be able to put multiple trim textures into 1 sheet and reduce texture files needed?
    Yes, and yes. Unless you're using a fancy shader.
    Tzur_H wrote: »
    I don't understand what you mean by saying "adjust the UV tiling", is that inside the engine using the TexCoord node? Like the repeat UV in Maya? Or actually scaling the UVs of the assets inside of Maya so the texture would tile?
    All three are do-able, if you are using traditional tiling textures (not packed into atlases). Depends on which is easiest for you. I think scaling UVs in Unreal would be the easiest.

    However if you are not tiling the textures, for example uniquely-textured props, then you need to adjust your UVs in Maya and not in Unreal. You don't want to tile those.
    Tzur_H wrote: »
    Any tips on how should one determine the right texel-per-meter size to use for their project?

    Try different scales, see which looks good to you. Depends on a lot of factors, how close objects are to the camera, what the target hardware rendering resolution is, how much memory you have (smaller scale = more textures, generally). you could start with 256 pixels per meter.
    Tzur_H wrote: »
    And, when you say "200 pixel division" you mean that I should create a 200 pixel x 200 pixel checker texture and compare using that when applied across all assets in Maya?
    Yeah, just make sure it has a large gradient background, so you can see where the tile border is. Probably better to use a power-of-two size though.
  • Tzur_H
    Options
    Offline / Send Message
    Tzur_H polycounter lvl 9
    OK, this makes much more sense to me now after reading the Wiki, and the shader thingy in UDK. Much appreciated Eric!
Sign In or Register to comment.