I was beta-testing Andy's campaign, and one of the areas makes heavy use of Tupoun's City Hak, which, at least on my system, slows the frame rate to a crawl (perhaps 2 frames per second on average, 1 or 0.5 at worst). I've heard people say that it's because the models lack LODs, so I looked into them to see if anything could be done to remedy that.
First I checked to make sure the textures had mipmaps. That alone could improve the speed, as I found in other areas. They do have mipmaps.
Next I looked at the models themselves -- mainly the houses, which seemed like the main culprits. I found that they were not only rather heavy on polygons (7200 for one building in one that I checked), but that they're made of multiple separate objects, each using its own texture. This is because the Oblivion textures (which is where these textures come from) are generally single elements, such as stone, wood, cloth, or single pieces of objects, like a window. This is in contrast to the other, possibly more common, method that NWN2 generally uses, which is a single image file containing numerous textures to be applied to different areas on a single mesh. So these houses are not only a bit on the high end polygon-wise, but also pull 3-5 textures each.
Now, the problem here is that I have no idea if it's even possible to add LOD models that will work properly with a multi-mesh model. I tried adding some LODs to a few of the houses, but when I moved them out to a distance to see the effect, only the first-named mesh was swapped out, leaving all of the subsequently-named meshes still there. If this were a single-mesh file, it wouldn't be an issue. I checked one of the known multi-mesh stock objects, the alarm gong, to see how it handled it, and found that it had no LODs either.
Attaching the separate pieces to each other doesn't work, because of how the textures are set up. Unless there's some way that I'm not aware of, the only way I know to optimise these things is to create a new image file containing the common textures, and remap the UV coordinates on the merged model.





Retour en haut







