#3: Porting

JCarter426

1,413 views

I’m glad to be able to talk about porting. It’s not the subject itself that I find as mysterious and alluring as some forumites seem to, but it’s been such a taboo topic for so long that I find it refreshing to be able to talk about everything I’ve been repressing.

Porting content from one game to another within the same series (e.g. Star Wars: Knights of the Old Republic to Star Wars: Knights of the Old Republic II - The Sith Lords) is now allowed on Deadly Stream. Because I’m allegedly “staff”, I was told about the change of policy a couple days before the official announcement, and I was shocked. I’m still shocked. Honestly, it feels weird discussing the topic even now. Not in a bad way - like I said, it’s rather liberating - but in an I’m still having trouble believing this is a thing sort of way. This would’ve been my tenth anniversary on LucasForums, if it were still online, and I was on the FileFront forums for a bit before that. Porting was always banned and I don’t remember when it wasn’t. When Deadly Stream went online, it maintained the same rules, and now that’s changing. It’s a shift in policy older than this website, put in place before many users here even played the games. It’s a surprise, to be sure - and I expect a welcome one for many.

Given the nature of this modding website, I expect anyone reading this likely knows well enough about porting, but not everyone is a modder or PC gamer and I have been asked before what porting is and why it’s a big deal. Porting is taking copyrighted content - models, textures, music, or what have you - from one game and putting it into a different game. It’s a kind of modding, but the distinction is that regular old modding works within the confines of whatever game is being modded, editing the existing assets and/or adding new content created by the modder, while porting involves something that wasn’t in the game and that the modder doesn’t have the rights to. Why is this a big deal? It isn’t in some communities. Different sites have different rules, and some do allow it. But it wasn’t allowed in the KOTOR community until now, though I feel I need to add a qualifier to that. It was kind of unclear. Porting was certainly against the rules on LucasForums, and with LucasForums went the KOTOR community. While I was a reviewer for KOTORFiles part of my job was to make sure the mods I reviewed didn’t have anything that wasn’t allowed. We were, for example, instructed to be on the lookout for TSLRP when the beta was leaked. If you were to ask me if porting were allowed I think I’d say no, but I don’t think that was an actual FileFront rule. JK3Files hosted mods that ported content from Jedi Outcast to Jedi Academy. There were also a few KOTOR mods I suspected of ported content - textures I recognized from Jedi Academy, for example - as well as mods that included other copyrighted material like music and sound effects. Fortunately, though, nothing ever came under my review that called for an examination of the laws of porting. To further complicate matters, the official release of MDLOps - still hosted on StarWarsKnights.com - contains a tutorial on how to port the Tenloss disruptor rifle from Jedi Outcast/Academy to KOTOR. Bit of a mixed message there.

Regardless, on LucasForums porting was certainly verboten. But for a long time, this was a moot point. There was a lot in the modding realm we couldn’t do. Until a few years ago, we couldn’t work much with head models - the animations would break, or something worse would happen. And unless you used Taina's Replacer, which didn't allow change in vertices, the smoothing would break. Even if you could get a model from point A to point B, it wouldn’t look as nice as it did back at A. Different tools could only handle different things. KAurora couldn’t do animations. MDLOps couldn’t convert lights or lightmaps, emitters, or walkmeshes. I don't know if room animations didn't work or if nobody ever tried it. All these things and more would break even if you were keeping a model in the same game. Most of these issues were only resolved last year with the development of KOTORMax, MDLEdit, and the updated MDLOps. For this reason, perhaps, porting as a reality was a rare concern. Only two cases from those days stand out in my memory, both of which involved screenshots taken in K1 to make textures in K2, and both of which deemed ok by the administration. On Deadly Stream, there was that fiasco with the credits. More often than not, the matter was merely theoretical - someone would unknowingly request something that required porting and be shot down for it. It was forbidden as a theory even though it wasn’t much of a possibility and I don’t know why. It was a rule from before even my time and I’ve never heard the issue properly debated. Porting wasn’t allowed, and you weren’t allowed to talk about why it wasn’t allowed. I find that a bit unsatisfying, so I’ll try to see things from both sides of the issue and debate myself.

Argument A: Porting is a copyright violation. It’s taking something that’s not yours and distributing it without the copyright owner’s permission. In more extreme cases, publishers have moved to shut down mod projects/websites for fear of losing sales, such as with conversion mods that would remake a game in another engine. Modding as a whole is already on shaky legal ground, so it’s not wise to attract that sort of bad attention. The line is drawn here.

Argument B: Porting isn’t anything like pirating a game because it involves a fraction of the content and requires the framework of a game to access it. It’s unlikely that any mod would negatively affect a game’s sales. If anything, more mods for a game is a good thing and content ported from one game to another draws interest in both. There’s nothing illegal about porting for personal use. The only part in question is the distribution of game assets - but that applies equally to all mods. The only difference is from which game the assets originated. It doesn’t make sense to apply a different standard of rules, especially for games in the same series that already share a lot of assets, like KOTOR.

Those are the essential arguments, as I see them. At the risk of earning Kreia’s wrath, I’m not going to take a side. This is a bit of a coward’s way out that I can take because I’m a modder and I can port stuff myself if I want to and not rely on downloading it from Deadly Stream - more on that in a bit - but that really is how I feel. I don’t see it as a matter of what’s right or wrong or what’s legal but rather what you think is a good idea and how much of a risk you want to take. Some communities take a risk and never have any trouble. Some - not many, but some - have taken the same risk and had their mods taken away. It’s a subjective matter, and maybe that’s why I’m a little bitter about the LucasForums days - because I see it more as a decision we should make as a community rather than an ultimatum that must never be questioned (even if most of us don’t know who made the decision or the rationale). But whether or not it was entirely by choice, that was what the community decided and I went along with it. That was then, this is now. It seems the community has gone in the other direction, and I’ll go along with it.

The question has become not what is allowed but what is and isn’t possible. I imagine, in the coming days, as more people ask this question there will be some poking and prodding to explore the new horizons. So I thought I’d save anyone reading this a bit of time by admitting that I’ve known how to do a lot of naughty things for a while now. I’ve been porting for personal use - not to make mods, but for my film projects that demanded it. Characters from different games interacting with each other, locations we wanted to use in another context, or just things that were useful for cinematic purposes - K2 has a lot more animations than K1. I’ve already been poking and prodding for years now and I no longer feel the need to hide it. I’m not going to go into much technical detail yet - perhaps when the modding wiki is online, if it's permitted - but I can answer some general questions right now.

 

For K1/K2:

Can we port head models?

Yes. There is some difference in the bone structure for each game, but there’s a specific process that works. It’s not even a huge difference, but it makes the lips of K1 heads clip in K2 and leaves K2 mouths gaping open in K1. My guess is Obsidian changed things during their development of the facial animation system that was never finished. The fix is essentially to copy the skin onto the appropriate game’s set of bones.

Can we port body/full body models?

Yes. Without any qualifiers.

PCs? Party members? Aliens? Really?

Yes.

What about robes with capes?

Yes. The supermodels would have to be edited to include the cape bones and their animations, but it could be done. I had one go at it but it’s a bit shoddy at the moment.

Can we port other animations?

Yes. With a few caveats. 1.) K1 has a limited number of animations that can be scripted, though new cutscene animations are an option. 2.) K2 has more combat animations than K1 and under different names. A couple bugs in K2 stem from failure to account for this, and unless they’re named properly for K1 the same sort of problem would occur. 3.) K2 has a ton of other new animations and they’re added all over the place, which complicates any sort of porting.

Can we port models with their own special animations, like Darth Nihilus?

Yes. The same animation concerns apply, but that’s it.

Can we port textures - fancy ones, like bump maps and ones with animations?

Yes. The TPC format doesn’t change, so even in the event that we’re unable to properly decompile to TGA/TXI, simply copying over the TPC is enough. I have a texture archive for K2 that includes all of K1’s textures (and any that happen to share the same file names are overridden by the K2 versions).

