How do i fix a black texture on a custom weapon model in-game?
#1
I’m trying to get a custom weapon model into my game, but the texture keeps appearing completely black in-game even though it looks fine in the modeling software. I’ve followed the usual process for creating a custom asset, but I’m wondering if there’s a specific step in the material file I might have missed.
Reply
#2
Double check the material graph. I once wired the texture to the wrong input and the shader just used a black color instead of the albedo. Make sure the texture is plugged into BaseColor or Albedo, not Emission or Opacity, and that there isn’t a Multiply node swallowing it with 0.
Reply
#3
Another common pitfall is the texture sampling setting. If the albedo texture is treated as linear in your engine, it can look way too dark or almost black. Enable sRGB for the albedo texture or switch the sampler to the correct color space.
Reply
#4
I had a case where a final Multiply by a constant 0 was left in the chain. Texture looked fine in the editor, but in game it stayed black. Removing that zero or reconnecting fixed it.
Reply
#5
Check your UVs. If the actor uses a second UV set and your material samples the first with mismatched coordinates, you can end up black across the mesh. Reimport with correct UVs or switch the texture coordinate to use the right set.
Reply
#6
I once did a quick test by applying the texture to a plain plane. It showed up fine, so I knew the texture itself was fine and the problem was the weapon’s material setup.
Reply
#7
I also remember a cache issue. After editing the material, I forgot to rebuild or reimport, and the engine kept showing the old black texture until I cleared the cache.
Reply
#8
Do you see any lighting at all on the model, or is it completely flat black even under direct light?
Reply


[-]
Quick Reply
Message
Type your reply to this message here.

Image Verification
Please enter the text contained within the image into the text box below it. This process is used to prevent automated spam bots.
Image Verification
(case insensitive)

Forum Jump: