N-DReW25

New Masks with New Textures?

Recommended Posts

 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.

Share this post


Link to post
Share on other sites

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.

  • Like 1

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

 

post-23972-0-81192600-1509341602_thumb.jpg

 

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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:

 

K1_Custom_Mask_01_TH.jpg

 

It's the same for TSL, except some of the filename formats are different.

  • Like 1

Share this post


Link to post
Share on other sites

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.

  • Like 1

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

 

attachicon.gifi_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?

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

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.