N-DReW25 1,336 Posted October 29, 2017 How would I go about making a new mask with a custom texture? I know it is possible but it "appears" to be much more complicated than making new armor textures. Quote Share this post Link to post Share on other sites
DarthParametric 3,782 Posted October 29, 2017 There is zero difference in how you texture a KOTOR non-level* model regardless of whether it is a prop, a weapon, a body, a head, etc. RGB diffuse and alpha for either transparency or cubemap blending. The only change is now with the new tools you can additionally make use of a tangent space normal map, but again that applies to everything. *And even in the case of level models, the texturing itself is no different, you just need a second non-overlapping UV set to bake your light maps. 1 Quote Share this post Link to post Share on other sites
N-DReW25 1,336 Posted October 29, 2017 There is zero difference in how you texture a KOTOR non-level* model regardless of whether it is a prop, a weapon, a body, a head, etc. RGB diffuse and alpha for either transparency or cubemap blending. The only change is now with the new tools you can additionally make use of a tangent space normal map, but again that applies to everything. *And even in the case of level models, the texturing itself is no different, you just need a second non-overlapping UV set to bake your light maps. Alright, without trying to sound like a jerk and stupid at the same time but I barely understood a bit of that. Do you reckon you could reword that into a step by step format with the tools I would need as I am very new to this "Cubemapping" thing. I have the texture all ready to go if that makes a difference. Quote Share this post Link to post Share on other sites
DarthParametric 3,782 Posted October 29, 2017 Cube maps are the envmaps, CM_Baremetal and so forth (that's what "CM" stands for). If you want something shiny, you paint those areas dark in the alpha channel, effectively making the texture transparent in those areas and letting the envmap show through (as long as you specify an envmap in the TXI). Quote Share this post Link to post Share on other sites
N-DReW25 1,336 Posted October 30, 2017 Cube maps are the envmaps, CM_Baremetal and so forth (that's what "CM" stands for). If you want something shiny, you paint those areas dark in the alpha channel, effectively making the texture transparent in those areas and letting the envmap show through (as long as you specify an envmap in the TXI). Alright, I think what I want and what you're explaining to me are two very different things. What I want is to make a new mask item with a new texture, not a new cube map. Just so we're on the same page here is an example of what I am referring to. That is what I mean by new mask, new texture. My new texture is based on the Stabilizer Mask though it shouldn't replace the actual Stabilizer mask item or texture. Quote Share this post Link to post Share on other sites
DarthParametric 3,782 Posted October 30, 2017 I wasn't talking about creating a new cube map. I was explaining how you use an existing cube map to make your new texture shiny. Quote Share this post Link to post Share on other sites
N-DReW25 1,336 Posted October 30, 2017 I wasn't talking about creating a new cube map. I was explaining how you use an existing cube map to make your new texture shiny. Oh, well I may look into that after I get past my main problem. I do not know how to actually get the new texture on a new mask uti that is what I need help with. Sorry if that wasn't clear. Quote Share this post Link to post Share on other sites
DarthParametric 3,782 Posted October 30, 2017 Match your texture variant number to whatever you put in the UTI. Quote Share this post Link to post Share on other sites
N-DReW25 1,336 Posted October 30, 2017 Match your texture variant number to whatever you put in the UTI. I do not think there is a texture variant checkbox with Masks. I get something called "Model Variation" instead and I'm assuming changing a value in this check box will change the model of the mask, not the texture. I looked at the TSL Loot and Immersion mod as that has custom maks and from what I can see he took the mask model and made it a new one (Let's say the model is "i_mask_010" he turned it into "i_mask_015" one that doesn't exist already) and he's changed the model's texture from within the model files mdx and mdl. If I am correct would you be able to tell me how I could do that? Or is there another way to make masks with Textures? Quote Share this post Link to post Share on other sites
DarthParametric 3,782 Posted October 30, 2017 Yes, the texture and model variation are tied together. For example, say I want to make a different coloured version of the Verpine Headband for K1. I dig out its UTI, g_i_mask11.uti, and change it to a custom variation number, let's say 75. So I change the ResRef and Tag values to g_i_mask75 and the model variation to 75, then save that as g_i_mask75.uti. Extract its icon texture ii_mask_011.tga. Edit the icon as appropriate and save it as ii_mask_075.tga. Then extract the model, i_mask_011.mdl/mdx. You can look at the binary MDL in a hex editor, or the easier route is to decompile it and open the ASCII model in a text editor. You'll want to change all instances of I_Mask_011 to I_Mask_075. You'll also see that the texture is I_VerpHBnd, so change all instances of that to whatever you want to call your texture. If you are hex editing you'll want to keep the same number of characters, but if editing an ASCII you can change it. For example, I would use something like I_DPHBndA. Then save if you are hex editing, or recompile if editing an ASCII. The model's new filename would be i_mask_075.mdl/mdx. Extract the model's texture, I_VerpHBnd in this case, including the TXI if appropriate (KOTORTool has an option to also extract a TXI). Edit the texture as you see fit and then save it as whatever name you specified in the model, I_DPHBndA in this example, and likewise rename the TXI if appropriate. Put all the files in your Override, add to your inventory with KSE, and load up the game to test: It's the same for TSL, except some of the filename formats are different. 1 Quote Share this post Link to post Share on other sites
LiliArch 115 Posted October 30, 2017 Then extract the model, i_mask_011.mdl/mdx. You can look at the binary MDL in a hex editor, or the easier route is to decompile it and open the ASCII model in a text editor. You'll want to change all instances of I_Mask_011 to I_Mask_075. You'll also see that the texture is I_VerpHBnd, so change all instances of that to whatever you want to call your texture. If you are hex editing you'll want to keep the same number of characters, but if editing an ASCII you can change it. For example, I would use something like I_DPHBndA. Then save if you are hex editing, or recompile if editing an ASCII. The model's new filename would be i_mask_075.mdl/mdx. Or just change the model and texture name with MDLEdit from binary, no need to decompile and the length doesn't need to match. It'll auto-change all instances of the name in the model. 1 Quote Share this post Link to post Share on other sites
N-DReW25 1,336 Posted November 1, 2017 Then extract the model, i_mask_011.mdl/mdx. You can look at the binary MDL in a hex editor, or the easier route is to decompile it and open the ASCII model in a text editor. You'll want to change all instances of I_Mask_011 to I_Mask_075. You'll also see that the texture is I_VerpHBnd, so change all instances of that to whatever you want to call your texture. If you are hex editing you'll want to keep the same number of characters, but if editing an ASCII you can change it. For example, I would use something like I_DPHBndA. Then save if you are hex editing, or recompile if editing an ASCII. The model's new filename would be i_mask_075.mdl/mdx. Ok, So I changed the texture in mdledit, converted it to an ASCII, changed the I_Mask_011 text inside the ASCII to I_Mask_050 but I now load it into mdledit to convert it again and it says "Error! An exception has occured while reading the ascii model: Error reading parent name for node 'mask_07'. The specified parent does not exist. The program will now cleanup what is had read since the data is now broken. Is this my fault of the tools fault? Quote Share this post Link to post Share on other sites
DarthParametric 3,782 Posted November 1, 2017 Seems like user error to me. There are no nodes like that in the vanilla I_Mask_011 model (for either K1 or TSL). Quote Share this post Link to post Share on other sites
N-DReW25 1,336 Posted November 1, 2017 Seems like user error to me. There are no nodes like that in the vanilla I_Mask_011 model (for either K1 or TSL). Alright, here is my edited ASCII then. Please note I am fairly new to this so expect stupid mistakes. DReW's ASCII.zip Quote Share this post Link to post Share on other sites
DarthParametric 3,782 Posted November 1, 2017 Your source model was I_Mask_012 and you didn't change all the references. However the cause of your error appears to be a case-sensitive problem - you have "parent i_mask_050" and it was expecting "parent I_Mask_050". That is a bug and should be reported to bead-v in MDLEdit's bug thread. i_mask_050_FIXED.mdl.7z Quote Share this post Link to post Share on other sites
N-DReW25 1,336 Posted November 1, 2017 Your source model was I_Mask_012 and you didn't change all the references. However the cause of your error appears to be a case-sensitive problem - you have "parent i_mask_050" and it was expecting "parent I_Mask_050". That is a bug and should be reported to bead-v in MDLEdit's bug thread. i_mask_050_FIXED.mdl.7z I cannot tell if this was my fault but the mask in game is the wrong model. It's the Force Mask model, not the Stabilizer mask model. The Force Mask model is 10 and the Stabilizer mask is 12 which I've edited the mdl for. Could this be because I haven't touched the mdx yet? Quote Share this post Link to post Share on other sites
DarthParametric 3,782 Posted November 1, 2017 The MDX is generated when compiled. You don't have to do anything to it. Loading the ASCII model, it looks fine. It's the same as the vanilla I_Mask_012 model - http://starwars.wikia.com/wiki/Stabilizer_mask Make sure your MDL/MDX is named correctly (I_Mask_050) and your UTI is pointing to the right model variation. Quote Share this post Link to post Share on other sites
LiliArch 115 Posted November 1, 2017 AND that your filename is correct. Quote Share this post Link to post Share on other sites
N-DReW25 1,336 Posted November 2, 2017 The MDX is generated when compiled. You don't have to do anything to it. Loading the ASCII model, it looks fine. It's the same as the vanilla I_Mask_012 model - http://starwars.wikia.com/wiki/Stabilizer_mask Make sure your MDL/MDX is named correctly (I_Mask_050) and your UTI is pointing to the right model variation. Yep, it was definitely the UTI messing with me. I got the mask working, thanks for both of your help. Quote Share this post Link to post Share on other sites