Home Technical Talk

Texel Scale?

fattkid
polycounter lvl 15
Offline / Send Message
fattkid polycounter lvl 15
Hey guys, I'm curious if someone could fill me in on what exactly "texel scale" is, how to calculate it (i.e. 128 pixels per foot), how/if it relates to scene or unit scale in the 3D modeling program and editor of choice, etc. FYI, I'm using Max 9, Unreal, and am trying for the above mentioned scale of 128 pixels per foot with a 1024 texture map. I've been googling around but haven't had much luck. Any info, or links to helpful info would be much appreciated. Thanks.

Replies

  • Neox
    Offline / Send Message
    Neox godlike master sticky
    a texel is just a texture pixel, from there it should be self-explanatory, it means you have 128 pixel per foot, the thing with per foot is... what is a foot in unrealengine? all unreal games i've been working on have been working in somewhat abstract unit system
  • kodde
    Offline / Send Message
    kodde polycounter lvl 19
    Neox wrote: »
    a texel is just a texture pixel...

    No sir you are wrong, "Texel" is actually also a province in Holland, known for a certain type of sheep.
  • Tumerboy
    Offline / Send Message
    Tumerboy polycounter lvl 17
    kodde wrote: »
    No sir you are wrong, "Texel" is actually also a province in Holland, known for a certain type of sheep.

    So Texel Density is the number of sheep per square foot in Texel?



    As Neox stated, it's the scale of a given pixel. In your example, you want to have 128 pixels per foot, and you're working with a 1024 map. So, a single 1024 should be mapped to a 8' square.
    How do you maintain that on various other small pieces and such? Basically eyeball it as far as I know. If it helps, map your map on an 8' cube, and keep that nearby, so you can compare the piece your working on to the cube, to make sure that the texture density stays roughly consistent.
  • e-freak
    Then he's not wrong but not informed completely :P
    Texel scale is basically the number of pixels per unit or in real world it would be DPI. Just check your unit height in engine/tool and check your texture size, there you go.

    Reference Values would be: Half-Life (GoldSource) used 1 Pixel per 1 Unit (typicall Wall height 128), Half-Life 2 (Source) used 4 Pixels per 1 Unit (0.25 - same Wall height), Orangebox Games (Source) using 8 Pixels per 1 Unit (0.125 - same Wall height) and Unreal3 uses theoretically at least 2048 Pixels per something like 192 Wallheight (if im not mistaken).

    Degrades with LODs and can be fake increased with detailmaps.
  • MoP
    Offline / Send Message
    MoP polycounter lvl 18
    UT3 actually has about 3.6:1 pixel:game unit ratio judging by most of their textures. They also have detail textures on top of that at a higher ratio.
    I don't think Source games use 8 pixels to one unit... unless you're saying that for a 128 unit high wall (ie. just higher than a player) they use a 1024x1024 texture? Not sure if that's true.
    Doom3 used 2:1 fairly consistently, most current-gen games seem to be using around 4:1 for most stuff. I don't think there are many FPS games out there going higher than 4:1 on a general scale for level/prop stuff. Sure, it'll go way higher for stuff you have to interact with (panels next to doors, "objective" computer screens etc) but for the most part I would be quite surprised to see an FPS using a majority of textures at a ratio of higher than 4:1.

    4:1 i refer to unit length, in terms of unit area it's 16:1 (4x4:1x1).

    e-freak: i'd be interested to see some example assets / textures / screenshots where an FPS consistently uses 8:1 ratio?
  • Justin Meisse
    Offline / Send Message
    Justin Meisse polycounter lvl 19
    for alot of env stuff I use box map: for 2:1 I box map the mesh at half the rez of the texture, I also use a cube with a checker pattern at the correct density to help eyeball stuff as well.
  • e-freak
    Yes Source is using 1024*1024 on a 128² wall. That's the default size for the TF2 textures at least and they are scaled 0.125. Source uses a pretty good Mipmapping though. I'm not sure i can upload examples as im not rightsholder on these but you can easily check this out with GCF-Scape and opening team fortress 2 materials.gcf and extracting some of the VTFs (around 690 KB is the filesize for a 1024^2)
  • fattkid
    Offline / Send Message
    fattkid polycounter lvl 15
    Thanks for the replies folks.

    I'm not sure I quite get it yet, but that probably has a lot to do with the fact that it involves math and I'm not so good with all that plus and take away and stuff. Anyone know of any sort of articles or tutorials on the subject?
  • e-freak
    It's nothing more than Object-Width (or -Height) in Units divided by Texture-Width (or -Height) in Pixels: Texeldensity.
  • MoP
    Offline / Send Message
    MoP polycounter lvl 18
    Yeah, it's really not very difficult :)
    128 unit high wall, using a 512 pixel high texture means the ratio is 512:128
    You can divide this down (128 goes into 512 4 times) to get 4:1.
  • Justin Meisse
    Offline / Send Message
    Justin Meisse polycounter lvl 19
    easy way: if you're using MoP's 4:1 example you can either:

    a) just box map your model at 128x128x128 (if your texture res is 512)

    b)make a cube, box map it at 128x128x128 and throw a checker pattern on it, then throw the same pattern on your model and eyeball the checker sizes.
  • fattkid
    Offline / Send Message
    fattkid polycounter lvl 15
    Thanks guys. I can see how this is basically a simple formula, but I'm still not sure what or how to calculate and apply it......

    the object I'm building and texturing is a static prop (vehicle), it's dimensions are:

    length:512 units (1 unit = 1 cm), and width and height both: 256

    So the object, at 512 width x 256 height units would equal 131,072 units/pixels (?)
    (would the 256 units depth matter? as the front/back/top will be unique from the side)

    131072 units/pixels divide by 1024 texture = 128 texels
    1024 texture divided by 128 texels = 8
    would the ratio be 8:1?

    (I not even sure if the above math is what I should be calculating)

    If so, how would I determine what size checker pattern to use as reference? Or what dimensions to box map at?
    Also, I'm not entirely sure what it means to "box map a model at 128x128x128"

    Thanks again for any info...your patience is much appreciated in this matter.
  • Justin Meisse
    Offline / Send Message
    Justin Meisse polycounter lvl 19
    I should of prefaced: using Max

    Use the UVW Map modifier (not Unwrap UVW), set it to box and then put the length, width and height to 128.

    You don't have to worry about the size of your mesh, if it's going to get textured with a 512 then boxmapping at 128 would tile the texture at 4:1.

    Someone correct me if I'm wrong but I think it's a good idea to reset xforms before doing this.
  • Justin Meisse
    Offline / Send Message
    Justin Meisse polycounter lvl 19
    sorry for bumpin but I wanted to share this script by SinisterGFX:
    boxmapper
    I use it allllll the time, it gives you easy buttons to box map your selection at different sizes and has an option to auto-collapse as well.
Sign In or Register to comment.