Pops Maellard

KOTOR1 in 3440x1440 modding journey

Recommended Posts

Hi all, first post!

I've recently started a KOTOR playthrough after not playing it for years and thought I'd share my experience modding it for ultrawide (3440x1440) just in case it helps anyone. (and to get some feedback in case I made any mistakes).

 

01. The basic setup is the reddit modlist (here) and the optional widescreen steps (here, patching the game WITH the dialogue adjustments from the hi-res menu patch) with 1440p remastered cutscenes (mostly to prevent the game from minimizing everytime a cutscene starts, without the HEX edits). This got me up and running in 3440x1440 without any significant issues. Only small annoyance is the sometimes glitchy dialogue bar animation due to the hi-res menu patch.

 

02. Next step was to install RaymanGT's ultrawide mod to even further increase the UI and HUD quality. This one had some minor alignment issues so I thought I'd try fixing them myself.

So using KOTOR Tool and the KOTOR GUI editor I managed to fix the alignment issues and edit the top right icons texture backgrounds to transparent.

updated files (override folder - replace): here

 

03. Messing around with ReShade I managed to create a "cinematic" effect that only shows up during dialogue scenes.

This using a combination of UIDetect and IMMERSE RTGI and DOF (DOF with a very generous and fast auto-focus so it doesn't just blur everything).

Here you can find my my .fxh and RGBmask for UIDetect. You can sandwich any shaders/effects in there to mess around with the dialogue scenes.

 

20230719095554_1.jpg.bdb44fa093bc0363a4379bb2efa79637.jpg

 

I'll keep this updated if I make any other big changes.

Really amazed by all of the amazing mods people have made for this game over the years and looking forward to contributing.

 

 

Edited by Pops Maellard
clarification

Share this post


Link to post
Share on other sites

Small update! Started a first attempt at replacing the menu's.

Remade the menu setup in Blender:

blender_j5wrufl8qz.png.4ee9dbd4e9ba379124bf7c0ebeb9459f.png

And ended up with a light/dark side menu replacer that was rendered at native res:

20230722165508_1.jpg.5c2de40c1c6a53f6847ca9a462712b07.jpg

20230722165554_1.jpg.ea29ba64d9b9fa144efc864c4dcc3b98.jpg

Current issues:

- Can't get the text to stay red. As soon as it's been highlighted it snaps back to blue and I can't figure out where to change this.

- The image doesn't seem to fully fill the frame, leaving black bars left and right - solved this for now by darkening the edges.

 

This mod uses or references other mods!

- K1 Main Menu Widescreen Fix 1.2 (and the GoG replacement logo)

- Adjusted the menu buttons from HD MENUS AND UI Assets 1.0

- Used the .gui files from KotOR 3440x1440 Enhanced HUD/UI and Menus 1.1.0 as a base.

 

Feedback and assistance welcome!

 

font issue ref:

20230722165512_1.jpg.df0a86de35f3524b99187506b3abe42a.jpg

 

border issue ref:

20230722171329_1.jpg.d2b5dae2b46c6bf93e6b30883cf332be.jpg

Edited by Pops Maellard

Share this post


Link to post
Share on other sites

Giving the cutscene video upscaling/remastering a try,

- slider comparison

- video

 

Fairly pleased with the results, seems somewhat impossible to have 0 artifacts but still impressed with the tools.

Using Topaz Video AI, mixing 2 models in After Effects and adding some grading, grain and glow - hopefully that last one isn't considered too blasphemous.

50b (0;00;03;11).jpg

50b (0;00;03;11)-orig.jpg

Share this post


Link to post
Share on other sites
  On 7/23/2023 at 7:51 AM, Pops Maellard said:

Giving the cutscene video upscaling/remastering a try

It does look a hell of a lot cleaner certainly. There seems to be a bit of wonkiness with the blaster fire, and the shadows on the lead ship in the last shot dance around a bit, but I imagine those sorts of problems are more or less impossible to avoid since the AI is only working on a single frame at a time. Probably the best upscale result I have seen to date though. I'm interested to see how some of the others like the Ebon Hawk take-off/landings turn out. And how about something without a space backdrop like the revelation scene (31a), Malak and Revan at the Dantooine ruins (09), or the Bastila/Revan showdown (02)?

  On 7/22/2023 at 3:08 PM, Pops Maellard said:

Remade the menu setup in Blender:

I'd say your backdrop is too deep/thick. That was something I did initially on my menu surround as well. Try moving the backdrop plane forwards so the depth of the metal surround is only about a quarter of what it is in your screenshot.

  On 7/22/2023 at 3:08 PM, Pops Maellard said:

The image doesn't seem to fully fill the frame, leaving black bars left and right - solved this for now by darkening the edges.

If you are playing on ultrawide then you'll need to stretch the background plane out further by editing the menu model in KBlender. My mod (assuming that is what you are using as a basis) only widens it enough for 16:9/16:10. You'll probably also want to an additional FX emitter on the lefthand edge to fill that gap you've got there.

  On 7/22/2023 at 3:08 PM, Pops Maellard said:

Can't get the text to stay red. As soon as it's been highlighted it snaps back to blue and I can't figure out where to change this.

There are multiple entries in the GUI you are going to have to edit in order for it to be consistent. You've presumably only changed a single state currently.

  • Light Side Points 1

Share this post


Link to post
Share on other sites

Thanks for taking a look!

  On 7/23/2023 at 8:24 AM, DarthParametric said:

It does look a hell of a lot cleaner certainly. There seems to be a bit of wonkiness with the blaster fire, and the shadows on the lead ship in the last shot dance around a bit, but I imagine those sorts of problems are more or less impossible to avoid since the AI is only working on a single frame at a time. Probably the best upscale result I have seen to date though. I'm interested to see how some of the others like the Ebon Hawk take-off/landings turn out. And how about something without a space backdrop like the revelation scene (31a), Malak and Revan at the Dantooine ruins (09), or the Bastila/Revan showdown (02)?

Trying to see if I can maybe fix some of those issues by manually masking them in with upscales using other models. This'll take some time though.

I'll run those scenes you've asked for through this setup and post an update! Curious to see how this turns out aswell.

  On 7/23/2023 at 8:24 AM, DarthParametric said:

I'd say your backdrop is too deep/thick. That was something I did initially on my menu surround as well. Try moving the backdrop plane forwards so the depth of the metal surround is only about a quarter of what it is in your screenshot.

Hah yes, got a bit carried away with that. Wanted to make sure it got some blue/red light of the "menu".

  On 7/23/2023 at 8:24 AM, DarthParametric said:

If you are playing on ultrawide then you'll need to stretch the background plane out further by editing the menu model in KBlender. My mod (assuming that is what you are using as a basis) only widens it enough for 16:9/16:10. You'll probably also want to an additional FX emitter on the lefthand edge to fill that gap you've got there.

Of course! Thank you! I didn't consider it would reference a 3D plane! Next thing to figure out.

  On 7/23/2023 at 8:24 AM, DarthParametric said:

There are multiple entries in the GUI you are going to have to edit in order for it to be consistent. You've presumably only changed a single state currently.

I'm only using the kotor-gui-editor tool for now so maybe I don't have access to all of the text options? I've changed the COLOR vector for BORDER, HILIGHT and TEXT to the same shade of red in the mainmenu.gui

Share this post


Link to post
Share on other sites

Hrm, I had a look at it. I thought there might have been some additional structs but maybe I was thinking of a different GUI. Given that there is stuff that only appears to be rendered in debug mode (the module list and warp button), I would guess that there could be a hardcoded element to the font colours.

Edit: Looking at my menu setup, I have extrapolated an approximate FOV for 3440x1440. The blue square is 1920x1080.

Menu_WS.png.6403dd3d1e656b085b5dcb8e51ab5f65.png

I can export a model with the background plane scaled up to suit if you want.

Edit 2: Can't really test it on my end, since I'm only running 1080, but try this:

3440x1440_K1_Main_Menu.7zFetching info...

Share this post


Link to post
Share on other sites

Hi. Looks like you're doing some good work here. :D

I just started playing the game at 3440x1440 (using RaymanGT's mod for this). I was wondering if I could ask you a question. If this isn't the right thread for that, I apologize. I'm getting a bug of sorts whenever a cutscene/dialogue (not the FMVs) starts - it's like everything's been moved downwards so that I don't see the lower black bar (and its dialogue options). This lasts until the camera view switches. Kinda annoying, though not gamebreaking. :)

Edited by AnandaMothma

Share this post


Link to post
Share on other sites
  On 7/23/2023 at 10:41 AM, DarthParametric said:

Edit 2: Can't really test it on my end, since I'm only running 1080, but try this:

This seems to work (see attached image) but whenever I put the included texture (Pops_MenuBack.tga) in override it crashes to desktop?

20230723221155_1.jpg

  On 7/23/2023 at 8:13 PM, AnandaMothma said:

Hi. Looks like you're doing some good work here. :D

Thank you! Having loads of fun figuring it all out.

 

  On 7/23/2023 at 8:13 PM, AnandaMothma said:

it's like everything's been moved downwards so that I don't see the lower black bar (and its dialogue options). This lasts until the camera view switches

Did you run the High Resolution Menus (this one) patcher with dialogue fix enabled? I THINK it might be that one. Not a 100% sure.

Edited by Pops Maellard

Share this post


Link to post
Share on other sites
  On 7/23/2023 at 8:19 PM, Pops Maellard said:

Did you run the High Resolution Menus (this one) patcher with dialogue fix enabled? I THINK it might be that one. Not a 100% sure.

I think so. Tried doing that again now, no luck. Oh well. I'll survive. It's not all letterboxed scenes, just some.

Share this post


Link to post
Share on other sites
  On 7/23/2023 at 8:41 PM, AnandaMothma said:

I think so. Tried doing that again now, no luck. Oh well. I'll survive. It's not all letterboxed scenes, just some.

Hmm it might just be the inherent issue with the whole dialogue fix. Whenever a dialogue box is meant to "animate in" it can get a bit glitchy.

  On 7/23/2023 at 8:19 PM, Pops Maellard said:

This seems to work (see attached image) but whenever I put the included texture (Pops_MenuBack.tga) in override it crashes to desktop?

@DarthParametric while I wasn't able to fix the texture issue I was having with your file (does Blender not export texture changes?), I was able to get it working by adjusting your original widescreen fix based on what you sent me!

 

20230723225743_1.jpg.796f96b60638427d8b2b1d3d258b2b90.jpg

 

Not as clean as your file but it does the job for now.

Also moved the smoke emiters around and reduced the depth of my metal background. Diving back in to figure out if it would be possible to have a blue light affect the smoke and Malak model.

 

Thanks again!

Override.7zFetching info...

  • Like 1

Share this post


Link to post
Share on other sites
  On 7/23/2023 at 8:19 PM, Pops Maellard said:

whenever I put the included texture (Pops_MenuBack.tga) in override it crashes to desktop?

Odd. It works fine on my end, albeit I can only see a 1080p section of it:

K1_Ultrawide_Menu_Test_1080_TH.jpg

The image is just a RGB/24 bit 4096x4096 TGA. You can try the attached TPC version and see if that works.

But it was only intended as a placeholder anyway. Just use your own image and rename it "Pops_MenuBack" and it should work.

Pops_MenuBack_TPC.zipFetching info...

  • Like 1

Share this post


Link to post
Share on other sites

Hrm, seems that the FOV is slightly smaller than I anticipated. The KOTOR camera FOVs are difficult to sync up to an equivalent in Max. The added lefthand emitter appears to be too far to the left, so I'll have to adjust that.

Edit: OK, I have adjusted the FOV in Max based on your screenshot and resized/repositioned things to suit. Try the updated version attached. I've edited the placeholder image to add some concentric squares (albeit stretched horizontally when rendered) to give you some positioning guides.

3440x1440_K1_Main_Menu_v2.7zFetching info...

  On 7/23/2023 at 8:45 PM, Pops Maellard said:

Diving back in to figure out if it would be possible to have a blue light affect the smoke and Malak model.

There are two existing lights in the scene. One about 1.5m directly in front of Malak that is a dark purple-ish colour set to only affect ambient, and another about 1m to the right of Malak at the top of the frame that is white and set to cast shadows. That's the one that is lighting Malak.

K1_Main_Menu_Lights.jpg

  • Like 1

Share this post


Link to post
Share on other sites
  On 7/23/2023 at 8:45 PM, Pops Maellard said:

Hmm it might just be the inherent issue with the whole dialogue fix. Whenever a dialogue box is meant to "animate in" it can get a bit glitchy.

I isolated the problem to the ultrawide resolution. It only happens at 3440x1440. With those "fade in" letterboxes. Think I might have to play at 2560x1440 :( Because I realized how much I hate missing out on dialogue lol.

Edited by AnandaMothma

Share this post


Link to post
Share on other sites

Right, so this took me a while. Finished upscaling all of the cutscene videos to see if I còuld make some improvements to the already existing upscales.

It went okay-ish but I'd still like to do a second pass at most of them before actually releasing them as a mod. If anyone is interested or would like to give some feedback, I've put them all up on my google drive here. That being said it's now clear to me that even now there's only so much you can do with AI upscaling.

 

Workflow wise what I did was:

- Extracted the audio from the .bik files using the RAD tools.

- Upscaled them 3 times with Topaz Video AI to 3440x1462 (to crop them down to 3440x1440 again but keep the aspect ratio):

. First upscale was Proteus with all settings cranked to 100 percent to get a baseline

. Second upscale was Proteus again but more moderate settings, so I could reduce some of the more wonky results from the first pass

. Third upscale was a Gaia CG one to use for characters/faces.

- Put it all together in After Effects and remake some things manually.


Some screenshots:
 

 

legal-r01 (0-00-02-09).png

09 (0-00-23-27).png

54 (0-00-30-18).png

  • Like 1

Share this post


Link to post
Share on other sites
  On 11/6/2023 at 10:00 PM, Pops Maellard said:

there's only so much you can do with AI upscaling

Yeah, unless you have a model specifically tailored to your target image/video, it's never going to be perfect. The question is whether the result is better or worse than a simple linear resize. As long as the upscale hasn't turned everything to mush then it's probably a win.

By the way, I see you have redone the subtitles in that Dantooine memory. I'm not sure if putting them directly over the image is a great idea. Personally I'd prefer the option of having them in the letterboxing, like the originals. Of course that would require a lot of extra work, so perhaps just leaving them out altogether would be better.

Speaking of the Dantooine memory, there are certain cases like that one and the Revan bridge fight where they could probably be recreated in-engine and recaptured at a higher resolution. Then you'd just need to add the VFX on top.

Share this post


Link to post
Share on other sites

Oh yeah get what you mean.  Definitely better than just a linear resize but somehow I was expecting to get it perfect if I would just "put in the work".

 

I agree with the subtitles remark, but it just felt off to still have it letterboxed when it could be full screen.

I'll make an alternative version for release that either has them boxed or just no subtitles all together.

 

And I didn't realize some of them could be re-rendered in engine! I was contemplating remaking them in Blender using the in-game assets but I don't know what is and isn't in the game files.

If those animations are still in there completely I'd love to have a go at it.

Share this post


Link to post
Share on other sites
  On 11/7/2023 at 12:20 PM, Pops Maellard said:

If those animations are still in there completely I'd love to have a go at it.

The Dantooine dream stunt anims exist, although Revan and Malak's positions don't line up with the Ruins layout so they'd need adjustment. The animated camera does line up with the layout though (starts outside the star map chamber).

image.png.3bf1d386eb2ab9ee4ce27e7b8585c3de.png

The models are M15aa_c01_cam, M15aa_c01_char02 (Malak), M15aa_c01_char04 (Revan), M15aa_c01_char03 (door).

For other stuff like the Bastila/Revan fight and the revelation sequence, most of it should be able to be recreated with mostly generic anims. It would probably need to be done in TSL, just because you can script all anims there, unlike K1. There might need to be the odd custom anim cobbled together. The star map fly-arounds would be simple enough.

It's really only the Hawk's take-off/landing sequences, Taris fly-overs/bombardment, and endgame Star Forge battle sequences that would be difficult. They can't really be done in-engine. I did play around with the idea of redoing the take-off/landing videos, but it would be a ton of effort. I had a brief fiddle with the first half of the Manaan take-off before moving off to focus on other things. That would really require a team of people, not just because of the workload but because you'd need people to handle different facets. Like all the missing VFX in this shot for example.

Share this post


Link to post
Share on other sites

Okay that's very interesting. I'm not sure if I could help with any of the in engine stuff but I'm definitely interested to attempt recreating some scenes out of engine (which would be Blender and After Effects/Nuke for me).

 

Is there a wiki or list that has a write up of what models belong to what scene?

Did some quick testing and based on the info you provide I was able to get Malak and Revan into a Blender scene with the correct animations fairly quickly.

Still need to figure the camera and level geo.

 

image.png.6f20f647389ac14e026efc457d47b469.png

image.png.263b8d40422a4256d20845c283aa98e5.png

 

Spoke to soon! Figured out the camera and level alignment, there's still some weird timing stuff to figure out before touching up textures/lighting etc but this could be something!

image.png.32043d8e3400fcaf80034df9a1ca7058.png

image.png.40cd3e8f8da4ad0ef5b206c08d39a5b4.png

Share this post


Link to post
Share on other sites

I think doing it in-engine makes the most sense, just to keep the look consistent with the original. That way the only thing you'd need to add would be the black mist (?) screen overlay and subtitles.

  On 11/7/2023 at 9:17 PM, Pops Maellard said:

Is there a wiki or list that has a write up of what models belong to what scene?

Not as such, but here is the module list, which you can use to get the prefixes from.

  Reveal hidden contents

Share this post


Link to post
Share on other sites

So I created a stunt module for it to test it out. Seems to be some wonkiness going on with the anims. Not sure what's up with that. I'll have to take a look at the models. It also seems like the game doesn't want to apply stunt animations to a door. I guess that will require creating a dummy creature version of it, although possibly the door could just be scripted to open at the right time. Additionally, the star map will need to be scripted to play its opening anim at the end. And that pillar behind it will need to be removed (I think it's just a placeable).

Edit: Tweaked the FoV in a few shots to better match the original. Needs further work and the star map timing is possibly a bit off. But obviously resolving the stunt anims is the primary concern.

Edit 2: Ahah! It was screwy bone indexes. Should have realised sooner. I assume the models must have changed at some point in development. Recompiling the stunt models against their supermodels fixed it. Now it just needs lip sync and a bit of minor tweaking to align it with the original video's audio track.

One option would be to keep it as a purely in-engine scene. The only problem would be replicating the black screen edge "fog" VFX. You can't add any new video effect filters (like the inbuilt security camera blue/scanlines one), but you could potentially cheat it by putting a plane in front of the camera with an animated texture. Not sure how hot it would look though, and it would likely require different versions for different aspect ratios.

  • Like 1

Share this post


Link to post
Share on other sites
  On 11/8/2023 at 7:47 AM, DarthParametric said:

So I created a stunt module for it to test it out. Seems to be some wonkiness going on with the anims. Not sure what's up with that. I'll have to take a look at the models. It also seems like the game doesn't want to apply stunt animations to a door. I guess that will require creating a dummy creature version of it, although possibly the door could just be scripted to open at the right time. Additionally, the star map will need to be scripted to play its opening anim at the end. And that pillar behind it will need to be removed (I think it's just a placeable).

