Sign in to follow this  
trevuar25

Kotor Performance Mod (Inquiry)

Recommended Posts

Hello DeadlyStream folks, 

It's been a long time since I've attempted to create a mod and I'm trying to create the ultimate performance mod for old hardware for KOTOR. For context, my one and only mod contribution to this site has been the TSL of the OLD PC. This is thanks to a combination of contributions by modders on here like BeadV+MDLedit , DarthParametric for allowing me to take his widescreen menu and remove the particles, and the kotor tool by Fred Tetra). Unfortunately, this didn't really address all of the issues of performance on low end systems for TSL.  Thankfully it was pretty effective for a lot of use cases and I had fun working on it. Since then, I've wanted to revisit the original KOTOR in attempt to make it push 60FPS on the most meager hardware possible in a way that I could learn to do the same for TSL. In my current mod output testing, is an old Dell laptop running windows XP with 2GB of DDR2, a less than 2GHZ dual core and the infamous Intel chipset graphics accelerator running at a resolution of 1024x768.

Successes:

The main menu runs at 60fps, placeable explosions, sparks, and other effects visibly render and don't appear to be a detriment to FPS. Unnecessary map animations, added aurora lights, door animations+particles, particles have been removed. The overall framerate and gameplay pacing is better than the vanilla install (in some cases better than original xbox). 

Failures:

At one point, I considered that the vertices, faces, and overall polygon count for map modules could be the ultimate destroyer of framerate on low end systems. So naturally, I looked up Blender tutorials to lower polygon and vertices count. I ended up using KotorBlender and followed that by using the decimate modifier on the nodes and had very limited gains (with some bad visual outcomes). Even when targeting unnecessary map objects that had a ton of vertices, this method didn't have enough FPS gains for what I was trying to achieve. While some map portions that were modified seemed to give an FPS boost, there seemed to be a deeper problem based on player viewpoint.

My current struggles (Endar Spire Command Module):

I've modified ALL Endar Spire command module maps, Global fx, characters, creatures, and global placeables using the following tools: MDLedit (BeadV), Holocron Toolset (Cortisol), and the kotorblender plugin for Blender (seedhartha). Even with these modifications, the framerate can't sustain over 30fps on the hardware that I'm testing.

So far, the framerate appears to be utterly destroyed by the draw/render distance dependent of the controllable in game camera. In the case of the Endar Spire Command Module, the framerate plummets when the main character's camera viewpoint is pointed towards the bridge of the Endar Spire. 

 

Does anyone here have any pointers or advice to give me? I would very much appreciate it! 🙂

 

 

  • Like 2

Share this post


Link to post
Share on other sites

Apologies for this bump of my own thread, but I wanted to add some additional info/context without an edit. This reply is with the intent to possibly save someone from attempting the same goal as myself without making my own mistakes. 

Additional steps attempted since my original post: 

    1. Editing MDL Files: I started with the notion that MDL polygon/vertices/face count was probably destroying the framerate. I had assumed this might be the case, since the modified particles didn't seem to hit the framerate at all after I lowered the birthrate and FPS values of ALL GLOBAL placeable, FX, and V_  MDL files. In my original post, I mentioned facing the bridge with the player camera causing the framerate to plummet, but I needed to test this assumption. After stripping out all of the polygons/faces/vert and walking on basically a black screen, the FPS didn't improve in any noticeable way . I went as far as to remove door animations and particles on the broken door, astro droid (c_drdastro) that is instanced multiple times in the module. I lowered the sith soldier, republic soldier, bandon, and jedi mdl files for polygon count reduction, but even then, there was truly no change to framerate compared to the particle changes I had made. Lightsaber appearance and disappearance had zero impact on FPS when the player sees "one of the jedi accompanying Bastila" cutscene.

In short... I WAS WRONG! The removal of vertices/faces/triangles in meshes don't seem to have nearly the same impact on old hardware as I had originally imagined.

    2. Editing the appearance.2da: I considered that the sith armor and other reflection calculations could be the culprit of slowdowns on old pcs. I ended up changing the sith soldier, and anything else existing in the appearance.2a envmap from CM_BareMetal to the DEFAULT value. While I did not see any difference on my modern PC of their reflective properties, the older test system reflected, pun intended, no changes in framerate. This is particularly odd, since the GMA renders these characters without any shiny quality at all on the vanilla install. Probably because old hardware just can't output the request. 

    3. Removing UV Maps of the Module: I wasn't sure what to do next. My next attempt was to strip out all light maps/UV maps from for all of the M01aa_XX files. I took ALL the edited Endar Spire Command Module MDL, which had their particles, animations, and aurora lights removed, into Blender using the KotorBlender add-on. Removing the Lightmap value followed by using changing the Self illumination hex value of 505050, and exported them for the override. I started with M01aa_01a and changed the rest of them in an attempt to see if this would actually give any performance increase. This didn't seem to increase the framerate at all. On the plus side, the game actually looked slightly darker and lights from blasters seemed more influential on the game world (due to the difference in light).  

   4. Blundering With Scripts: I considered the scripts of spawned characters were animating character models too soon out of view of the camera. In this case, I removed k_pend_bridge01 from the "OnSpawn" value for all the sith + republic soldiers, bandon, and jedi in the module. While this had some funny affects, like the soldiers not fighting on the bridge until you actually engage combat, the end result gave no framerate gains. 

    5. LYT changes: I was speed reading google searches of the LYT file and its function. All my attempts to change this file ended up with loading a save crashing or failing to start. My limited understanding of this, is that it's probably best to leave this unchanged, since I'm not attempting to make a custom module/map file for the game. Changing these values is no arbitrary task.  

After all this experimentation, I'm starting to believe there's a bug in the game's code that is causing unnecessary slow downs in all modules in regards to opengl calls. At the moment, I've been attempting to get a program like apitrace to work with KOTOR to do further digging,  but I have zero experience in this field. I'm not a programmer, 3d modeler, or developer, just a guy who's playing around with modding for fun. :)

Hopefully my explanation of this attempt might inspire someone with more knowledge to solve this puzzle or point me in the right direction. Help me deadlystream modders, you're my only hope. 

  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this