Recommended Posts

Would there be anyone out there who would want to make a head that resembles Jaesa Willsaam's from Swtor? Or possibly even a port of the model for Kotor 2?

I was thinking about doing a light side playthrough of TSL, and thought it would be cool to play as my favorite companion from the MMO.

 

Jaesa Willsaam Swtor model 

  • Light Side Points 1

Share this post


Link to post
Share on other sites

I've made an attempt at it. It hasn't been tested beyond character creation and the first conversation with Kreia, so treat it as a beta/WIP:

 

TSL_TOR_Ported_Jaesa_Willsaam_Head_01_TH  TSL_TOR_Ported_Jaesa_Willsaam_Head_02_TH

TSL_TOR_Ported_Jaesa_Willsaam_Head_03_TH  TSL_TOR_Ported_Jaesa_Willsaam_Head_06_TH

A few notes:

  • While aligned as closely as possible, the neckline won't match perfectly. Expect some visible gaps on body models that don't hide the join, like underwear.
  • The TOR head models use separate textures for the face, eyes, and hair. In order to allow for DS transitions, these had to be merged together (and the UVs adjusted to match). The eyes are the big loser in this. They went from having their own dedicated 256x256 texture to being shrunk down to a ~80x80 corner where they could be squeezed in.
  • An additional consequence of the texture merge is no normal maps, due to the hair requiring alpha masking.
  • Regarding DS transitions, there's just the one, using Jaesa's DS appearance. Pic.
  • TOR heavily relies on tint mapping textures for variation - skin tone, hair colour, eye colour, etc. Unfortunately, while the tint colours are available in the material files, the specifics of their shaders are unknown (to me at least), so the best I can do is experiment with various blend modes to approximate the look. It may require some further experimentation and kludging. It doesn't help that TOR's in-game result is heavily influenced by the room/area lighting.
  • Not even having specularity, much less the advanced (by comparison) graphical features of TOR, expect textures to look pretty flat by comparison to the originals.
  • KOTOR has a maximum bone limit per mesh of 16. This creates a problem for TOR meshes, as adding the eyelids to the face bone array pushes that to 18. I had to drop 2 bones to make it work. I chose the two nose corner bones, as they seemed the least important. I don't know what effect this may have on various facial animations though. It's probably not too big a deal for a player head, but it could be troublesome for NPC heads. Vanilla KOTOR head meshes have the eyelids as separate trimeshes for this reason.
  • The hair meshes in TOR are cloth driven, the same as Twi'lek lekku, capes, etc. Obviously KOTOR doesn't have any provision for that. It does have danglymeshes, but I haven't tried it out with Jaesa's hair yet, so currently it is completely rigid.
  • The skin weights were produced by skin wrapping a KOTOR head, with some manual touch-up afterwards. The result is pretty rough. It could stand being redone by someone that actually knows what they are doing. It shouldn't be too bad for a player head, but there will likely be deformation issues when speaking if used for an NPC.
  • Like 1
  • Thanks 1
  • Light Side Points 5

Share this post


Link to post
Share on other sites
12 minutes ago, DarthParametric said:
  • KOTOR has a maximum bone limit per mesh of 16. This creates a problem for TOR meshes, as adding the eyelids to the face bone array pushes that to 18. I had to drop 2 bones to make it work. I chose the two nose corner bones, as they seemed the least important. I don't know what effect this may have on various facial animations though. It's probably not too big a deal for a player head, but it could be troublesome for NPC heads. Vanilla KOTOR head meshes have the eyelids as separate trimeshes for this reason.

Did you try the version with the 18 bones? I think we still don't know what happens in the game in that case. Both kotormax and mdledit should give you warnings but let you do it in the end.

Nice job otherwise and thanks for writing up the notes. I hope we get the wiki soon so we can write up some kind of conversion tutorial using this info.

Share this post


Link to post
Share on other sites
Just now, DarthParametric said:

Yes. It drops 2 bones - affected verts stretch down to world 0.

Uyyyy... I'll convert the warnings to error messages then!

Share this post


Link to post
Share on other sites

Like I said, that would be why KOTOR uses tacky trimesh eyelids instead of animating flaps on the face mesh. If the smoothing across meshes issue can be fully resolved, the easiest solution is probably just to slice the head in two at the nose before exporting.

Share this post


Link to post
Share on other sites
6 minutes ago, DarthParametric said:

If the smoothing across meshes issue can be fully resolved, the easiest solution is probably just to slice the head in two at the nose before exporting.

It will be resolved! I don't know why Visas' head didn't work for you, because it really seemed to work for me. But I think we're closer now, at least. I'll look at it again after my exam.

