Pyroteknics Posted October 12, 2023 Share Posted October 12, 2023 (edited) I think some of the guides I've seen may be confusing me in what is needed as some seem more complex than it needs to be so hopefully someone can point me in the right direction. Basically, looking at making a new item using an existing model but with a new texture, e.g:Make a new food item called 'Fresh Cram', use the model of the existing Cram tin but use my own texture instead so it is its own separate thing to spawn in the world and keeps the original separate. Is all that is needed is a material swap? Or do I need a full blown model (NIF - that could be copied from the source), BGSM etc? All I have right now is a new DDS texture file that I believe goes in Fallout 4\Data\Textures\ModName directory but been looking up how to do the BGSM file Creation Kit can use. I think it may be the latter as looking at Blamco Mac n Cheese is listed as 2 separate entries: BlamcoMacAndCheese = SetDressing\FoodAndFoodWare\BlamcoMacAndCheese.nifBlamcoMacAndCheese_PreWar = SetDressing\FoodAndFoodWare\BlamcoMacAndCheese_Clean.nif Thanks. Edited October 12, 2023 by Pyroteknics Link to comment Share on other sites More sharing options...
Dashyburn Posted October 12, 2023 Share Posted October 12, 2023 (edited) Use a tool called NifSkope to change texture paths on a mesh, it's extremely daunting to use at first but easy once learned. I would advise you grab NIfSkope and set it up, have a look at it first, It will be confusing, you will need to read a guide. I will try to guide you for texture changes, It's confusing (was for me at first) once you have it running and you're looking at the UI with a mesh loaded you will see lots of TriShape headings. Click on the mesh in NifSkope and you will see that the left panel highlights the TriShape heading for the section of mesh, click the area to be retextured, click the little arrow on the left panel highlighted TriShape which will open another heading beneath that BSLightingShaderProperty. Click that heading and another appears beneath that, BSShaderTextureSet is the one you want. It's a good idea to already have the new textures ready to copy and paste, click on BSShaderTextureSet and you will see the texture paths, click on them, paste your new textures and "save as", rename the mesh so it doesn't override the original ingame. You then need to insert your created mesh via the CK. If you have problems post again, I can really dummy you through it but you will need NifSkope up and running first :smile: Edited October 12, 2023 by Dashyburn Link to comment Share on other sites More sharing options...
RoNin1971 Posted October 12, 2023 Share Posted October 12, 2023 There are 2 ways to do this. 1: By using a material swap. Within CK create a copy for the static object & swap the material for your own. (the material should be known/added as well)I would advice against this method. It seams buggy (not always swapping in some cases) & you can't save it or anything. (So you would need to repeat the whole process each .ESP / mod where you wish to use it.) 2a: By creating a new object. Copy the .nif & "swap" the linked material for your own and add that as new object to CK. 2b: instead of swapping the BGSM, you could 'empty' the string (no material reference) and just replace the linked textures for your own textures. It works, but its bad/lazy practice imho. (& you won't be able to use a material swap for the object inside CK, as there is no material assigned. (note: You can never swap textures, only material with CK) 2a should be the preferred method.In which case you need the object (.nif), a material file (bgsm) & texture (.dds). Link to comment Share on other sites More sharing options...
RoNin1971 Posted October 12, 2023 Share Posted October 12, 2023 Use a tool called NifSkope to change texture paths on a mesh, it's extremely daunting to use at first but easy once learned. I would advise you grab NIfSkope and set it up, have a look at it first, It will be confusing, you will need to read a guide. I will try to guide you for texture changes, It's confusing (was for me at first) once you have it running and you're looking at the UI with a mesh loaded you will see lots of TriShape headings. Click on the mesh in NifSkope and you will see that the left panel highlights the TriShape heading for the section of mesh, click the area to be retextured, click the little arrow on the left panel highlighted TriShape which will open another heading beneath that BSLightingShaderProperty. Click that heading and another appears beneath that, BSShaderTextureSet is the one you want. It's a good idea to already have the new textures ready to copy and paste, click on BSShaderTextureSet and you will see the texture paths, click on them, paste your new textures and "save as", rename the mesh so it doesn't override the original ingame. You then need to insert your created mesh via the CK. If you have problems post again, I can really dummy you through it but you will need NifSkope up and running first :smile:This will not work, as you forgot to replace the material file reference. The engine / CK will ignore any textureset present UNLESS the material reference is empty.Replacing the material but leaving the textureset untouched will do the trick, but swapping out the textures should be done as well if only for neatness. (you could remove it just as well) Note: some importing tools actually look at the textureset. Like PyNiffly for Blender, so setting them correctly will at least import the right files. Link to comment Share on other sites More sharing options...
Pyroteknics Posted October 12, 2023 Author Share Posted October 12, 2023 (edited) 2a: By creating a new object. Copy the .nif & "swap" the linked material for your own and add that as new object to CK. 2b: instead of swapping the BGSM, you could 'empty' the string (no material reference) and just replace the linked textures for your own textures. It works, but its bad/lazy practice imho. (& you won't be able to use a material swap for the object inside CK, as there is no material assigned. (note: You can never swap textures, only material with CK) 2a should be the preferred method.In which case you need the object (.nif), a material file (bgsm) & texture (.dds).Thanks, this is what I thought it might have to be done this way. Have been trying to watch some YouTube videos on how to do this. I thought the texture file (.dds) sat inside the .bgsm file using the Material Editor program? From what I saw extracting the textures I needed there were 3 types, I think they were called diffuse (TextureName_d.dds), normal (TextureName_n.dds) and specular (TextureName_s.dds) or something with the actual texture in the TextureName_d.dds file. If I'm re-using an existing NIF to make a new item I'm hoping I can re-use the other .dds texture files and just use the new texture I have... I hope. I can see material files (.bgsm) sit in Fallout 4\Data\Materials\MyModName and texture files (.dds) in Fallout 4\Data\Textures\MyModName so curious now how they are linked to each other that the CK can then see? Edited October 12, 2023 by Pyroteknics Link to comment Share on other sites More sharing options...
RoNin1971 Posted October 13, 2023 Share Posted October 13, 2023 2a: By creating a new object. Copy the .nif & "swap" the linked material for your own and add that as new object to CK. 2b: instead of swapping the BGSM, you could 'empty' the string (no material reference) and just replace the linked textures for your own textures. It works, but its bad/lazy practice imho. (& you won't be able to use a material swap for the object inside CK, as there is no material assigned. (note: You can never swap textures, only material with CK) 2a should be the preferred method.In which case you need the object (.nif), a material file (bgsm) & texture (.dds).Thanks, this is what I thought it might have to be done this way. Have been trying to watch some YouTube videos on how to do this. I thought the texture file (.dds) sat inside the .bgsm file using the Material Editor program? From what I saw extracting the textures I needed there were 3 types, I think they were called diffuse (TextureName_d.dds), normal (TextureName_n.dds) and specular (TextureName_s.dds) or something with the actual texture in the TextureName_d.dds file. If I'm re-using an existing NIF to make a new item I'm hoping I can re-use the other .dds texture files and just use the new texture I have... I hope. I can see material files (.bgsm) sit in Fallout 4\Data\Materials\MyModName and texture files (.dds) in Fallout 4\Data\Textures\MyModName so curious now how they are linked to each other that the CK can then see? You thought correctly. & yes, you can only replace the *_d.dds with your own version. Keeping the others. What I usually do:Copy the .nif to my own (mod) dir. Same for the texture(s) & material(s).So you get something like:.\Data\Meshes\MyModName\Model.nif.\Data\Materials\MyModName\MaterialFile.bgsm.\Data\Textures\MyModName\Texture_d.dds (etc) Inside the BGSM file set the correct path & name for the texture, starting INSIDE the textures dir. (so: MyModName\Texture_d.dds)Which is different from the path set inside the .nif (Which starts with Textures\..) Inside the nif, go to the shape for which you wish to change the textures and set the path to the bgsm file to point to yours.It would be best to set the textures correctly inside the assigned textureset as well. So now your .nif file will tell CK where to find the material file, and the material file tells it where to find the textures. Link to comment Share on other sites More sharing options...
Pyroteknics Posted October 18, 2023 Author Share Posted October 18, 2023 Been playing with this a bit more and have been able to extract the .nif files of existing items and placed them into .\Data\Meshes\MyModName\Model.nif (these are not changing) as well as my new textures into .\Data\Textures\MyModName\Texture_d.dds (I do not have any new versions of the _s.dds or _n.dds as hopefully I can re-use the existing ones or leave it blank?). But having some issues with the materials (.bgsm) as a source to make my own. Just looking through some files to extract some existing BGSM files (Fallout4 - Materials.ba2) using the BAE extractor to use as a base to edit using Material Editor of some existing food items but either I cannot find them in the file or they have different names. The ones I have are... Fallout4 - Materials.ba2> Materials>> SetDressing>>> FoodAndFoodWare The files I want to use new textures on (even trying search at the top): Cram (does not seem to appear, closest name could be Crabcake.bgsm).Dandy Boy Apples (no entry at all)Dog Food (not appearing, there is similar called Dogmeat.bgsm but believe this is for actual meat from wild dogs etc).Porn N Beans (does exist - PorkNBeans.bgsm)Potato Crisps (does exist - PotatoCrisps.bgsm)Yum Yum Deviled Eggs (no entry at all) As mentioned, tried searching for part of names like 'yum' or 'egg' etc which either brings up no results or files for other items. Any ideas how I could find these missing ones? Looking in CK against those items (as ALCH type) such as Yum Yum Deviled Eggs, I can see the reference to the .nif file under Model but when I click Edit I can see the path name again and it shows a preview but no mention of a .bgsm file? Interestingly, the Potato Crisps one DOES show a .bgsm file? Somewhat confused as why some items have a .bgsm file and others don't... Link to comment Share on other sites More sharing options...
Pyroteknics Posted October 19, 2023 Author Share Posted October 19, 2023 (edited) Another small update on this... First of all, was looking into why NifSkope wasn't loading textures properly with everything being pink and turns out I didn't set the paths it needed and wasn't included on a tutorial video. For anyone else reading this in future you have to click Options in top, Settings, Resources and then you can either click Auto Detect Game Paths button (this picked up both my Fallout 4 and Skyrim paths) but picked up only the Data and Textures folder found in the Fallout 4 game location so I added Textures and Meshes folder as well just in case and things started showing properly instead of just pink models. Second, my comment above about some items not having a .bgsm file, it turns out that only the .dds file name is set and it seems happy with it. In NifSkope, if you click the 3D model on screen then the left menu should expand and automatically highlight BSTriShape then expand BSLightingShaderProperty (in here, the Name string would be where the .bgsm path is set on .nif files that have one, otherwise it's blank) and then BSShaderTextureSet. Since I extracted and copied an existing .nif (for Cram, Dandy Boy Apples etc) a number of these records were filled in and replaced the texture file string ending in XYZ_d.dds to my own starting with the texture path textures\MyModName\NewTexture_d.dds, pressed Enter and the new texture appeared and able to save the file. Now just need CK to see the new .nif files... Edited October 19, 2023 by Pyroteknics Link to comment Share on other sites More sharing options...
RoNin1971 Posted October 19, 2023 Share Posted October 19, 2023 (edited) To know what you are looking for always start with the .nif file. (opening it with Nifskope 2.0 Dev 7)In case of the Meshes\Setdressing\FoodAndFoodWare\Cram.nif: Under the root NiNode there is only 1 BSTriShape. There is a BSLightingShaderProperty, which should hold the BGSM file as txt under Name.But in this case it's empty. So, there is no material file (.bgsm) for Cram. This means the game will use the textures you can find under the associated BSShaderTextureSetWhich points to:textures\SetDressing\FoodAndFoodWare\Cram_d.ddson the first line. Replace that with your own Diffuse map (texture_d.dds)textures\MyModName\MyTexture_d.dds (with your path & filename of course) That should do it, in this case.OR, create your own material and add its path+name as txt string to the BSLightingShaderProperty Name. Why some have it and some don't? That's easy. Its a Bethesda game :tongue: edit:For CK to see them, all you need to do is put it all under your fallout4's .\Data folder. (.\Data\Materials\MyMod .\Data\Meshes\MyMod .\Data\Textures\MyMod) For the game to see them you should make sure to either pack them into a .ba2 archive, or make the engine load 'loose files'.To do that, add the following to your Fallout4Custom.ini[Archive]bInvalidateOlderFiles=1sResourceDataDirsFinal= Edited October 19, 2023 by RoNin1971 Link to comment Share on other sites More sharing options...
Pyroteknics Posted October 19, 2023 Author Share Posted October 19, 2023 (edited) Why some have it and some don't? That's easy. Its a Bethesda game :tongue:As they say from a certain other franchise, "this is the way...". Was definitely very confused seeing some original .nif files not using .bgsm but as mentioned I managed to get the textures to show just by pointing it to the new .dds files so it looks like I don't need to mess with .bgsm files at all. For the game to see them you should make sure to either pack them into a .ba2 archive, or make the engine load 'loose files'.To do that, add the following to your Fallout4Custom.ini [Archive]bInvalidateOlderFiles=1sResourceDataDirsFinal=Ideally I'd like to put them in a .ba2 file to keep it a bit tidier. I've seen stuff online mentioning the .ba2 file name is very specific such as MyModName - Main.ba2, MyModName - Textures.ba2 etc including the spaces and dash. What isn't so clear is what goes into what file? The MyModName - Textures.ba2 sounds pretty obvious, hopefully containing stuff in .\Data\Textures\MyModName but where would the new .nif files go? Would they be in MyModName - Main.ba2 or, hazarding a guess, one called MyModName - Meshes.ba2? Appreciate you helping answering my questions! Edited October 19, 2023 by Pyroteknics Link to comment Share on other sites More sharing options...
Recommended Posts