Mesh Optimization

Threads related to coordination in lore, border regions, objects, implementation, etc with Tamriel Rebuilt
Post Reply
User avatar
Melchior Dahrk
Forumite
Posts: 164
Joined: Mon Jan 12, 2015 12:58 am

Mesh Optimization

Post by Melchior Dahrk » Sat Dec 30, 2017 2:07 am

There has been work on Discord recently (mainly by Greatness7) to figure out the biggest "bang for the buck" when it comes to optimizing meshes to improve FPS in game. These changes can drastically improve performance if a mesh is particularly bad and/or used frequently. I have been working on implementing these changes in Lyithdonea and am seeing significant improvements in the most expensive area (the large city). I compiled a few bullet points for the Rules of Optimization:

  1. Minimize NiTriShapes.
    a) High poly meshes should be minimized, but typically aren't as expensive as multi-shaped models.
    b) End game is atlas'ing textures to reduce shapes even further.
    c) This point cannot be understated. Huge gains are possible by minimizing shapes.
  2. Use alpha testing rather than alpha blending.
    a) Alpha blend should only be used for things which actually have transparency (e.g. water).
    b) 237 and 4845 are examples of common alpha property settings with Blending enabled. 13026 is a good setting to use; it also has No Sorter checked which is believed to help performance as well.
  3. Optimize collision meshes.
    a) Minimize the number of vertices.
    b) But if the object gets walked on by NPCs - and if so, then especially for large models - separate the part of the mesh actors will collide with most often into its own shape in the collision node. Unlike for visible objects, extra collision shapes are not expensive for performance.
    c) Not having any collision model is almost always bad except for the simplest meshes.
    d) Make sure models are using the NC ExtraData if they don't need collision!
  4. Keep clean NIFs.
    a) Minimize bogus nodes. Typically, shapes don’t need to be under extra nodes. Unless they're special animation nodes and the like.
    b) Merge all properties possible.
  5. LODnodes. ?. Profit! *
  6. Vertex cache sequencing??? **

Remiros has started putting these tenets into practice with his "Optimization Patch". Which is a valuable 3rd party resource for the Province mods to reference in lieu of including the patched vanilla meshes (many of which are atrocious) themselves.

* I am still in the process of testing the uses of LODnodes in Morrowind (there are many!). They work great in the engine and I believe there is a lot of potential here, especially for animated meshes to use LOD.

** Vertex caches being sequenced in a particular order is something recently found to be another avenue for performance gains by Greatness7. Yet to be fully exploited.


-Melchior Dahrk

Post Reply

Return to “Cross-Project Coordination”

Who is online

Users browsing this forum: Moritius and 1 guest