Edit: Tweaked the FoV in a few shots to better match the original. Needs further work and the star map timing is possibly a bit off. But obviously resolving the stunt anims is the primary concern.

Edit 2: Ahah! It was screwy bone indexes. Should have realised sooner. I assume the models must have changed at some point in development. Recompiling the stunt models against their supermodels fixed it. Now it just needs lip sync and a bit of minor tweaking to align it with the original video's audio track.

One option would be to keep it as a purely in-engine scene. The only problem would be replicating the black screen edge "fog" VFX. You can't add any new video effect filters (like the inbuilt security camera blue/scanlines one), but you could potentially cheat it by putting a plane in front of the camera with an animated texture. Not sure how hot it would look though, and it would likely require different versions for different aspect ratios.

Wow that already looks great! Definitely agree this is the correct way to go to keep it more in style with the game.

Is the black edge screen fog something they actually did in engine? If I got some time this week I'll take a look to see how close I can get at replicating it outside of the eninge.


Probably still going to play around with my Blender scene to see where it ends up as a "reinterpretation" of the cutscenes.

Share this post


Link to post
Share on other sites
  On 11/8/2023 at 2:01 PM, Pops Maellard said:

Is the black edge screen fog something they actually did in engine?

I doubt it. I'm sure they would have done it in whatever video editor they were using, be it AE or something else. Plus they did all those cross-fades and such in the revelation sequence which would have had to have been done out of engine.

  On 11/8/2023 at 2:01 PM, Pops Maellard said:

Probably still going to play around with my Blender scene to see where it ends up as a "reinterpretation" of the cutscenes.

If you want to try the in-engine version out yourself, here's the stunt module and the recompiled stunt models. Just open the console and type in "warp stunt_danruins". You'll be in the central room where the overseer droid usually is. Go left or right and interact with one of the terminals. That will launch the cutscene.

I noticed the original version's audio really drags out the door opening, so the regular door may have to be swapped out for a custom placeable that uses the stunt animation (tried the character approach, didn't work).

Dan_Dream_Stunt_Module.7zFetching info...

Share this post


Link to post
Share on other sites

Still need to test the in-engine version but it's a bit out off my comfort zone.

Download your version though and had a quick first pass at some color correction and the edge fog effect. Not quite there yet but I think I can replicate it with enough time: google drive

Share this post


Link to post
Share on other sites

So I have been experimenting a bit more with it, making some adjustments. @seedhartha helped by fixing up an issue with the rig of Malak's stunt model to allow the facial animations to work. I have been looking at the original video and comparing it to my in-game capture and looking at the animations in Max to try an sort out the lip sync timing issues. I'm not sure if it's due to the frame rate of the video (29.97fps) or something else, but the individual shot lengths don't match the individual animation lengths (30fps). For example, the first shot's animation is 16.4667 seconds, but the first shot in 09.bik is only 16.383 seconds. Not sure what the best approach to fix it might be, whether I can massage the audio to better match the animation, or if I should try and adjust the animation to match the audio.

  • 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.