Wednesday, February 07, 2007

ACCEPTABLE TEXTURE SIZES?

First things first: Sharky has released the latest build of Air Legends, so go, download and test it for stability.

Having said that, on the post that announces the build there's an interesting question (read Sharky's third comment) about the do's and dont's of chosing proper texture sizes for videogames.

It'd be nice to count on thoughts & suggestions -by more experienced user than me in the field- in order to answer it, accordingly.

So if you feel like sharing your experiences either from your technical background or "code-warrior" tales, just pay a visit to Sharky's blog, browse to the above-mentioned post and drop your comments.

Later.

4 comments:

  1. I'd like to thank Benjamin Nitschke(http://exdream.no-ip.info/blog/) for sending me the following word of advice (specially, since he's very busy puting all pieces together for the upcoming "Arena Wars Reloaded"):

    "Here is a helpful link to the tips and tricks sections with many tips, that do all also apply to XNA:
    http://msdn2.microsoft.com/en-us/library/ms810383.aspx (general tips) and from the DirectX SDK: DirectX Graphics -> Direct3D 9 -> Programming Guide -> Performance Optimizations: Texture Size

    Texture-mapping performance is heavily dependent on the speed of memory. There are a number of ways to maximize the cache performance of your application's textures.

    + Keep the textures small. The smaller the textures are, the better chance they have of being maintained in the main CPU's secondary cache.
    + Do not change the textures on a per-primitive basis. Try to keep polygons grouped in order of the textures they use.
    + Use square textures whenever possible. Textures whose dimensions are 256x256 are the fastest.
    + If your application uses four 128x128 textures, for example, try to ensure that they use the same palette and place them all into one 256x256 texture. This technique also reduces the amount of texture swapping. Of course, you should not use 256x256 textures unless your application requires that much texturing because, as mentioned, textures should be kept as small as possible.

    Another big tip is of course using DXT compressed textures to save bandwidth, hdd space and optimize rendering performance, there is a nice article about that on gamasutra: http://www.gamasutra.com/features/20051228/sherrod_01.shtml"

    ReplyDelete
  2. This is good info dude. Thanks.

    ReplyDelete
  3. I come from a the world of film 3D, but I'm starting to tool around with XNA (yes, I'll put something up soon).

    I thought I'd point out a good rule of thumb that applies here as much as it would pre-rendered stuff, and that is, Never make a texture more than 150% of the size it will appear on screen.

    Also, keep in mind simple things like the dimensions of a jpeg are always internally a multiple of 16, images that don't are stored as a larger image and then clipped.

    ReplyDelete

Any thoughts? Post them here ...