Results 1 to 5 of 5

Thread: best/better texture image file size

  1. #1
    Junior Member Newbie
    Join Date
    Mar 2011
    Posts
    2

    best/better texture image file size

    After searching the forums I haven't found quite the answer that I'm looking for.

    Take for example that you render a 3D landscape (using something like Blender, 3DS Max, etc) and export the file as an OBJ so that you can use it in an program. Essentially you have a plane type object with texture on it. There are possibly 5 textures that you are using, i.e grass, rocks, sand, etc..
    For sake of argument, assume this landscape is on a 100x100 plane

    Is it better to create one LARGE file overlay to simulate the 'hard' surfaces representing the 100x100 field, say one img file of 100mb
    OR have 5 different textures mapped that only represent a 1x1 section of the landscape (8-10kb ea), but it needs repeated 10,000 times (100x100)?

    (HARD surfaces are everything except water, because there is a water plane intersecting the hard landscape plane with different physics between the hard and water surfaces, which would be a different thread)

  2. #2
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,574

    Re: best/better texture image file size

    Define better ?
    Of course if you can get away with repeating texture, they will be easier to create/store/load.

  3. #3
    Junior Member Newbie
    Join Date
    Mar 2011
    Posts
    2

    Re: best/better texture image file size

    Better = less CPU overhead, faster rendering on redraws etc..

    to put simply would I rather want fewer LARGER images, or more smaller images. etc 3x30Mb vs 10,000x1kb when I have a character running across the landscape. which is going to kill my FPS assuming image quality remains the same.

  4. #4
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,574

    Re: best/better texture image file size

    * there is a small penalty each time you switch from a texture to another.
    * there is a huge penalty when total vram used by textures can no longer fit on the card. This could be mitigated (in the past but don't know today if still relevant) by rendering in alternating order, ie tex1, tex2, tex3,... tex10 for odd frames, and tex10, tex9, tex8,...tex1 for even frames)
    * this use case can be handled better by various streaming systems, taking advantage of the facts that far away you only need lowres textures, only the nearest geometry need to be high res, detail level is easy to predict for heightfields, and character moves quite slowly. You can search for info and hearsay on "megatexture" in ETQW which solve exactly this problem, on a modified heightfield. Megatexture in Rage is a generalisation for any geometry.

  5. #5
    V-man
    Guest

    Re: best/better texture image file size

    If your texture is 100 MB, then it will fit on today's video card's memory so there is nothing to worry about.
    If you also have other textures and we include VBO/IBO and you exceed the video card's VRAM, then the driver will swap between RAM and VRAM as it renders. That will result in a slowdown.

    To reduce memory usage by textures, people use DXT1 or DXT5 compression. I use a tool from the DX SDK called DXTex.

    To reduce memory usage by IBO, use ushort instead of uint.
    To reduce memory usage by VBO, use short for vertices and normals instead of float.

Similar Threads

  1. Best Way to Store Texture or Image Information in a File
    By amorag59 in forum OpenGL: Advanced Coding
    Replies: 7
    Last Post: 07-26-2015, 02:50 AM
  2. Replies: 10
    Last Post: 01-04-2007, 12:02 AM
  3. I cannot load texture form file.tga image
    By Dol AI with 3D Bone system in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 10-14-2004, 11:01 AM
  4. texture mapping - Image size
    By sarahippo in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 05-14-2003, 12:49 AM
  5. Error Reading File BMP File Size ?
    By Olumide in forum OpenGL: Advanced Coding
    Replies: 13
    Last Post: 01-31-2002, 10:57 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean