Source Filmmaker

Source Filmmaker

Specular map makes model glow.. Any fix?
I have model with:
normal diffuse texture. (the alpha is pure white btw)
Bump map with alpha layer as specular map. (only certain parts are white for shine effect, rest is black)

in VMT its "$basemapalphaphongmask" "1"

Its all working in SFM and model viewer.
BUT!
If the scene is dim, or black (tested) the specular map is glowing up.
There is only $phong activated in the VMT.

It IS acting reflective with shine as its supposed to, but with intense glowing.

- As a side note. if the scene is bright. there is no issue, then its almost transparent.
If i set $phong to "0" it goes away, but then i lose the effect where the light is hitting...

Whats going on?
Last edited by Exurok [SBG]; Jan 8, 2017 @ 3:30pm
< >
Showing 1-15 of 18 comments
Zappy Jan 7, 2017 @ 6:37am 
Screenshots as well as the full VMT?
Zanto96 Jan 7, 2017 @ 6:55am 
maybe its the envmap and you can use "$envmaptint" and set this to "0". I hope it works
Exurok [SBG] Jan 8, 2017 @ 3:34pm 
Here is the vmt info in full.

$basetexture "models/diffusefile"
$bumpmap "models/bumpfile"

$normalmapalphaenvmapmask "1"

$phong "1"
$phongboost "0.7"
$phongexponent "16"
$phongtint "[1 0.85 0.75]"
$phongfresnelranges "[.1 .1 1]"

$envmap "models/cubemap"
$envmapmask "models/bumpfile"

$detail "models/detailfile"
$detailscale "15"
$detailblendmode "0"
$nocull "1"
Zappy Jan 8, 2017 @ 11:05pm 
Environment maps glow in the dark. If you don't want the model to have a fake reflection and glow in the dark, you should get rid of the $EnvMap and $EnvMapMask lines.
(This will also make the $NormalMapAlphaEnvMapMask line useless, so delete that line too...
I think it actually was useless already anyway, because of the $EnvMapMask line.)

Alternatively, if you want the environment map to be masked by the bump-map's alpha channel, just get rid of the $EnvMapMask line.

Also, unrelatedly, $NoCull should generally be avoided where possible.
Last edited by Zappy; Jan 9, 2017 @ 12:43am
Exurok [SBG] Jan 9, 2017 @ 12:16am 
Wow Zappy Will do! I have read so much from you on this forum. Thanks for helping us out so much. You really good to have around =)
Exurok [SBG] Jan 18, 2017 @ 7:23am 
Can you bypass the envmap glow by adding more env_cubemaps on the map itself?
Zappy Jan 18, 2017 @ 7:44am 
Not unless an env_cubemap entity is added in a place that is so dark the generated texture will be completely black. (But even if it's not dark enough for that, an env_cubemap entity in a dark area will produce a darker environment map and thus less glow than in a bright environment.)
Last edited by Zappy; Jan 18, 2017 @ 7:44am
Exurok [SBG] Jan 18, 2017 @ 7:47am 
Interesting, thanks Zappy ;)
Exurok [SBG] Jan 18, 2017 @ 7:55am 
On the subject, is it another way to make lets say a cube of jelly shine EXCEPT phong?
Having the reflective properties of specular map seems superior. Or am i just using this wrong?
Zappy Jan 18, 2017 @ 8:13am 
I'm not quite sure whether $EnvMap can be used without $Phong, so try it. If it doesn't work, remember you can use a $PhongBoost value of 0 to make phong pretty much invisible.
Exurok [SBG] Jan 18, 2017 @ 8:17am 
Alright, will try, but does that mean there is no alternative? So if the cube of jelly in lets say 4k in an dark enviroment will always glow IF i want reflections(envmap) ?
Pipann Jan 18, 2017 @ 8:23am 
Originally posted by Zappy:
Also, unrelatedly, $NoCull should generally be avoided where possible.

Out of curiosity, the only difference nocull makes is that the texture is on both sides of the mesh right? Why should it be avoided? Does it somehow have a negative impact on anything if you use it unnecessarily?
Zappy Jan 18, 2017 @ 8:33am 
Originally posted by Exurok:
Alright, will try, but does that mean there is no alternative? So if the cube of jelly in lets say 4k in an dark enviroment will always glow IF i want reflections(envmap) ?
Sort of. Environment maps are not affected by the model's actual lighting, meaning a red environment map will always add that amount of red onto the model, regardless of how bright the model may be (both texture- and lighting-wise). But you can add override materials to a model, add a Vector3 (or Float or Color or other value) called $EnvMapTint to an override material, and set it to 0 to make it so environment maps have no effect.

Originally posted by Pipann:
Originally posted by Zappy:
Also, unrelatedly, $NoCull should generally be avoided where possible.
Out of curiosity, the only difference nocull makes is that the texture is on both sides of the mesh right? Why should it be avoided? Does it somehow have a negative impact on anything if you use it unnecessarily?
There's no need for it on the inside of a model, and if there is, then it's preferable to just copy the mesh and flip its normals. You see, if you have a mesh that faces upwards, it will become bright if light shines from above, and not if from below. $NoCull doesn't flip that, meaning the "un-culled" portion of the mesh will seemingly be illuminated from behind.
Pipann Jan 18, 2017 @ 8:54am 
Interesting. Thanks for the info
Marco Skoll Jan 18, 2017 @ 9:03am 
Originally posted by Pipann:
Does it somehow have a negative impact on anything if you use it unnecessarily?
Aside from what Zappy said about it often not working as desired, culling faces is more efficient than processing polygons the camera can't see.

Basically, using $nocull when you don't need to harms performance.
< >
Showing 1-15 of 18 comments
Per page: 1530 50

Date Posted: Jan 7, 2017 @ 6:26am
Posts: 18