RC3117

Extracting and Posing KOTOR models

Recommended Posts

Hey folks! It has long been my dream to be able to play a Star Wars Tabletop RPG using 3D models from KOTOR 1&2. So I took the plunge recently to learn everything I need to know, and I am so close! I can extract the game files from the game, import them to blender, pose the model, slap it on a base, and even give it a weapon! but where I am hitting a rather large brick wall is the final export of the model as a whole along with its textures. I can export the OBJ just fine, looks great in Tabletop Simulator and everything. But no matter how I do the texture file, manual UV, Auto UV, and various bake settings, it always ends up a huge mess. Attached is the Blend file. Pretty sure that is all that is needed. If anyone can help me figure this out they would be my hero.

SithTrooperStandingMK2.blend

My goal is to update what this modpack for Tabletop Simulator started.

https://steamcommunity.com/sharedfiles/filedetails/?id=903796705

I am effectively trying to mimic what he did with the [Props] Droids -> either of the models holding a gun. This proves to me one of two things. Either there are models stored in the game of npcs standing holding guns very lamely, or there is a way to merge texture files with these files, and I can't figure it out.

Also, in another bag called [Anim} NPC's - WIP, he has 10 NPC's made. Their models have the generic sway back and forth still and the texture follows it. How did he manage to do that?

Share this post


Link to post
Share on other sites

I'm seeing quite a few issues here.

You seem to have deleted some geometry around the shoulders and elbows. I'm assuming this is either by mistake or perhaps you've tried to pose the character's arms by moving the vertices around and this happened as collateral damage.

Spoiler

768490038_Annotation2020-05-15011602.thumb.jpg.0cb6f8e084e51f7ad70453759d877638.jpg

The Sith Trooper texture is set up fine, but what's up with material nodes spaghetti fest for the weapon and base? From what I can see, you were trying to add some specularity (shininess) to the weapon and base, am I correct?

Spoiler

145387914_Annotation2020-05-15010900.thumb.jpg.895ca4e0e9bd5876142510d399ea4ceb.jpg

If I understand correctly the problem you've described, it's that you want to combine all textures into one single image file, isn't it? If so, just unwrapping the UVs is not quite enough, you have to bake a new combined texture. I can walk you through it if that's what you're going for, but you'll want to correct the issues I've stated above first.

I don't own TableTop Simulator so I'm not able to take a look at the files. When you say "sway back and forth", do you mean the characters follow the same animations as in the kotor games? If that's the case, it means the author ported kotor's animations into his mod. Not sure how the community would feel about that though.

Share this post


Link to post
Share on other sites

Thanks for the reply Stormie97.

For the first part about the geometry around the shoulders and elbows, that is the collateral from moving the arms to pose it. I needed to cut the model into pieces to bind them with bones to get a semi okay stance. How does this affect the bake?

As for the weapon and base, I pulled the weapon from a mod-pack that had that weapon already imported into Tabletop Simulator and the base is the base from a different model also already imported into TTS.

Yeah, I need to combine all the textures into one single image file so that TTS will load them onto the model correctly in game. I am not exactly sure how to fix either of the above issues.

As for the sway, I found out that the mod creator used Unity to add the animation features to the models. That is a whole other rabbit hole that I have been trying to figure out. With unity I can't seem to create a .unity3d file like TTS says is required. But that is for a later project.

Right now I just want simple to merge the 3 different texture files into one so that I can upload the model and unified texture into TTS.

Below I have eliminated all the extra nodes. Far as I can tell everything seems to be fine.

unknown.pngunknown.pngunknown.png

One other question, when I have the program in Cycles Render it looks great.

unknown.png

But when I put the program into Blender Render it looks all messed up.

unknown.png

Share this post


Link to post
Share on other sites

No it won't affect the bake, just pointed it out in case that'd be something noticeable in the game you want to put this in (it probably will be). Generally to make characters pose, you want to use a skeleton rig so that you can move the bones around to make the pose you want. I'm attaching the blender file here, feel free to use it (or anyone else reading this). It was made for a character ported from another game but it should work fine for the Sith trooper model with a few adjustments. This way, your models won't need to have holes everywhere.

I use Blender 2.8+ which I definitely recommend, unless you really need 2.79 for some reason (such as plugins that don't exist for 2.8). The general process goes like this:

  • In Object Data Properties, under UV Maps, create a new UV map. Name it however you want. Do this for each of the meshes and make sure they all have the same name name for that second UV set.
  • For each of these objects, click on their new UV set and proceed to unwrap your model however you want. There a different possible approaches here. You can make sure you don't hit Unwrap and just rearrange the UVs as they exist in the first, original UV map so that all of them fit into one image. Or you can select everything, hit U, 'Smart Unwrap' and call it a day.
  • Once your second UV set is ready, duplicate your objects. Rename the duplicates into something like "[NAME].orig". Name the others something like "[NAME].new" (this is just to make these instructions clearer). On the .orig meshes, delete the second UV map you've created. On the other meshes, delete the first UV map so as to only retain the UV unwrap you've created.
  • Now for each mesh: Select a .orig mesh. In the material node editor, add an Image Texture node. Create a new image and name it "MyTexture" or whatever, with the resolution you'd like. Whether no alpha channel is need depends on your target game engine and the results you want to achieve. Make sure the new image texture node is active. Now, CTRL + select the corresponding .new mesh. Create a new material, set it up as a simple Image Texture -> Diffuse BSDF ->  Material Output, with the "MyTexture" image selected in the Image Texture node. Make sure the Image Texture node is selected here as well. Now go to the render tab and select Cycles. Scroll down to Bake and select "Diffuse" in Bake Type. Uncheck "Direct" and "Indirect" under Influence as to only retain "Color". Click on the "Selected to Active" checkbox. Hit the "Bake" button, and after a few moments your MyTexture image should contain the texture information of the mesh you've baked. Repeat the process for the other two meshes, just make sure that "Clear Image" is unchecked under Output or Blender will just keep erasing whatever you had baked before.

There's probably a shorter way to do it but this works every time.

Unfortunately I can't help for the Unity part. AFAIK, Blender Render is longer worked on and has been replaced with Eevee in 2.8+, but you'll want to use Cycles to bake your new texture.

basic armature.fbx

Edited by Stormie97
Added a skeleton file for posing

Share this post


Link to post
Share on other sites

Okay, I got to that last part. I am very new to using any sort of 3d software. If you have a discord mine is RC3117#5214, any chance you can walk me through the last part?

Share this post


Link to post
Share on other sites

Thanks, appreciate it. I will continue to try and noodle through your directions though.

Share this post


Link to post
Share on other sites

Good news Stormie97! A handy fellow on the TTS discord was able to help me import my files via unity's asset bundles. While this is a great final way to import them into the game (one file means less mess) I would love to know how to bake correctly still, as well how to attach that armature you posted to an existing model correctly so as to prevent the cuts in the models.

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.