You are looking for material files with BGEM extension. If the weapon mod is packed in BA2 archives, you need program to extract these materials: https://www.nexusmods.com/fallout4/mods/78 or https://www.nexusmods.com/fallout4/mods/17061 You also need Material Editor to edit the materials. Check these materials for two things(refer to first screen where to find them):
Environment Mapping is enabled
Missing path(empty field) for Envmap Texture
For those materials with missing Envmap Texture, use the following path:
Shared/Cubemaps/OutsideDay01.dds
Save the changes to the edited material. Only in the case where you extracted the files form BA2, all materials without the mentioned problem, can be removed.
i have material editor and bae tools. i can extract the bgem extension and edit the envmap texture with that path but after i save and load the game its still purple sights. i need a step by step tutorial please.
I haven't played with many custom weapons, but I have encountered at least one mod, where one of the sights was just purple tinted, I mean that's how it's supposed to look. What's the weapon mod, that's giving you trouble?
I'm afraid I can't do much as I don't use this mod, so I can't tell where the problem is exactly. Follow what I wrote in the description. There is useful info in the comments below. What you basically need to do: - Open the mod's BA2 archive with program and extract materials with BGEM extension. - By using Material Editor, open and check the materials for two things: 1. Environment Mapping is enabled 2. There is no path for Envmap Texture - Add the missing path for Envmap Texture(for reflex sights its the one from the description) and save the file.
You can only browse for the cubemap, if you have previously extracted all of them from the BA2 archive. I think I have copied the file path in the description from existing BGEM material. So you can copy-paste this same path, instead of browsing for it. Try that first, if it fails, then you can disable the environment mapping.
I'm sorry, I don't have the knowledge and tools to create a decent video tutorial. I find the explanation by mancubuszero to be quite good. If you can't piece things together from my description, maybe his post below could be useful to you. I'll copy it and put it in quote, to save you some searching.
You likely also need Archive2 to extract the optic materials from the Main.ba2 of the weapon (if it is packed in .ba2s). I normally just extract the whole main.ba2 to the mod's location, find the optics files, then delete everything else. Make sure you leave the folder structure intact, just delete the files and unneeded folders. After that, open the optics or lens .bgem files in Material Editor, confirm that Environmental Mapping is enabled in the General tab, then add the cubemap path from the description to the Evmap Texture field on the Effect tab. Save, and close. I don't bother re-packing into .ba2 files, just leave the folders and files loose in the mod directory or Data folder (depending on your mod's location, which is dependent on your mod manager).
If I find some time, I may try to do a "step by step" tutorial with more screenshots, but no promises.
Regardless of what GPU you have, there's an issue - a missing texture path for environment mapping. AMD cards render it like missing texture, hence the purple tinting. Nvidia cards don't. Why is that, nobody knows. Material files with the missing texture path, need to be fixed individually. There is no such thing as universal fix, something that can be applied and the purple tinting will go away for all mods. The information in this article/tutorial is aimed for mod authors, but can be used by mod users as well. It just requires using some tools, like to open and extract files from BA2 archives if necessary, Material Editor to open and edit BGEM materials. Sorry for the long text, but I was wondering how/what to answer to your question and I felt like I should do more explaining.
Thankyou for responding so quick man, I really appreciate it, and if its ok I have a quick question on how to find the correct file to edit. I am currently attempting to apply the fix you have shown to a scope on a weapon mod which lens is showing up purple, however I have ran into the issue of the weapon becoming invisible whenever I edit a file.
Edit - I got it working, this was a huge help thanks!!
I couldn't write before coming back from work. You are welcome. It's good you figured it out on your own, I'm going to post an answer anyway. You have to look for materials with BGEM file extension. Usually they are less than BGSM materials, but it depends, the weapon could have a lot of sights. Checking them shouldn't take too long, you are looking for two things - enabled Environment Mapping and missing Env Map Texture. The material you are looking for may be named similarly as the name of the sight, which you want to fix. There's another way, a bit more complicated depending on your modding knowledge and tools you have. Use FO4Edit to find the Object Mod of the sight in the plugin, and from there take note of the file path for the model - nif file. When you find the nif for the sight, open it with NifSkope or Outfit Studio, select the glass/lens and from the properties check out what's the BGEM material that it uses.
I have a simular issue with purple glass appearing but it is not with a lense for a scope, it's the glass on a display case that I can craft in workshop. Will this fix work for that as well???
It depends, could be the same issue, or it could be a missing texture. You have to find what material file the glass is using, open it with Material Editor, check if Environment mapping is enabled. If it is, then check for any missing Envmap Texture path. If everything is ok with Environment Mapping, then that leaves the problem with missing texture. Take note of the path for Base Texture and check if this texture is present in the BA2 archive or in the data folder as loose file.
PS. If you need to add a path for Envmap Texture, OutsideDay01.dds may not be most appropriate, since this is not for a scope. Maybe try with: Shared/Cubemaps/mipblur_DefaultOutside1.dds or Shared/Cubemaps/mipblur_Eye1.dds And you can reduce the Environment Mask Scale, if the effect looks too strong.
You likely also need Archive2 to extract the optic materials from the Main.ba2 of the weapon (if it is packed in .ba2s). I normally just extract the whole main.ba2 to the mod's location, find the optics files, then delete everything else. Make sure you leave the folder structure intact, just delete the files and unneeded folders. After that, open the optics or lens .bgem files in Material Editor, confirm that Environmental Mapping is enabled in the General tab, then add the cubemap path from the description to the Evmap Texture field on the Effect tab. Save, and close. I don't bother re-packing into .ba2 files, just leave the folders and files loose in the mod directory or Data folder (depending on your mod's location, which is dependent on your mod manager).
This is a godsend, thank you so much. I can confirm it works, it's really easy to do yourself, and I've finally fixed a bunch of weapon optics that have been bothering me forever.
No, sorry, this is just a quick tutorial, where I explain what's the problem and how to fix it. It's a missing texture path in the material file. For the download I have removed this path(on purpose) from the material of the lens of the 10mm pistol reflex sight. If you are AMD user and test with the mod, there will be purple tint of the 10mm reflex sight, like on the screenshot. While for Nvidia users, the sight should be like normal.
33 comments
https://www.nexusmods.com/fallout4/mods/78
or
https://www.nexusmods.com/fallout4/mods/17061
You also need Material Editor to edit the materials.
Check these materials for two things(refer to first screen where to find them):
- Environment Mapping is enabled
- Missing path(empty field) for Envmap Texture
For those materials with missing Envmap Texture, use the following path:
- Shared/Cubemaps/OutsideDay01.dds
Save the changes to the edited material.Only in the case where you extracted the files form BA2, all materials without the mentioned problem, can be removed.
- Open the mod's BA2 archive with program and extract materials with BGEM extension.
- By using Material Editor, open and check the materials for two things:
1. Environment Mapping is enabled
2. There is no path for Envmap Texture
- Add the missing path for Envmap Texture(for reflex sights its the one from the description) and save the file.
https://www.nexusmods.com/fallout4/mods/78
or
https://www.nexusmods.com/fallout4/mods/17061
Good information provided in your writeup and screenshots. Thanks!
Edit - I got it working, this was a huge help thanks!!
You have to look for materials with BGEM file extension. Usually they are less than BGSM materials, but it depends, the weapon could have a lot of sights. Checking them shouldn't take too long, you are looking for two things - enabled Environment Mapping and missing Env Map Texture. The material you are looking for may be named similarly as the name of the sight, which you want to fix.
There's another way, a bit more complicated depending on your modding knowledge and tools you have. Use FO4Edit to find the Object Mod of the sight in the plugin, and from there take note of the file path for the model - nif file. When you find the nif for the sight, open it with NifSkope or Outfit Studio, select the glass/lens and from the properties check out what's the BGEM material that it uses.
If everything is ok with Environment Mapping, then that leaves the problem with missing texture. Take note of the path for Base Texture and check if this texture is present in the BA2 archive or in the data folder as loose file.
PS. If you need to add a path for Envmap Texture, OutsideDay01.dds may not be most appropriate, since this is not for a scope. Maybe try with:
Shared/Cubemaps/mipblur_DefaultOutside1.dds
or
Shared/Cubemaps/mipblur_Eye1.dds
And you can reduce the Environment Mask Scale, if the effect looks too strong.