Can we port areas?

Probably. I’ve had one definitive success - m14aa, the Jedi enclave courtyard - and a few partial successes or failures. But it’s still early days and I suspect the problems may have been procedural. The courtyard has grass, running water, and room animations - all the things I’d expect to go wrong first - and zero problems. Lightmaps, which used to be destroyed during ASCII conversion, load fine thanks to the new tools. There is a difference in how each game is lit, so a ported module may end up too bright or too dark, but that can be fixed in the .are file. Good signs so far, but not enough for me to be confident in a hard yes yet.
While we’re on the subject, since some of you seem to have been left out of the loop, we can also edit areas now. You might’ve seen area fixes in recent mods, but I’m talking full on editing like changing the lighting or texture mapping or adding a door to a new module.  This would come in handy, for example, if one wanted to make new area mods that connect to the existing game, or integrate cut ones like the Czerka warehouse, or restore modules on Dantooine or Korriban that were left out of K2.

wymw3B7.png

Can we port feats/lightsaber forms/prestige classes/the upgrade system/the level cap/everything hard-coded?

No. These were never porting issues. These game mechanics run directly through the game’s executable rather than an external file that we can mod.

 

For the MMO:

Can we port items?

Yes. See MDLOps’ tutorial.

Can we port vehicles?

Yes. I ported the Mantis bounty hunter ship to K1 as part of an area model on Taris. I stripped it of its bump maps because I didn’t know how to work with those at the time, but I imagine if we could figure out how to convert the formats those could be included as well.

ooIsd0K.png

Can we port character models?

Probably. But you’d have to weight it to KOTOR’s set of bones, which isn’t easy or fun work. That’s kind of why there aren’t a lot of new character mods at all for KOTOR. I’m not at all familiar with how the MMO models are set up so I can’t comment further.

Can we port areas?

Maybe? I can import the models into 3ds Max. To get one in KOTOR would be a lot of work - making new lightmaps and walkmeshes, replacing any emitters like running water with KOTOR standards, almost as much work as making a new area from scratch - but I don’t see why it wouldn’t be possible. Of course, KOTOR has issues with vertical space - can’t have one walkmesh on top of another - so there may be issues with the designs, depending on the area. But I don’t think poly count or anything like that would be a problem. The MMO seems to average around KOTOR’s level, some things better, some worse. I really just haven’t had the time to try it yet.

These are all just my general impressions so far and your individual success may vary. But overall I'd say there’s a lot we can do and not a lot we can’t do - just a lot we weren’t supposed to do until now. The point of this blog isn’t to encourage porting, exactly. It’s your choice whether to do it or not. Because of the rules (the old rules) I’ve always strived to use assets that are in both games wherever possible. It’s more challenging that way, but it almost always resulted in fewer complications. Even with porting allowed, I’ll probably still do that in the future. It's simpler. But now that, surprisingly, after all this time, that is a choice people can make, I want to put this information out there so those of you who are interested in stepping down this path may do as you choose. I’ll be available on Discord if anyone wants to see some more examples of my porting attempts or get a more thorough overview of the process.

Personal opinions not endorsed by FileFront Deadly Stream.

  • Like 3


19 Comments


Recommended Comments

Is it possible, with porting- to have KotOR the 24h passage of the day and night cycle, and features realistic weather patterns?

Share this comment


Link to comment
49 minutes ago, ebmar said:

Is it possible, with porting- to have KotOR the 24h passage of the day and night cycle, and features realistic weather patterns?

No. Porting is related to assets. Dynamic day/night cycles are an engine feature, one that Odyssey doesn't support. There was thread some time back about trying to fake it via scripting a switch between different versions of the same module with different baked lighting, but it's an idea doomed to fail - too much effort involved (if it would even work at all).

Quote

I’m not at all familiar with how the MMO models are set up so I can’t comment further.

The same as any other skinned mesh, pretty much. The only difference is they split the mesh and the skeleton out into separate files.

Quote

I stripped it of its bump maps because I didn’t know how to work with those at the time, but I imagine if we could figure out how to convert the formats those could be included as well.

There's nothing special about the normal maps.They use the standard approach of storing X in the A and Y in the G channels (Z is calculated at runtime), then use the R and B channels to store various masks like emissive.

  • Thanks 1

Share this comment


Link to comment
1 hour ago, ebmar said:

Is it possible, with porting- to have KotOR the 24h passage of the day and night cycle, and features realistic weather patterns?

56 minutes ago, DarthParametric said:

No. Porting is related to assets. Dynamic day/night cycles are an engine feature, one that Odyssey doesn't support. There was thread some time back about trying to fake it via scripting a switch between different versions of the same module with different baked lighting, but it's an idea doomed to fail - too much effort involved (if it would even work at all).

Yeah. While it's been seriously looked into, and other games in the Aurora family can do it, and KOTOR does keep track of the time of day, it would take some startling, groundbreaking new information for anything to come of this. Or a ridiculous amount of scripting that no sane person is going to do.

It is, however, possible to make new weather systems via particle emitters. I don't know if they can be integrated in modules as they are in K2 - I'm guessing no - but we can easily mimic the effects by copying the emitter settings. And this isn't even really a porting issue, as both games are capable of the same feats in this regard. I think the only thing K1 is actually missing is textures for the rain and snow, which are a paltry few pixels anyway.

56 minutes ago, DarthParametric said:

The same as any other skinned mesh, pretty much. The only difference is they split the mesh and the skeleton out into separate files.

What concerns me is stuff like the facial bones, eyes, mouth setup, and shape of the neck. Not concerned that anything will be fundamentally incompatible but concerned that things will be subtly different enough from KOTOR to make the re-jiggery a huge pain.

56 minutes ago, DarthParametric said:

There's nothing special about the normal maps.They use the standard approach of storing X in the A and Y in the G channels (Z is calculated at runtime), then use the R and B channels to store various masks like emissive.

Ah, I figured there was nothing truly arcane about it. I just remembered the different channels being used for different things and made a mental note that one would have to figure out which is which and the proper conversion process. But one seems to have figured that out already. That sounds simple enough. Could probably be done with a Photoshop macro if there isn't a plug-in for it already.

  • Thanks 1

Share this comment


Link to comment
54 minutes ago, JCarter426 said:

Could probably be done with a Photoshop macro if there isn't a plug-in for it already.

I did a half-assed action for PS for DAO normal maps back in the day that can be used in conjunction with the nVidia plugin to recreate the Z. It will also work on TOR maps.

https://www.nexusmods.com/dragonage/mods/4019

54 minutes ago, JCarter426 said:

What concerns me is stuff like the facial bones, eyes, mouth setup, and shape of the neck. Not concerned that anything will be fundamentally incompatible but concerned that things will be subtly different enough from KOTOR to make the re-jiggery a huge pain.

I've never looked at it, so I couldn't say, but yeah it would be unlikely to be a very close match. That shouldn't prevent doing a port, but face skinning is always a pain in the ass.

  • Like 1
  • Thanks 1

Share this comment


Link to comment

Let's say if I wanted to port a Deveronian head from TSL into K1 I'd have to rework the bones for that head to actually work so if this is the case what tools would I need to do that?

Share this comment


Link to comment

If you want to minimise issues, you'd import the TSL head, save out the skin weights, delete the rig, then load in the K1 rig, load the skin weights back in. The eyes/eyelids/teeth are all effectively visible bones, so you'd need to add those back to their proper place in the hierarchy.

Share this comment


Link to comment
4 hours ago, N-DReW25 said:

Let's say if I wanted to port a Deveronian head from TSL into K1 I'd have to rework the bones for that head to actually work so if this is the case what tools would I need to do that?

Notepad. Yeah.

What DP said is the right process, but because 3ds Max is unreliable with KOTOR models that can cause some serious annoyances - one of the big problems is when you get a difference between what the game thinks is the pivot point and what your modeling program thinks is the pivot point, which skins are especially susceptible to. One particular failure of mine resulted in an eternally sad Malak. Rather than mess about with that, I find it easier to edit the ASCII file directly so you get a model that imports with most things working properly. That minimizes all the fussing around in the hierarchy too. Here is my procedure:

  1. Open your head from Game A ASCII in Notepad.
  2. Copy all the visible geometry from it (head and tongue skins, eye and teeth meshes, plus any extras like hair dangly meshes).
  3. Get a similar head from Game B. Remove all the visible geometry (same stuff as above). Export an ASCII file.
  4. Copy the geometry from step 2 to the ASCII from step 3 in Notepad.
  5. Use find and replace to make sure everything is parented to the right stuff (replacing the first model's name with the second's).
  6. Import into 3ds Max.
  7. Using the original head as a reference, make sure all the geometry is in the correct position. It seems that anything without a skin modifier won't necessarily go in place; for example, Malaks's eyes and teeth had to be moved. I usually look at the XYZ values and enter them, but if you want to mess around with the hierarchy you could delete them, import them from the original game ASCII, and put them back in place.
  8. Rename your model how you want it for the final time.
  9. Export.
  10. Convert to binary.
  • Thanks 1

Share this comment


Link to comment

One thing you forgot to mention in your MMO content porting summary - sound. Music, FX, and (perhaps most interestingly) VO could all be ported to K1/TSL. Of particular note is that Grey DeLisle (Handmaiden), Catherine Taber (Mission), and Jennifer Hale (Bastila) all have major roles in TOR, and using the same voice accent/intonation as in K1/TSL, so have plenty of dialogue to utilise. Other notable mentions that play named NPCs in TOR are Kristoffer Tabori (HK-47), Tom Kane (Master Vandar/Uthar Wynn/others), Charles Dennis (Davik/Lt Grenn), Daran Norris (Goto), Greg Ellis (Disciple), Phil LaMarr (Gadon Thek/Cpt Riken). There are also a few others doing "misc" voices in both, but they might be hard to pin down (and the content is probably minimal).

  • Like 2

Share this comment


Link to comment

Oh yeah, you're totally right. That was part of the impetus for including the MMO under the "same series" clause in the first place. In addition to the actors you mentioned, there's also the possibility of alien VO. I've thought about replacing the garbage Huttese the Rakatans speak, for example.

Share this comment


Link to comment

Regarding TOR areas, as far as I know only static meshes like buildings and so forth are extractable as usable meshes. The terrain meshes and layouts are stored in a file format that there is no publicly available importer for (that I know of). So you could partially recreate environments, particularly indoor ones, but it would all have to be assembled by hand from the component pieces. For outdoor areas that rely heavily on a base terrain mesh, say something like Tatooine or Hoth, you'd be out of luck for big chunks of it unless you modelled it from scratch. Or unless you could find someone to reverse-engineer the file format and code some sort of import/conversion script/program.

Share this comment


Link to comment

How is the file naming in SWTOR? Or better: How long would it take to find a certain sound file or texture or whatever?

Share this comment


Link to comment

TOR's files are all stored in archives with hashed filenames. You need a program to extract them and a hashlist to generate the proper filenames. Unfortunately publicly available hashlists tend to be somewhat out of date, so more recent content is probably not accessible. Once extracted, the files are all arranged in various sub-folders. Some things can be found by a simple filename search, but other stuff might require searching through XML files to discover the actual filename of the thing you are looking for (body parts for clothes/armour being a good example).

Format-wise:

  • Models are in a customised GR2 (Granny) format. For dynamic (i.e. skinned) meshes, skeletons are stored in a separate model. You'll need a Max or Blender script to import.
  • As mentioned above, terrain meshes and level layouts are stored in some sort of (presumably custom) DAT format
  • Textures are standard DDS
  • Animations have been figured out privately, but there is no publicly accessible import script available
  • Audio is stored in Wwise formats. Dialogue is in ACB and BNK archives, music as straight WEMs. These probably need to be manually listened to in order to find specific lines.
  • UIs use Scaleform (a game-centric derivative of Flash)

A current extraction of correctly named files in something in the order of ~50GB, ~600K files, ~14K folders. I'm not sure how much is missing, probably multiple gigs at least.

Share this comment


Link to comment
9 hours ago, DarthParametric said:

Regarding TOR areas, as far as I know only static meshes like buildings and so forth are extractable as usable meshes. The terrain meshes and layouts are stored in a file format that there is no publicly available importer for (that I know of). So you could partially recreate environments, particularly indoor ones, but it would all have to be assembled by hand from the component pieces. For outdoor areas that rely heavily on a base terrain mesh, say something like Tatooine or Hoth, you'd be out of luck for big chunks of it unless you modelled it from scratch. Or unless you could find someone to reverse-engineer the file format and code some sort of import/conversion script/program.

I looked at some indoor/urban areas and it didn't seem too bad. They're separated into different rooms like KOTOR but it seemed logical for the most part and not as many rooms per area. The really important thing is that the meshes (at least what I looked at) will import mapped with their textures mapped properly - once you have that, there's no reason they couldn't be put into KOTOR.

I hadn't looked at outdoor areas, but what you say makes sense and that's unfortunate. Generating terrain isn't the most difficult thing so it may be simpler to make new ones and only rely on the texture assets.

9 hours ago, Kexikus said:

How is the file naming in SWTOR? Or better: How long would it take to find a certain sound file or texture or whatever?

Not long after the game came out, I extracted and converted all of the sound effects to see what was available. And it was all like .001.ogg, .002.ogg, for thousands and thousands of files. This was before there was a hash list available, you see, and with one it is a little better. They're divided into folders based on where/how they appear in the game (Location_FP_Ilum_Space_Station, Abilities_Republic_Ranged, Location_Act_3_Ships, and so on) but there are still hundreds of files in each folder. There are a thousand weapon files, for example, still only named weapons_001.ogg to weapons_1027.ogg. Maybe those are catalogued in an XML file too if we're lucky? I haven't had a proper go at them, only made a marginal effort to extract things when I had the tools.

There has already been a concentrated effort to organize the music. Funny thing is we now have access to a handful of KOTOR tracks via the MMO that wasn't available in the original games.

Art is really hit or miss, depending on what the hash list has covered. Worst case, you get a file like 0A34C219_57DDEB1C5B7F5536 but a lot of them are pretty specific about what they are.

Share this comment


Link to comment

I was looking at Juhani and wondering whether it might be worth porting a TOR Cathar head to replace her (and maybe add additional NPC and/or player heads). I noticed they actually have something like her hairstyle as a player Cathar option, which I would guess was an intentional nod. There's also a set of facial markings that are kind of in the same ballpark.

 

I was also thinking how this is really a situation where being able to do something like what Motionbuilder does and map the animations to a different rig would be awesome. If you could transplant the K1/TSL animations to a TOR rig, you could just create some new supermodels and import the TOR models as-is, without needing to go through a whole bunch of editing and reskinning.

Share this comment


Link to comment

I hadn't thought of that. Which is strange, because I've considered the process before. I actually have MotionBuilder and I have a library of thousands of animations that I've collected from various free sources like Mixamo (RIP) and the Unity Asset Store. I intended to see whether they could be applied to the KOTOR skeletons so we could get new animations without having to make them by hand. I haven't had the chance to properly look into it.

But I hadn't thought of putting the KOTOR animations on the MMO skeletons. That would definitely save us some trouble if it could be done. And if it could be done without breaking the rest of the rig, we could have a mix of both. Some sort of common MMO supermodel and then unique animations on whatever model that would have unique animations. For example, it would be nice to port some of the aliens that aren't in KOTOR, like the Selonians, and we'd likely want to keep whatever unique animations they have while still enabling them to use the stock KOTOR set. That would just be a matter of changing the animation names to pause or talk or whatever.

But that depends on getting the animations to work at all. I haven't specifically tried it yet but I noticed Noesis wouldn't export any of the skeletons.

In the meantime, I've been working on making this a thing:

k6QoPVj.png

Share this comment


Link to comment

There are Max import scripts that import the TOR skeleton, so that's not a drama - https://forum.xentax.com/viewtopic.php?f=16&t=11317  (don't forget to grab the update on page 2).

The problem is you can't get the KOTOR rig and animations out of Max, at least not in a form that Motionbuilder would work with. I think the only practical option currently would be to create a new KOTOR rig from scratch using actual bones.  Unless someone created a Max script that automates the geometry to bones process.

Edit: Well, well, here is something quite interesting:

K1_Male_Rig_Dance_01_TH.gifSpacer_50.pngK1_Male_Rig_Dance_02_TH.gif

This is the K1 male rig in Cinema 4D. I discovered that you can use the Max Bone Tools to mark any object as a bone ("Bone On"), so when you export the KOTOR rig as an FBX you get proper bones in other apps. And you can also export the animations, as our fine dancing friend here demonstrates. Somewhat ironically it doesn't look like this when importing back into Max, as for some reason the FBX  importer screws up the bone sizes so they end up as tiny cubes.

The only real problem I can see now is that the TOR import script imports the meshes/rig rotated 90 degrees. I wonder if we might be able to get someone like @bead-v to have a look at it and add in a snippet that would correctly orient it? It would still need to be scaled, but that can probably be done manually.

Edit 2:  So setting the FBX import dialogue bone option to "Convert as Dummy" solves the problem of the bones being the correct size/shape in Max, albeit as dummy objects rather than true bones (it also causes some weird visibility issues unless in wireframe mode). Looking at a TOR import, it seems the root bone of the rig ends up with a Y rotation of 180°. Meshes have their rotation values at 0°, despite being in the same position. Based on that, the scripts ideally need adjusting to do a -180° Y rotation and a 90° X rotation to import TOR assets in the same orientation as KOTOR assets. Scaling still needs to be examined in depth, but from a cursory glance it looks like a BMN rig is going to need to be around 87% of the original TOR scale to match a medium K1 male rig. I haven't looked at a female yet.

Edit 3: After some Googling I came across some Maxscript that will allow for a quick and dirty rotation of the current object selection:

(
group selection name:"MyGroup" select:true
$MyGroup.pivot = [0,0,0]
rotate $MyGroup (angleaxis -180 [0,1,0])
rotate $MyGroup (angleaxis 90 [1,0,0])
ungroup $MyGroup
)

You can also insert the line

select $*

at the top to automatically select everything in the scene. But this will add those rotations to every object, which is probably undesirable when dealing with bones/animation. I'd prefer to "offset" the world axis during the import so that the original rotations are retained.

Edit 4: So I am guessing that the TOR team must use Maya. That would explain the models - they are in a Y up, Z forward facing (right-handed?). KOTOR needs a Z up, Y forwards facing (left-handed?). My meagre understanding of these sorts of things is that this can be solved with a matrix transform.

Share this comment


Link to comment
On 6/17/2018 at 8:40 PM, JCarter426 said:

Here is my procedure:

Spoiler
  1. Open your head from Game A ASCII in Notepad.
  2. Copy all the visible geometry from it (head and tongue skins, eye and teeth meshes, plus any extras like hair dangly meshes).
  3. Get a similar head from Game B. Remove all the visible geometry (same stuff as above). Export an ASCII file.
  4. Copy the geometry from step 2 to the ASCII from step 3 in Notepad.
  5. Use find and replace to make sure everything is parented to the right stuff (replacing the first model's name with the second's).
  6. Import into 3ds Max.
  7. Using the original head as a reference, make sure all the geometry is in the correct position. It seems that anything without a skin modifier won't necessarily go in place; for example, Malaks's eyes and teeth had to be moved. I usually look at the XYZ values and enter them, but if you want to mess around with the hierarchy you could delete them, import them from the original game ASCII, and put them back in place.
  8. Rename your model how you want it for the final time.
  9. Export.
  10. Convert to binary.

 

Super-cool! Thank you for this. :cheers:

Share this comment


Link to comment
Guest
Add a comment...

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