Home Technical Talk

LOD and texture size

is there any sense to make LOD for games and also change in LOd1, Lod2, size of textures

for example:

LOD 0 4096x4096
LOD 1 2048x2048
LOD 2 512x512

?

Replies

  • Fwap
    Options
    Offline / Send Message
    Fwap polycounter lvl 13
    Traditionally engines do this for you, it's called mip mapping.
    That being said if your feeling that way inclined you could make custom mip maps, not sure if anyone does that any more though.
  • ZacD
    Options
    Online / Send Message
    ZacD ngon master
    Let the texture mip by itself most of the time. I've heard of using different normal maps for LOD0 and the other LODs, mostly because tangent space normal maps break from topology changes, but LOD2 or higher should be far enough away it doesn't matter enough.
  • ar2r
    Options
    Offline / Send Message
    so the best solution would be:
    one material with: diffuse 2k, normal 2k, spec / glos
    every map with mimap on

    and every LOD (lod0, lod1, lod2 ) will have the same material, and only number of triangles will change ?
  • Neox
    Options
    Offline / Send Message
    Neox godlike master sticky
    thats what mipmaps are for

    damn too late :D
  • Wesley
    Options
    Offline / Send Message
    Wesley polycounter lvl 13
    This stuff must be more studio/type of game specific than what's being suggested here... I mainly say this after spending countless hours making LODs and their textures and not just relying on mips.
  • Rurouni Strife
    Options
    Offline / Send Message
    Rurouni Strife polycounter lvl 10
    An option for LOD's is also simplifying the material. For example, in Unreal you have LOD 0-2. 0 has 2 materials with the full compliment of maps. LOD 1 might have the same. But for LOD 2, you could cut one material out and simplify the material too by removing Normal or your MRAO type maps depending on what you need.

    All about options and eeking out performance.
  • DEElekgolo
    Options
    Offline / Send Message
    DEElekgolo interpolator
    I remember someone on here made a DDS file that had different rainbow colors for every mip map level and it helped a lot in deciding what your general texture resolution should be by considering the average view-distance your model would be viewed from. Like Rurouni said though, a lot of the time LODs are used to cut corners on how expensive the model is to render on screen by being more and more concise like by removing materials and having less vertices for animations/vertex skinning to worry about or using a more concise version of the shader it had. It really depends since this is a situational matter for your engine but there are guidelines.
    If lower LOD models are still required to be animated properly then sometimes there's some clever re-purposing of vertex indices(like skipping vertices and repurposing the vertex positions of the original model) to get the lower LODs so the mesh doesn't take up much more memory by giving each unique LOD model a new set of vertex weights and such.
  • Eric Chadwick
  • MooseCommander
    You can create material LODs as well, as others have mentioned. On TR, we did this to reduce texture drawcalls on distant objects. When something takes up 20 pixels on your screen, it doesn't need a gloss or specular or even normal map. We'd often reduce lowest LOD objects to just diffuse.
  • ar2r
    Options
    Offline / Send Message
    thx for all reply, I've made test in Unity and run
    - 400 objects with LOD 0 , 1 ,2 with one material, without changing textures size (diff,gloss/spec,normal) 4K

    and second test
    - 400 object and LOD 0 - dif, spec/glos, normal - one material 4k
    LOD 1,2 only diff - second material 512 px

    and I've get
    - first test 280 fps
    - second test 600 fps
  • EarthQuake
    Options
    Offline / Send Message
    Keep in mind that certain reflective objects like metals do need spec and gloss maps, even in the distance. Otherwise if you fade to diffuse only shader, it will pop from (for instance) chrome to matte black. Though you may be able to get away with constant values rather than maps.
Sign In or Register to comment.