ignorantslave Posted March 30, 2023 Share Posted March 30, 2023 Hello, I'm trying to make a material swap that would replace the basehumanskin.bgsm material with a completely transparent one, so that any outfit which uses part of the malebody.nif would only show clothing with no visible skin. But none of my attempts have fully worked so far. I've tried to make a material with a single empty BaseMaleBody_d.DDS texture in GIMP, and in Creation Kit preview the body mesh turns invisible, but in-game it takes the same color as the RGB channels of the texture with a glossy finish but no transparency. I've tried to mess with Alpha test and Alpha Test Reference in Material Editor but no setting changes a thing. So this is my problem. My material swap appears to work in Creation Kit but not in-game. Can anyone help? Creation Kit also gave me these warnings when I inspected the model of the armoraddon: SHADERS: MATERIALSWAP : preventing attempted swap to alpha blend for non-decal BaseMaleBody:0SHADERS: Warnings were encountered during Material swap for reference: '' (010044D0) Link to comment Share on other sites More sharing options...
RoNin1971 Posted March 30, 2023 Share Posted March 30, 2023 Well, the warning actually says it all. The Alpha channel is what gives the image its transparancy. So it says it prevented the use of transparency (for a non-decal material)Apparently your only allowed to use a decal in this case, which your material isn't. So, open your material BGSM file and check the 'Decal' option and see what that does. Might still not work, as there is a node for transparency inside nifs in combi with the material. Opaque materials don't need that, so its probably not in the nif in which case it won't be transparent either in most cases. Link to comment Share on other sites More sharing options...
ignorantslave Posted March 30, 2023 Author Share Posted March 30, 2023 Well, the warning actually says it all. The Alpha channel is what gives the image its transparancy. So it says it prevented the use of transparency (for a non-decal material)Apparently your only allowed to use a decal in this case, which your material isn't. So, open your material BGSM file and check the 'Decal' option and see what that does. Might still not work, as there is a node for transparency inside nifs in combi with the material. Opaque materials don't need that, so its probably not in the nif in which case it won't be transparent either in most cases. Thanks for the help. I checked the Decal option, and lo and behold, it no longer shows that specific error message, but in-game my character still looks like a human marshmellow. I still receive more warnings though: TEXTURES: TEXTURE ERROR : Unable to load file 'actors/character/basehumanmale/basemalebody_msn.dds'TEXTURES: Warnings were encountered during material swap for model 'Actors\Character\CharacterAssets\MaleBody.nif'. Check warnings file for more details. The warning file doesn't really say anything different. But after reading yours and other similar comments, I may just have to bite the bullet and edit the nif itself to allow transparency. I was hoping to solve this with just material files but I guess not. Link to comment Share on other sites More sharing options...
RoNin1971 Posted March 30, 2023 Share Posted March 30, 2023 (edited) Well, the warning actually says it all. The Alpha channel is what gives the image its transparancy. So it says it prevented the use of transparency (for a non-decal material)Apparently your only allowed to use a decal in this case, which your material isn't. So, open your material BGSM file and check the 'Decal' option and see what that does. Might still not work, as there is a node for transparency inside nifs in combi with the material. Opaque materials don't need that, so its probably not in the nif in which case it won't be transparent either in most cases. Thanks for the help. I checked the Decal option, and lo and behold, it no longer shows that specific error message, but in-game my character still looks like a human marshmellow. I still receive more warnings though: TEXTURES: TEXTURE ERROR : Unable to load file 'actors/character/basehumanmale/basemalebody_msn.dds'TEXTURES: Warnings were encountered during material swap for model 'Actors\Character\CharacterAssets\MaleBody.nif'. Check warnings file for more details. The warning file doesn't really say anything different. But after reading yours and other similar comments, I may just have to bite the bullet and edit the nif itself to allow transparency. I was hoping to solve this with just material files but I guess not. Afaik, there should not be an error. Just no transparency.That the texture doesn't get loaded because of an error means there is something else wrong with the texture. (usually the size, or the DDS encoding) edit: I've only worked with statics & moveable statics, no skins and stuff, so I'm not completely sure if thats true in this case. (it would be for a static, but then you would likely not have had the 'decal' problem as well) Edited March 30, 2023 by RoNin1971 Link to comment Share on other sites More sharing options...
robotized Posted March 30, 2023 Share Posted March 30, 2023 Duplicate basehumanskin.bgsm. Give a name to the new material. Use it in the material swap to make the body transparent. For the new material, either set Alpha to 0 or combine Alpha Test + Alpha Test Reference set to 256. There's no need to touch Blend Mode or anything else. If you get errors about this material, then give it a try with disabled Skin Tint setting. The transparent body may still cast shadows, so if you want you can also disable the Cast Shadows setting. Both settings are under the second tab of the bgsm called Material. Link to comment Share on other sites More sharing options...
ignorantslave Posted March 30, 2023 Author Share Posted March 30, 2023 Duplicate basehumanskin.bgsm. Give a name to the new material. Use it in the material swap to make the body transparent. For the new material, either set Alpha to 0 or combine Alpha Test + Alpha Test Reference set to 256. There's no need to touch Blend Mode or anything else. If you get errors about this material, then give it a try with disabled Skin Tint setting. The transparent body may still cast shadows, so if you want you can also disable the Cast Shadows setting. Both settings are under the second tab of the bgsm called Material.Tried what you suggested, every combination (Alpha test Reference can't be set to more than 255 tho) and still no transparency in the mesh, unfortunately. At least no more error messages.In fact, the method I use to apply material swaps, selecting them in the same menu where you choose the mesh for the armoraddon, doesn't even seem to work! Even if I use a vanilla material swap compatible with the mesh nothing changes in-game. Texture sets are the only things I can modify that actually make something happen in-game, but even using a completely blank one still colors the body purple. Transparency is simply not possible with an unmodified mesh. I guess tomorrow I will try with Nifskope. Link to comment Share on other sites More sharing options...
robotized Posted March 31, 2023 Share Posted March 31, 2023 Yes, my mistake, it's 255. Well, I tried Alpha Test + Alpha Test Reference @255, removed Skin Tint and Cast Shadows, seems to work fine in the game. Here's a screenshot. I also uploaded to my gdrive the test plugin and material. For the test I edited the armor addon of the summer shorts(edit: added mat swap only for the male model), in the game open console and type additem 14941a. Link to comment Share on other sites More sharing options...
ignorantslave Posted March 31, 2023 Author Share Posted March 31, 2023 Yes, my mistake, it's 255. Well, I tried Alpha Test + Alpha Test Reference @255, removed Skin Tint and Cast Shadows, seems to work fine in the game. Here's a screenshot. I also uploaded to my gdrive the test plugin and material. For the test I edited the armor addon of the summer shorts, in the game open console and type additem 14941a.You are right, there's nothing wrong with the material swap. The problem is in my approach. To avoid having to modify every outfit or creating copies with the material swap applied, I thought I could create a (transparent) skin texture set like the ones used to give raiders dirty skin or Ghouls their signature look, and apply it to an armoraddon for a my custom character skin. This way any outfit I would wear would use the same skin as the one applied to my modified torso armoraddon. And it partially works. I give the texture set a completely white diffuse, and wearing a raider harness makes the skin part of the outfit look white. The problem is, transparency is not carried over to the outfit, only colors. So the issue should be with the TextureSet. Despite using the same material with all alpha settings set for transparency, it doesn't register them. Only the RGB channels. Removing the Diffuse texture from the material causes the skin to turn purple. Replacing the original BaseMaleBody_d.dds with a version made transpararent with the Eraser tool in GIMP changes nothing, the alpha channel is simply ignored. Creating a new, completely empty texture turns the skin black, because the RGB channels are black when they are empty. Adding a NiAlphaProperty to the MaleBody.nif in Nifskope does nothing. In the TextureSet menu there are Alpha Test and Alpha blend options but only by checking "Decal" it lets me change them. They don't seem to work. Link to comment Share on other sites More sharing options...
robotized Posted March 31, 2023 Share Posted March 31, 2023 I'm kinda scratching my head. I'm going to just ask. If you want to have custom character skin, why not use the mod Unique Player and Followers? Also there are other options to have a unique body texture, like LooksMenu's Skin Overrides, or even the Overlays can do the job(maybe better than overrides). Outfits don't come with full body(the part of the mesh under the clothes is removed), but usually they occupy biped slot 33 and replace the whole body. So you'll have to change slots for all outfits in the game. And you'll probably have clipping issues when you equip the clothes over the full body. Link to comment Share on other sites More sharing options...
ignorantslave Posted March 31, 2023 Author Share Posted March 31, 2023 I'm kinda scratching my head. I'm going to just ask. If you want to have custom character skin, why not use the mod Unique Player and Followers? Also there are other options to have a unique body texture, like LooksMenu's Skin Overrides, or even the Overlays can do the job(maybe better than overrides). Outfits don't come with full body(the part of the mesh under the clothes is removed), but usually they occupy biped slot 33 and replace the whole body. So you'll have to change slots for all outfits in the game. And you'll probably have clipping issues when you equip the clothes over the full body.I'm sorry, I didn't give enough context for what I'm trying to do. I've made what is essentially a gen1 synth remodel (here's a pic), which would be its own race, and as you say, it would not be able to wear outfits without the rest of the model disappearing, since it doesn't have separate head and hands meshes yet.However, by changing the biped slot from 33 (BODY) to 32 (FaceGen Head), I can make the character wear both his own skin and pretty much any outfit or hat with minor clipping (here's the guy wearing a greaser jacket). Of course outfits showing skin do not look good, and I thought I could make the human mesh part invisible by using the same process used in vanilla to make ghouls apply their own skin texture to any outfit. To do that I added a humantorso ARMA to the character's ARMO along with the robot model ARMA, then make it invisible with a material swap and have a textureset apply the material to any outfit.As I said, it works partially (here's the guy wearing a harness, the skin is painted gray), but the Alpha channel of the texture (which works fine as a material swap) simply doesn't register on the outfits. The TextureSet seems to ignore any transparency setting in the bgsm file. I thought I was being smart by using this stratagem, but I'm clearly missing something. Still, thanks for the help and patience. Link to comment Share on other sites More sharing options...
Recommended Posts