Ӄhrizby 14 Posted February 24, 2019 Hey all, I know I haven't been exactly active in the modding community in years, but I was recently approached about my previous work on my HK-47 Melee/Saber Mod. It came to my attention that since the disappearance of LucasForums, my tutorial on how I did it is no longer accessible. However, I managed to dig up an old copy. Given how long it's been this information may be old news, but I figured I would repost it here in case it is of use to anybody else. This is the original instructions I made to create the HK-47 mod, it was a rather crude and experimental procedure for me at the time, so it can definitely be refined and improved. Feel free to reply with any updates or experiences. Without further ado, here is the original tutorial: Spoiler Part 1: Prep Alright, let's get started. First you need to find your models. You need the model you want to put animations on, and one model with all the animations already on it. If the model you want animations on is an only body model (no head on it), you should extract a player body, like clothing or an armor. This ensures that you can change clothing/heads on the model. To make it easy, let's use PMBAM, the basic male 'underwear' model. If your unanimated (or underanimated) model is female, you can use PFBAM if it makes you feel good, but I don't think it'll make any difference. However, if your unanimated model includes a head, you need a model with animations and a head. For KotOR, I've used the Wookiee model, and for TSL I've used the Wookiee model and the Weequay model. I find the Weequay model superior because it doesn't have a hunched posture like the Wookiee, which you can see I used in my HK-47 Melee/Saber Mods. If the model you want to give animations has a cape, I'd use the Jedi robe model, which also has a robe/cape. You can use any model if you check them by this method first: import them into gmax/3dsmax. Choose the 'modify' tab and select the Aurorabase (named after the model). Look for 'super' (Screenie 1). If it says 'NULL', this model has it's own animations and can't be used for animating another model. Also, I'd recommend extracting the textures of your models into the same folder as them. It just helps to see what's what. Part 2: Setting the Bones Now that you have chosen your models, extract them with KotOR Tool and compile them with MDLOps. Once you have your -ascii models, open two windows of NWMax. Yes, two (2). In one, import your unanimated model, the one you want to put animations on. In the other, import the ones with the animations you want. Just the geo only. Be sure to click 'set environ' in both windows (Also screenie 1). For now, select the skin (all textured parts, be sure to include the eyes, teeth, and tongue). In the already animated model, delete it. You won't need it, and it's easy to forget to delete it, which makes a mess. In the unanimated model, make a group out of it. Type an easy-to-remember name (how many of you will choose 'skin'? ) in the box in the upper toolbar and hit enter (See Screenie 2). Now you can select it all at once by clicking that name. Do that now, and hide it. You'll be left with just the bones and helpers. Now you need to get the bones of the animated model into the same position as that of the unanimated model. This prevents warping and stretching in the skin, as well as oddly placed and randomly floating parts. Usually this happens around the fingers. Anyway, I like to start with the torso, and work my way down the arms and legs. In the window containing the animated model, choose the move tool and select your first bone. Click the 'unlink' function (Screenie 3). Along the bottom, you can see the location of the object. Copy all three numbers from the unanimated model and paste them into that spot on the same bone on the animated model. The object should move to the same location as it is in the unanimated model. You'll notice that some other bones move with it. That's okay, as long as you remember to unlink the one you're moving. Otherwise it'll try to move and stay linked at the same time, and just rotate randomly. After you move a bone, you can hide it, just to get them out of the way. Do this until you've moved every single bone into place. Also remember to do this with the weapon placement helpers, the blue boxes usually named 'rhand' and 'lhand', or you'll have floating weapons. Usually I don't worry about rotation, but in the case of the weapon placement helpers I rotate them the same way they are in the original model, so the weapons point in the correct direction. Now you're set for the fun part, weighting the skin! (Don't get too excited, there) Part 3: Skinning Remember the skin that we hid in the unanimated model at the beginning? Time to bring it back. Flip to the unanimated model, right click and hit 'unhide all'. If you haven't done it yet, save this. Now go to your animated model window. Select everything, and group it under a good name. Hide it all. Click file > merge. Select the other model you saved, and select all the skin geometry; head, torso, etc. Be sure to include the eyes, teeth, and tongue. When you open it, click 'yes to all' if a dialogue box pops up. This keeps everything pretty much where it should be. You'll notice that gmax didn't obey you; there's a lot of bones it imported too! Not to worry, that's supposed to happen. Those are the bones that the skin is currently attached to. Don't delete them! Normally weighting is a tedious, time consuming task, but I've found fairly simple way to shortcut this, so hold onto those bones. Select the skin again, and group it in this window the same way it was in your other one. Now hide it. Group the remaining bones that were imported to something that'll make you remember which ones they are, so you can get rid of them later. Something like 'trash bones' or so. Now unhide everything. Hide just these new bones, so you're left with the new skin and the original bones. Often times the eyes/teeth/tongue (what a troublesome lot!) are out of place, so you'll need to take a look at your unanimated model to get them in the correct place. Move these the same way you did the bones. Now we can start actually taking the skin off it's old bones and putting it on it's new body. Ugh, that sounds gruesome, doesn't it? Anyway, select a piece of skin, any piece; it may be distorted and mangled looking, but double-click on the 'editable mesh' modifier and it should snap into shape. No, we're not actually going to edit it, but we need it selected, with the blue vertices showing, or else what we're going to do won't work. Now, with the vertices still showing, select the 'skin' modifier. Now click 'edit envelopes'. It should overlay the model in blue, with different shades of red and yellow where the skin is attached to a certain bone. In the list on the right, select the top bone. Delete it. Only delete that bone. Now click 'add bone', and select the exact same one as you just deleted. Actually, if you remember, the one it was originally weighted to is hidden, so the one you selected is the same one of the original bones from the animated model. When you add the bone, you should see that the same colors as were there before you deleted the old ones reappeared. If you have the vertices showing, when you delete a bone then add a new one, the new one takes on all the weighting left in the area around it . . . which are the places now vacant from the deleted bone. So you saved all the time of weighting the skin one vertex at a time, or the randomness painting the weights, which usually turn out horribly inaccurate, and got the weighting from one set of bones to another. Do this to every bone on the list, then move on to each other piece of skin. Well, that doesn't include the eyes or teeth (But does include the tongue this time). They're rather special, so we'll get to them later. Just hide them if you want and get back to skinning. I'd recommend saving a lot, 'cause at least for me, gmax tends to crash sometimes when doing skins. Once you do all the bones in all the skins, unhide everything. Now select the new 'trash' bones and delete them. If you see sudden distortion among the skin, you missed some bones. Go back and try it again. You did save, right? If nothing changed (except for the bones disappearing of course), then you did good. At least, as far as we know; often things happen differently in-game. Part 4: Re-Linking Now we get to re-link everything. All the pieces in a model are linked to each other so they move together; for example, when an arm moves up, the hand follows it. When we rearranged the bones, you should've unlinked mostly everything so they can move without changing alignment. Now we need to fix that. Refer to you unanimated model window for what's linked to what (look to the right panel when an object is selected), and link the one in the animated model that way. Do this by selecting your bone, clicking 'link' (next to 'unlink', big surprise) and selecting the parent by name (hotkey 'h'). It'll be fairly easy to know if you missed a piece in-game, because that part will stand static in one place while the rest of the model twists and turns past it. When you've linked every bone the way they should be, select all of the skin except for the eyes and teeth. Now link the selected parts to your aurorabase (The blue box on the bottom named after you model). Otherwise, the skin will be invisible. Next, select all pieces of your eyes and your upper teeth and link them to the 'head_g', and link your lower teeth to 'f_jaw_g'. That's all for linking! Part 5: Finishing Up Next is exporting and preparing our finished model. Select your aurorabase. It's currently named after the model you used to steal animations from, the pre-animated model. Rename it to be the model whose skin is on it, the previously unanimated model. Now click 'export geom only', to a different location than your original files. The exported file will be a .mdl. But it isn't really. Gmax deals in -ascii.mdl files. So rename this file to filename-ascii.mdl. That's just adding "-ascii" before the extension. Now put it in the same location as your original .mdl and .mdx files of the originally animated model, not the model you used the skin of. If there's already any -ascii models from when you compiled models at the beginning, delete them. Rename the original .mdl and .mdx to that of the originally unanimated model. Now open MDLOps. Select your new -ascii file and click 'read and write'. You should have 2 new files in the same directory labeled filename-ascii-k2-bin.mdl and an .mdx of the same name. This example is for TSL, but if this is a model for the original KotOR, it'll have 'k1' in it's name instead of 'k2'. Move these two files to your override folder. Remove the 'ascii-k2-bin'. It should now be named the same thing as the original files you extracted. Congrats! Now you have your model, complete with animations! Drop it in the override, change your appearance with KSE if necessary, and fire it up! We'll soon know how closely you paid attention... Here's some common problems and possible solutions that I encountered: Nothing at all shows up in-game -- You probably forgot to link the skin to the aurorabase. There are no animations on just the arm/leg/upper torso etc. -- If you didn't link one piece, it affects the whole section. For example, if you didn't link the bicep to the collar, the whole arm won't work. Thanks for taking the time to read all this. I hope it helps out some people, though I know that there's only so many models that fit the criteria for this. If you have any questions or comments, ask in my thread. Thanks everyone for your support, and to the whole community for making modding such a great thing! Ӄhrizby 6 1 1 Quote Share this post Link to post Share on other sites
LanguageWriter123 0 Posted March 9, 2020 Hello Khrizby, I hope you reply to my comment this time around. I'm giving it another try except for the assassin droid. I'm trying to put the male lite commoner's animations on it but I need your help again. Sorry for my stupid comment before, it was extremely easy to solve the questions I asked to you. Anyways, I need help extracting the textures from the assassin droid. How did you take out the textures from HK-47? They are like attached to the bones completely. I'm at the skinning step except I need to somehow group the assassin droid's textures but I don't know how to access the textures. Quote Share this post Link to post Share on other sites
AmanoJyaku 184 Posted March 10, 2020 I don't think you'll be hearing from Ӄhrizby. They said they aren't active, and their profile shows they haven't logged in for over a year. That being said, have you tried a search? https://www.youtube.com/channel/UC8VyY5xlo_-BDGOn8It7-qA https://www.bing.com/videos/search?q=NWMax&qpvt=NWMax&FORM=VDRE 1 Quote Share this post Link to post Share on other sites
LanguageWriter123 0 Posted March 10, 2020 Thank you AmanoJyaku, I have tried some searches like ROTNR but I'll see what else I can find. I also posted on discord on various servers about this problem with the droid's textures so maybe I'll get a response tomorrow. If I find the solution I'll post it on here just for anyone else with the same issue. Quote Share this post Link to post Share on other sites
Ӄhrizby 14 Posted March 11, 2020 Hey LanguageWriter123, Sorry for the not replying before, I don't think I was receiving notifications from this post anymore. It's true I haven't been active in awhile but I'll be happy to do my best to answer your questions. Having not used NWMax in awhile this will be from memory. On the commoner model, there are the bones which are animated, and the skin which is textured. I'm not familiar with the assassin droid model, but I am assuming it is made in the same way as HK was; that is, there is not separate skin and bones, the model is animated and textured directly. When changing the animations from the former to the latter, you are essentially deleting the animations from the combined skin/bones of the droid and making it a skin only, then attaching it to the still animated bones from the commoner, not using the commoner skin at all. You should not need to "extract" or do anything to the textures on the droid, they should stay as-is through the process, since you are retaining all the textured pieces from the droid. I'm not sure exactly what issue you are running into that you would need to mess with the textures. Hope this helps, let me know if there's any other questions or if I'm not making any sense because I remembered something inaccurately. Best of luck, keep learning! A note more in general; I wrote this tutorial long ago when I was still figuring this stuff out as I went. Looking at it now I can see some ways the process might be improved if people haven't already done it. I see no reason that one would not be able to simply delete the host skin, then for each part align on the pivot points and merge the mesh of the target model skin with the host bones, then delete the mesh from the original host bone. This would retain the original host animations, simplify the process by skipping the skinning and re-linking steps, and reduce possible complications from the bones not being the same as the skin or the weighting not transferring well. In effect it would create the same kind of single bone/skin that the droids have originally. There might be some other steps or settings to tweak I can't think of without giving it a try myself, and of course this would only work for droids or other models with no "stretchy" parts to animate, but it might be worth a try if somebody's looking to do that. 1 Quote Share this post Link to post Share on other sites
LanguageWriter123 0 Posted March 12, 2020 (edited) Hello Khrizby, I'll try out what you said especially with the shortcuts and I think I already figured out the problem with the textures previously on discord, DarthParametric helped me. You are right, since the textures are meshed onto the bones I believe one just has to put the textures onto the commoner's bones, weight paint the textures to certain bones, and link everything. I did most of the things you said however when I put the assassin droid model into the game, the textures were perfect but the model had no animations and the assassin droid was stuck in the t-pose so I'm guessing I didn't link everything right. Another problem I am currently having right now is that I can't export the model from the OdysseyBase on KotorMax gmax 1.2, I tried it on NWMax as well. Basically, I get no sanity checks or errors and it just doesn't export the character model. Thank you so much for replying by the way, I appreciate it a lot. Edited March 12, 2020 by LanguageWriter123 Quote Share this post Link to post Share on other sites
Ӄhrizby 14 Posted March 12, 2020 I'm just a bit unclear when you say "texture" if you're referring you the right thing. Are you referring to the droid's textured skin mesh? Because following my original method, not the shortcuts I mentioned in my last post, you would be painting the envelopes on that. You shouldn't have to edit, move, or paint the actual texture at all. You aren't moving the droid texture to the commoner bones, you're editing the envelopes so the droid mesh follows the commoner bone animations. I can't really help with the exporting issues, I'm way out of date there. If the game is showing the droid in the un-animated pose, then yes it might be a linking issue, make sure all the bones are linked properly and to the correct (commoner) aurorabase, and that the droid mesh envelopes are weighted to the commoner bones. You should be able to test the animations in NWMax and it will indicate where your linking is broken. 1 Quote Share this post Link to post Share on other sites
LanguageWriter123 0 Posted March 13, 2020 4 hours ago, Ӄhrizby said: I'm just a bit unclear when you say "texture" if you're referring you the right thing. Are you referring to the droid's textured skin mesh? Because following my original method, not the shortcuts I mentioned in my last post, you would be painting the envelopes on that. You shouldn't have to edit, move, or paint the actual texture at all. You aren't moving the droid texture to the commoner bones, you're editing the envelopes so the droid mesh follows the commoner bone animations. I can't really help with the exporting issues, I'm way out of date there. If the game is showing the droid in the un-animated pose, then yes it might be a linking issue, make sure all the bones are linked properly and to the correct (commoner) aurorabase, and that the droid mesh envelopes are weighted to the commoner bones. You should be able to test the animations in NWMax and it will indicate where your linking is broken. @ӃhrizbyI was referring to the droid's skin/bones so I think you are right and I didn't realize there was a difference between textures and envelopes sorry. I managed to solve the problem though with the exporting issue I just needed to run KotorMax from the gmax directory instead and it worked. I keep having the same issue with the droid not having animations. I linked everything and weighted the envelopes to the bones but it just stays in the un-animated pose. Also, do you remember what option it was exactly to play each animation in NWMax or KotorMax? In KotorMax I select the OdysseyBase, select the animation editor, select a certain animation, move the animation to the animation box, double click it in which it should play but it doesn't. In NWMax, I do the same thing and it doesn't work there either. Quote Share this post Link to post Share on other sites
Ӄhrizby 14 Posted March 13, 2020 Can't help you there, I remember it being fairly straightforward. Selecting the aurorabase, finding the animation tab on the right, selecting the animation, and playing using the animation bar on the bottom. I've never used KotorMax. Quote Share this post Link to post Share on other sites
LanguageWriter123 0 Posted March 13, 2020 On 3/12/2020 at 10:41 PM, Ӄhrizby said: Can't help you there, I remember it being fairly straightforward. Selecting the aurorabase, finding the animation tab on the right, selecting the animation, and playing using the animation bar on the bottom. I've never used KotorMax. I figured it out now, I used this video to help me: Then after I mapped the animations I go into the animation editor and can play each one. @Ӄhrizby I got the skins weighted correctly and the everything linked correctly, I know this because I looked at almost every animation from all supermodels (I imported every supermodel's animation to the new droid asssassin model) and they all looked great. Yet when I export the model, whether geom only or with anims, the game only plays one animation which is the dialogue one. I feel like I'm really close to getting this to work I just need to figure out how to apply all the animations to the model as I got just about every one of them imported onto the model in gmax. Does it require baking the animations? Do you think you know what the main problem as to why it only plays one animation but not the rest? @Ӄhrizby Nevermind about the whole animations thing, I got it to work thanks to you! The thing you didn't mention in your tutorial (or maybe I did something wrong along the lines) but I had to go into the appearance.2da file and change the model type line from "L" to "F". You didn't have to do that for HK-47 because that model and the wookie model already had the same model type in the appearance.2da file which was "F". bandicam 2020-03-14 10-45-47-697.avi 2 Quote Share this post Link to post Share on other sites
Sith Holocron 2,480 Posted March 14, 2020 @LanguageWriter123, I have merged your last three posts as they are a clear example of bumping a thread. That's a violation of our Site Rules and you will be penalized accordingly. You should've edited the previous posts in order to not bump the thread. Wait until @Ӄhrizby responds before posting in this thread again. Quote Share this post Link to post Share on other sites
Ӄhrizby 14 Posted March 18, 2020 On 3/13/2020 at 6:24 AM, LanguageWriter123 said: @Ӄhrizby I had to go into the appearance.2da file and change the model type line from "L" to "F". That bit's good to know for reference, I hadn't thought of that, as you mentioned it wasn't needed when I did it for HK. I'm glad you got it working! 1 Quote Share this post Link to post Share on other sites