Source Filmmaker

Source Filmmaker

Afrohawk Jul 1, 2017 @ 9:03pm
Alpha Texture Flickering
I wanted to use the $alpha value to create semi-translucent lens on a pair of sunglasses and the effect works fairly well with a .8 value. It works well when the glasses are still but at certain locations on the map it tends to turn off completely. It'll turn back on if I move back to the previous location but that's problematic if I want to use it in an animation.

Is there any way to prevent this? Alternatively, are there other ways to modify a texture to make it semi-transparent?

Thanks for reading!
< >
Showing 1-15 of 16 comments
Zappy Jul 2, 2017 @ 1:22am 
Please copy-paste the entire material here. I have a feeling I know what's going on, but I need confirmation that what I'm thinking is the case.
Afrohawk Jul 2, 2017 @ 7:10am 
The entire material? I'm not sure what you mean. In the workshop, it's one of the Splatoon shades (http://steamcommunity.com/sharedfiles/filedetails/?id=8896593), specifically the shades.mdl model.

The current settings I'm using for it are:

name: tinted_shades_glass
mtlName: models\props_splatoon\gear\headgear\glasses\shades\tinted_shades_glass
$colortint_base: RGBA 0.9411765 0.5764706 0.9882353 1.000
$alpha: 0.8000000119

If you want me to upload the material or texture to another site let me know!
Zappy Jul 2, 2017 @ 7:20am 
Originally posted by Afrohawk:
The entire material? I'm not sure what you mean. -
I mean you should open the VMT file in a text editor, hit Ctrl+A to select everything, hit Ctrl+C to copy everything, click in the comment box here, hit Ctrl+V to paste it, then post the comment.

Here, the VMT file should be located at -/SourceFilmmaker/game/workshop/materials/models/
/props_splatoon/gear/headgear/glasses/shades/tinted_shades_glass.vmt

You can reach "-/SourceFilmmaker/" if you right-click Source FilmMaker in your Steam library and click "Properties" > "Local Files" > "Browse Local Files...". From there, navigate through the folders I mentioned, then open the VMT file in a text editor (even Notepad will suffice).
Afrohawk Jul 2, 2017 @ 7:50am 
Oh! My mistake. Here's the VMT file:

"VertexLitGeneric"
{
"$basetexture" "models\props_splatoon\gear\headgear\glasses\shades\tinted_shades_glass"
"$bumpmap" "models\props_splatoon\gear\headgear\glasses\shades\tinted_shades_glass_normal"
"$lightwarptexture" "models\props_splatoon\gear\shared\gear_lightwarp"

"$phong" "1"
"$phongexponent" "200"
"$phongboost" "15"
"$phongfresnelranges" "[.3 1 2]"
// "$halflambert" "1"
"$phongtint" "{ 34 140 255 }"

"$envmap" "env_cubemap"
"$envmaptint" "{ 34 140 255 }"
"$normalmapalphaenvmapmask" "1"

"$blendtintbybasealpha" "1"
"$blendtintcoloroverbase" "1"
"$colortint_base" "{ 34 140 255 }"
"$colortint_tmp" "[0 0 0]"
"$color2" "{ 34 140 255 }"

"proxies"
{
"ItemTintColor"
{
"resultVar" "$colortint_tmp"
}
"SelectFirstIfNonZero"
{
"srcVar1" "$colortint_tmp"
"srcVar2" "$colortint_base"
"resultVar" "$color2"
}
"SelectFirstIfNonZero"
{
"srcVar1" "$colortint_tmp"
"srcVar2" "$colortint_base"
"resultVar" "$envmaptint"
}
"SelectFirstIfNonZero"
{
"srcVar1" "$colortint_tmp"
"srcVar2" "$colortint_base"
"resultVar" "$phongtint"
}
}
}

Zappy Jul 2, 2017 @ 8:13am 
Originally posted by Afrohawk:
- "$envmap" "env_cubemap" -
This line is what makes the glasses shiny. It does so by looking at what the nearest pre-compiled "cube-map" (cube-shaped screenshot) is. This means that if you move the model to a place where the nearest cube-map is really dark, there will be almost no shininess, even if the model may be out in direct sunlight. This is, presumably, what's causing the issue you're having with the glasses "disappearing" in certain parts of a map.
Afrohawk Jul 2, 2017 @ 8:21am 
Oooh I see! Thank you for your help! Do I just comment that out then? I don't mind if they're not too shiny as long as the tint stays.
Zappy Jul 2, 2017 @ 8:28am 
Well, if you want, you can add a double-slash ( // ) in front of the line to comment it out, but they will really not look as shiny. But yes, you can try it and see if it still looks good.
Afrohawk Jul 2, 2017 @ 8:47am 
Added in the comment, haven't seen any change to the model. Reloaded SFM twice, still no effect. Do I need to update the model in another way?
Zappy Jul 2, 2017 @ 8:50am 
Try copy-pasting the entire VMT's contents here again, for me to check if you did something wrong. Also, I'd probably like to see some screenshots of when the glass is visible and when it's not.
Afrohawk Jul 2, 2017 @ 8:53am 
Here's the VMT, I'll grab the screenshots and post 'em in a minute.

"VertexLitGeneric"
{
"$basetexture" "models\props_splatoon\gear\headgear\glasses\shades\tinted_shades_glass"
"$bumpmap" "models\props_splatoon\gear\headgear\glasses\shades\tinted_shades_glass_normal"
"$lightwarptexture" "models\props_splatoon\gear\shared\gear_lightwarp"

"$phong" "1"
"$phongexponent" "200"
"$phongboost" "15"
"$phongfresnelranges" "[.3 1 2]"
// "$halflambert" "1"
"$phongtint" "{ 34 140 255 }"

// "$envmap" "env_cubemap"
"$envmaptint" "{ 34 140 255 }"
"$normalmapalphaenvmapmask" "1"

"$blendtintbybasealpha" "1"
"$blendtintcoloroverbase" "1"
"$colortint_base" "{ 34 140 255 }"
"$colortint_tmp" "[0 0 0]"
"$color2" "{ 34 140 255 }"

"proxies"
{
"ItemTintColor"
{
"resultVar" "$colortint_tmp"
}
"SelectFirstIfNonZero"
{
"srcVar1" "$colortint_tmp"
"srcVar2" "$colortint_base"
"resultVar" "$color2"
}
"SelectFirstIfNonZero"
{
"srcVar1" "$colortint_tmp"
"srcVar2" "$colortint_base"
"resultVar" "$envmaptint"
}
"SelectFirstIfNonZero"
{
"srcVar1" "$colortint_tmp"
"srcVar2" "$colortint_base"
"resultVar" "$phongtint"
}
}
}

Zappy Jul 2, 2017 @ 8:57am 
Well, the VMT looks fine to me, I think.
Afrohawk Jul 2, 2017 @ 8:59am 
Here's the working: https://cdn.discordapp.com/attachments/132887900508389376/331101283572252672/Working.PNG

and the Non working: https://cdn.discordapp.com/attachments/132887900508389376/331101280195837954/Not_Working.PNG

Let me know if these show up, I hosted 'em on Discord so I don't know if hyperlinks work here.
Zappy Jul 2, 2017 @ 9:03am 
I'm afraid this isn't the issue I was expecting. So... like, try un-commenting the $envmap line again. Then try deleting the $alpha of the override material, and add it to the actual VMT instead. Maybe that will do something nice, not sure.
Last edited by Zappy; Jul 2, 2017 @ 9:03am
Afrohawk Jul 2, 2017 @ 9:06am 
Tried that just now, sadly no dice. The alpha does still show up but the flickering still occurs.
Last edited by Afrohawk; Jul 2, 2017 @ 9:06am
Zappy Jul 2, 2017 @ 9:08am 
In that case, I'm afraid there's not much to do.
< >
Showing 1-15 of 16 comments
Per page: 1530 50

Date Posted: Jul 1, 2017 @ 9:03pm
Posts: 16