Share this post


Link to post
Share on other sites

Wow, I didn't expect an attempt so soon. I was looking at it an hour ago and thinking I do not want to be the first to try that. It looks like all of my concerns about the process have been realized, and then some.

48 minutes ago, DarthParametric said:
  • While aligned as closely as possible, the neckline won't match perfectly. Expect some visible gaps on body models that don't hide the join, like underwear.

This was the main point I was thinking on earlier. The MMO necks are much rounder than KOTOR's because that's how necks work. But that means they don't match the KOTOR bodies. I expect this can be fixed by reducing the amount of vertices to match the KOTOR standard. It won't look as nice, but at least it will all connect.

48 minutes ago, DarthParametric said:
  • The TOR head models use separate textures for the face, eyes, and hair. In order to allow for DS transitions, these had to be merged together (and the UVs adjusted to match). The eyes are the big loser in this. They went from having their own dedicated 256x256 texture to being shrunk down to a ~80x80 corner where they could be squeezed in.

Well, we could just use big textures. If it's four or less per head and the extremities are only 256x256 it wouldn't get too ridiculous. What's the size of the face texture?

48 minutes ago, DarthParametric said:
  • An additional consequence of the texture merge is no normal maps, due to the hair requiring alpha masking.

Oh, of course....

Should be fine for NPCs though. If you wanted it for a player or party member you could copy the Handmaiden's setup maybe. I think her heartbeat has a script to change her appearance. Then you just don't use texture variations for the head, and that way you can keep the original different textures too. Might not be practical, but it depends on the context.

48 minutes ago, DarthParametric said:
  • TOR heavily relies on tint mapping textures for variation - skin tone, hair colour, eye colour, etc. Unfortunately, while the tint colours are available in the material files, the specifics of their shaders are unknown (to me at least), so the best I can do is experiment with various blend modes to approximate the look. It may require some further experimentation and kludging. It doesn't help that TOR's in-game result is heavily influenced by the room/area lighting.

I expect we'll have to deal with the same thing for armors.

48 minutes ago, DarthParametric said:
  • Not even having specularity, much less the advanced (by comparison) graphical features of TOR, expect textures to look pretty flat by comparison to the originals.

To be honest, the specular MMO heads look bad to me and I'd rather see a talented individual add actual texture detail instead.

48 minutes ago, DarthParametric said:
  • KOTOR has a maximum bone limit per mesh of 16. This creates a problem for TOR meshes, as adding the eyelids to the face bone array pushes that to 18. I had to drop 2 bones to make it work. I chose the two nose corner bones, as they seemed the least important. I don't know what effect this may have on various facial animations though. It's probably not too big a deal for a player head, but it could be troublesome for NPC heads. Vanilla KOTOR head meshes have the eyelids as separate trimeshes for this reason.

I didn't even think of this one. I didn't realize the eyes were that different. But wouldn't you have to scrap all the MMO bones anyway for the KOTOR animations to work right?

48 minutes ago, DarthParametric said:
  • The skin weights were produced by skin wrapping a KOTOR head, with some manual touch-up afterwards. The result is pretty rough. It could stand being redone by someone that actually knows what they are doing. It shouldn't be too bad for a player head, but there will likely be deformation issues when speaking if used for an NPC.

It might be rough, but it looks a lot better than I'd expect for a first attempt. The difference in art style also doesn't stand out nearly as much as I'd expected, maybe because of the specular loss. I'm still thinking I do not want to try this yet, but the prospects look good.

Share this post


Link to post
Share on other sites
27 minutes ago, JCarter426 said:

But wouldn't you have to scrap all the MMO bones anyway for the KOTOR animations to work right?

In this case, yeah, I just started from a unskinned mesh. Which was useful anyway as I could weld together some seams that were a bit nasty. Although I did save out the original skin weights, and bake a copy with the skin utilities. I was originally going to try a weight transfer to the KOTOR rig, but the last time I tried that it didn't turn out so hot, so I figured I'd just skip straight to a skin wrap of a vanilla head. It also allowed me to split out the eyes, teeth, and tongue meshes without trying to deal with it all as one mesh while trying to transfer weights, which is a nightmare with how many verts and overlapping polys they have crammed in their gob.

27 minutes ago, JCarter426 said:

What's the size of the face texture?

The original face and hair textures are both 512x512. so I just put them side-by-side in a 1024x512 map. There really wasn't any way to sanely tack on the eye texture that didn't result in a ton of wasted space (and make the eye texture ridiculously oversized). The logical thing to do was to shrink the eye texture and fit it in where I could.

27 minutes ago, JCarter426 said:

This was the main point I was thinking on earlier. The MMO necks are much rounder than KOTOR's because that's how necks work. But that means they don't match the KOTOR bodies. I expect this can be fixed by reducing the amount of vertices to match the KOTOR standard. It won't look as nice, but at least it will all connect.

It's actually not too bad. I just checked and the underwear has a bit of a lip around it. I think Obsidian must have added that, as I know I have had gap issues in K1 with just the vanilla heads. I had to scunch the verts up a bit vertically, as TOR necks are longer than KOTOR's. Then I just snapped to verts where possible, and snapped to edges in between.

TSL_TOR_Ported_Jaesa_Willsaam_Head_08_TH

Share this post


Link to post
Share on other sites

Ah, yeah, that does look decent. I see you still kept some of the subdivisions by snapping the vertices to edges. Should be fine so long as they're weighted the same and I think pretty much the whole head is weighted either to the neck or the head bones anyway.

As for the textures, I can see why you'd scale them down but I don't think a 1024x1024 texture with tons of wasted space would make all that much difference to the loading time. Though the eyes probably don't need that much detail to begin with, considering plenty of KOTOR heads have the whole thing on a 256x256 texture.

Share this post


Link to post
Share on other sites
19 minutes ago, JCarter426 said:

Should be fine so long as they're weighted the same and I think pretty much the whole head is weighted either to the neck or the head bones anyway.

The bottom row of neck verts is weighted 100% to necklwr_g,.

19 minutes ago, JCarter426 said:

I don't think a 1024x1024 texture with tons of wasted space would make all that much difference to the loading time.

Even if I scaled up the eye texture to 512x512 (which is hilarious levels of overkill given the whole face texture is only that big), there'd still be a whole quarter of the texture empty. I'm not opposed to large textures. Hell, my droid textures are all 4096x4096. But it just seemed stupid. There'd be more wiggle room on, say, a Twi'lek, which would require a 3rd map for the lekku, or a male character with a beard, which again would require another map. In that case, yeah, I'd probably just tack the 256x256 eye texture on and live with the dead space (assuming there wasn't sufficient free room somewhere. This is also all under the proviso that the remapping is (aside from the eyes) strictly only compressing U and repositioning V for rectangular texture combinations, or otherwise just scaling 0.5x0.5 for a 4x4 combo. If you wanted to completely rearrange the UVs then no doubt you could slip the eyes in without losing any pixel density, but that seems like a hell of a lot more trouble than it is worth, At least this way (mostly) retains compatibility with the source textures besides a little repositioning.

Share this post


Link to post
Share on other sites

Yeah, I agree. With almost half the texture black it's rather silly. But some modders insist on having 4096x4096 textures even when there isn't any real detail there. With that in mind, willfully scaling 256 down to 80 feels like sacrilege.

Share this post


Link to post
Share on other sites

I'll do a quick test here and see how it looks in game.

I'm probably going to make a run for breakfast and then I'll come back and report any thing I find.

I'll probably have to toggle my vertex buffer though, since I'm running the game off of the Steam Patch and that doesn't like to play nice with a lot of the textures on lightsaber hilt mods.

Share this post


Link to post
Share on other sites

Okay Darth, I have the files installed and the first problem I've hit is that the head does not show up in the selectable options in the character creator. 

I tried to alter the appearance of Mira as a test to view the head in game, and that resulted in her bugging out and giving me the "So Very Broken" message.

Doing the same thing to a female PC results in the screen being black. Both the head and the portrait can't be view in game for me. I have other mods installed, but nothing that would alter the appearance.2da file and cause a conflict. Unless TSLRCM alters it and is the conflict.

Share this post


Link to post
Share on other sites
48 minutes ago, DarthParametric said:

If you are using TSLRCM from the Workshop, you need to install the mod to TSLRCM's Workshop folder, not the game folder.

Still having the same issue. :(

hmmm

Share this post


Link to post
Share on other sites

If you are also using the standalone M4-78, needs to be installed in its folder. Or if you are using some other Workshop mod that alters appearance.2da over the top of those, then whatever that is.

This is why people say not to use the Workshop.

  • Like 1

Share this post


Link to post
Share on other sites
7 minutes ago, DarthParametric said:

If you are also using the standalone M4-78, needs to be installed in its folder. Or if you are using some other Workshop mod that alters appearance.2da over the top of those, then whatever that is.

This is why people say not to use the Workshop.

So I went through and reformatted my Override folder, and I have the head appearing in the character screen now. I also rolled back my version of Kotor 2 to the 1.2b patch before the Steam update. About to test out the model now.

Share this post


Link to post
Share on other sites

Looks great! Excited to see how people bring other TOR heads into KotOR. A Canon Exile head is the most obvious one to me, but I know that I'd like to see my Sith Warrior's head ported in. I wonder how that would work for modding custom character creation heads in? I imagine it would be much trickier/impossible.

Share this post


Link to post
Share on other sites
4 minutes ago, UnusualCharacters said:

Looks great! Excited to see how people bring other TOR heads into KotOR. A Canon Exile head is the most obvious one to me, but I know that I'd like to see my Sith Warrior's head ported in. I wonder how that would work for modding custom character creation heads in? I imagine it would be much trickier/impossible.

If I were more skilled in what I could do with mods, I would totally port over my Jedi Knight's head! But Jaesa and Kira are my two hopefuls right now. Either to use for separate playthroughs, or to reskin Handmaiden and Visas and just use in my party.

Share this post


Link to post
Share on other sites
11 minutes ago, UnusualCharacters said:

I wonder how that would work for modding custom character creation heads in? I imagine it would be much trickier/impossible.

There are no custom heads as such. At least not in terms of morphs like in Mass Effect, for example. There are only a handful of fixed player head models, with various textures for complexion/makeup/scars/tattoos/etc. plus some addon meshes for beards/cybernetics/jewellery/etc. It wouldn't be significantly more difficult to recreate one of those, just not particularly practical given that each such head would need to be manually assembled and compiled into something KOTOR could use. It may eventually prove less burdensome if plans regarding utilising the TOR skeleton bear fruit, but as it stands now I'd not expect too much in that regard.

11 minutes ago, UnusualCharacters said:

A Canon Exile head is the most obvious one to me

As per this thread, there's no canon Exile in terms of a unique mesh like Revan, Satele, Malgus, etc.  It's just a slightly altered version of a generic NPC head shared by Kira Carsen.

  • Light Side Points 1

Share this post


Link to post
Share on other sites
2 minutes ago, DarthParametric said:

As per this thread, there's no canon Exile in terms of a unique mesh like Revan, Satele, Malgus, etc.  It's just a slightly altered version of a generic NPC head shared by Kira Carsen.

Right, though while it might not be unique in TOR, it's still her given head in terms of what was present in the game. That generic head would be more accurate to Legends canon then current "canon" mods, and it would be unique in TSL at least. The grey hair is a big head-scratcher though, given her brown hair in the Revan novel. Guessing they only did that so that the ghostly effect is more prominent.

4 minutes ago, DarthParametric said:

There are only a handful of fixed player head models, with various textures for complexion/makeup/scars/tattoos/etc. plus some addon meshes for beards/cybernetics/jewellery/etc. It wouldn't be significantly more difficult to recreate one of those, just not particularly practical given that each such head would need to be manually assembled and compiled into something KOTOR could use.

Yeah, that's what I figured. Having to compile specific combinations would become a tall order - like "I want this face, with this hair, with this beard, with this skin/eye color" etc. Much easier to stick with existing models.

Share this post


Link to post
Share on other sites

Is there a way to get the Head model to show up in the Heads.2da section on the Kotortool? I was going to stick the Jaesa Head onto the Handmaiden to do a dialogue test, but I can't find the name anywhere in there. 

Share this post


Link to post
Share on other sites

If you enable the "Look in the game's Override" option in  Tools -> Options -> Other then it will read 2DAs in the base game Override folder. It doesn't know about Workshop folders though.

Share this post


Link to post
Share on other sites
11 minutes ago, DarthParametric said:

If you enable the "Look in the game's Override" option in  Tools -> Options -> Other then it will read 2DAs in the base game Override folder. It doesn't know about Workshop folders though.

So I'm only using the base game Override, but I still can't get the head to appear in the Heads.2da file for the Kotor Tool. I have the read from override option checked, but I don't see the Jaesa or Tor_Jaesa head in there.

The destination to my override is as follows:

C:\Program Files (x86)\Steam\steamapps\common\Knights of the Old Republic II\Override

 

Is there any reason why it wouldn't be appearing? Or is there some way that's easier to replace a head on an NPC without using the Kotor tool? I know that the Save Game Editor can do it as well, but some NPCs like the Handmaiden are wonky with that because of their unique model when in basic clothing.

I'm sorry to bug you with this by the way. I really appreciate your work on this.

Is there anyway that you could write up a simple Handmaiden replacer with the Jaesa head with the TSLpatcher? 

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.