Source Filmmaker

Source Filmmaker

Alpha channel on normal map isn't working
Hey. I've been trying to make a model look metallic for the past day but I've just kept hitting a wall. As I understand it, the normal map's alpha channel is used to determine what areas of the model have a metallic sheen/phong (correct me if I'm wrong), so I've tried baking the normals in Blender but the alpha channel always comes out white. I'm fairly certain this is because I'm baking a procedural texture instead of a hi-poly to lo-poly mesh. How would I add an alpha channel post-bake?
Originally posted by anonymousgamer:
For most normal maps, you'll want to use BGRA8888 as DXT compression artifacts show up a lot worse in normal maps than they do in basetextures.

You'll also need to double check if your phong settings are correct in your vmts - having $phong, $phongboost, $phongexponent and $phongfresnelranges, for instance. Just having an alpha in the normal map won't do anything by itself.

As to your comment about making something look metallic - phong won't do that alone. SFM's vertexlitgeneric shader is similar to spec/gloss PBR, except worse and cut down. If you want something to look metallic, you'll need to make sure the metals in your material are black or near-black in the basetexture. This will work if your metals have little to no color tinting (steel, chromium, titanium, etc). If you do have colored metals (gold, copper, bismuth, tempered steel), then you're gonna have to get creative, as SFM's vertexlitgeneric shader doesn't have per-texel phong tinting.... except for $phongalbedotint, which assumes there is color in the $basetexture.... when there won't be.
< >
Showing 1-3 of 3 comments
R234 Mar 25, 2023 @ 11:59am 
In Blender? I'm not really familiar with editing textures in Blender, but it's easy enough to do in VTFEdit or GIMP/Photoshop with a VTF plugin.

Also yes, the bump map texture's alpha channel is used by Source as a phong mask by default, but it's possible to change that with VMT commands such as $basemapalphaphongmask (uses the base texture's alpha channel instead).
CaptainExtremis Mar 25, 2023 @ 12:38pm 
I've tried ticking the "Normal Map" box in VTFEdit after importing the texture, but when I reloaded SFM, the texture hadn't changed, so at this point, I figure I'm importing the texture wrong. I have my Normal Format as DXT1 and Alpha Format as DXT5, and the only box ticked after importing is Eight Bit Alpha.
The author of this thread has indicated that this post answers the original topic.
anonymousgamer Mar 25, 2023 @ 1:11pm 
For most normal maps, you'll want to use BGRA8888 as DXT compression artifacts show up a lot worse in normal maps than they do in basetextures.

You'll also need to double check if your phong settings are correct in your vmts - having $phong, $phongboost, $phongexponent and $phongfresnelranges, for instance. Just having an alpha in the normal map won't do anything by itself.

As to your comment about making something look metallic - phong won't do that alone. SFM's vertexlitgeneric shader is similar to spec/gloss PBR, except worse and cut down. If you want something to look metallic, you'll need to make sure the metals in your material are black or near-black in the basetexture. This will work if your metals have little to no color tinting (steel, chromium, titanium, etc). If you do have colored metals (gold, copper, bismuth, tempered steel), then you're gonna have to get creative, as SFM's vertexlitgeneric shader doesn't have per-texel phong tinting.... except for $phongalbedotint, which assumes there is color in the $basetexture.... when there won't be.
Last edited by anonymousgamer; Mar 25, 2023 @ 1:14pm
< >
Showing 1-3 of 3 comments
Per page: 1530 50

Date Posted: Mar 25, 2023 @ 10:40am
Posts: 3