Home Technical Talk

Optimal texture size?

Hi,

I'm just curious what (or if) there is an optimal size for environmental textures for a current gen FPS type game. I know it's hard to set an exact limit, as there are a lot of factors that can apply, but it there a general level of detail that would be seen as standard (#pixels per inch/foot/etc.). Any help is greatly appreciated.

Thanks

Replies

  • Talbot
    All I know is that it has to do with how close the player is to the texture. I don't really know exact numbers. But I'm interested in seeing what other people have to say about this because I was wondering about it myself a couple hours ago. :)
  • almighty_gir
    Offline / Send Message
    almighty_gir ngon master
    what size is the object? it makes sense that if it's going to take up a larger portion of the screen it should have a larger texture.

    example: 1024x1024 texture = 1048576 pixels.
    my monitor is 1920x1080 = 2073600 pixels

    if the object is only going to take up 1/4 of my screen when i'm stood right next to it, then at most it should only need 518400 pixels, which is just short of a 768x768 texture size.
    that's quite an uncommon texture size though, so most people would go for 1024, in case for some reason, the object appears bigger sometimes. if it were to take up less space, then a 512 texture might be enough.

    it all comes down to how much of it is going to be seen. using 2048x2048 on a face texture is all well and good, but when you can't even fit that many pixels on screen, it becomes a bit pointless.
  • Ryan Clark
    Offline / Send Message
    Ryan Clark polycounter lvl 18
    Hey all,

    Here's a precise way to find the optimal texture size.

    Grab this test texture: www.crazybump.com/MipmapTest.dds.zip

    Apply it to your object, and view in your engine at the desired size.

    Based on your object's color, this key shows its optimal resolution:

    MipmapKey.png
    It's a useful trick. I don't remember where I first read about it.

    cheers,

    -Ryan
  • EarthQuake
    what size is the object? it makes sense that if it's going to take up a larger portion of the screen it should have a larger texture.

    example: 1024x1024 texture = 1048576 pixels.
    my monitor is 1920x1080 = 2073600 pixels

    if the object is only going to take up 1/4 of my screen when i'm stood right next to it, then at most it should only need 518400 pixels, which is just short of a 768x768 texture size.
    that's quite an uncommon texture size though, so most people would go for 1024, in case for some reason, the object appears bigger sometimes. if it were to take up less space, then a 512 texture might be enough.

    it all comes down to how much of it is going to be seen. using 2048x2048 on a face texture is all well and good, but when you can't even fit that many pixels on screen, it becomes a bit pointless.

    One important thing to note here, is that you're comparing 2d space to 3d space, so your math is entirely wrong, you cant compare the resolution of a texture to the resolution of your monitor, because that textures is going to be wrapped around a 3d object. So while your monitor's resolution may be less than 2048x2048, you will only ever be seeing a fraction of the model at once.
  • nicocabbalero
    Offline / Send Message
    nicocabbalero polycounter lvl 16
    @ Ryan Genius! that's pretty handy!
  • coldkodiak
    Offline / Send Message
    coldkodiak polycounter lvl 17
    EQ is right. Texture size needs to be decided by texel resolution in the game engine, which means you also have to keep in mind mip mapping, since if your game mips really early you won't see the full texture rez unless you're on top of the model.

    Ryan's texture does exactly that by testing which texel resolution is displaying on the mip.
  • Kawe
    Offline / Send Message
    Kawe polycounter lvl 8
    Thanks a lot Ryan.
  • warby
    Offline / Send Message
    warby polycounter lvl 18
    1024 x 1024


    *over generalizing .... yes ... but its just such an awesome number :D
  • Lamont
    Online / Send Message
    Lamont polycounter lvl 15
    Looks like you're on the right track. Here's a tut I wrote on this a few years ago: ::Pixel density PDF::
  • DarkStryder
    Thanks a lot guys, you rock. That mip map trick is great, I never would have though of it, so quick and simple too.
  • almighty_gir
    Offline / Send Message
    almighty_gir ngon master
    EarthQuake wrote: »
    One important thing to note here, is that you're comparing 2d space to 3d space, so your math is entirely wrong, you cant compare the resolution of a texture to the resolution of your monitor, because that textures is going to be wrapped around a 3d object. So while your monitor's resolution may be less than 2048x2048, you will only ever be seeing a fraction of the model at once.

    'twas just a guideline =[

    fag.
  • carlo_c
    That mipmap texture idea was awesome, nice one :)
Sign In or Register to comment.