Semi-transparent object texture makes things in front of it invisible
3 replies, posted
I tried my hand at a semi-transparent skin today. It worked out surprisingly easily once I got the procedure down, but in-game I have a slight problem:
[img]http://img688.imageshack.us/img688/6533/gmconstruct00047435583.jpg[/img]
Somehow the transparent glass texture is overriding the lime slice in front of it, making any piece where they overlap invisible.
Similarly,
[IMG]http://img194.imageshack.us/img194/2089/gmconstruct00067508909.jpg[/IMG]
In this lighting environment, the lime slice texture (and the liquid I now notice) is visible [I]behind[/I] the glass, rather than just being made invisible.
Is there a setting or something I'm missing?
Post the VMT.
Compile it with $mostlyopaque
[QUOTE=fury_161;21920618]Compile it with $mostlyopaque[/QUOTE]
Thanks mate, did the trick.
[B]EDIT:[/B]
Well, I've got a new problem. In fact I'm not sure the first was even solved, it just looked better after the suggested changes so I went with it.
Here we have the same model, with a different color liquid and a smaller construct inside with its own texture.
[img]http://img37.imageshack.us/img37/9766/rphometown2000000250916.jpg[/img]
The liquid is again "behind" the glass, regardless of its transparency.
By contrast, if I stick something in the liquid, it behaves as expected.
[img]http://img441.imageshack.us/img441/4409/rphometown2000000560126.jpg[/img]
I've tried it with the liquid completely opaque, in varying degrees of transparency, and as a completely different texture from the glass. All result in this.
Here is my QC file:
[code]$cd "C:\Users\Jon\Downloads\HL2 Compile Toolkit v121b\HL2 Compile Toolkit\model_compiling_files\Margarita"
$modelname "Margarita\Margarita.mdl"
$cdmaterials "Margarita\"
$scale 0.09
$surfaceprop "glass"
$keyvalues { "prop_data" { "base" "Glass.Small" } }
$body studio "Margarita"
$sequence idle "Margarita" fps 1
$collisionmodel "Margarita" {
$automass
$concave
$mostlyopaque
}
[/code]
And the VMT
[code]"VertexlitGeneric"
{
"$basetexture" "Margarita/Margarita"
"$surfaceprop" "Glass"
"$surfaceprop2" "Glass"
"$translucent" 1
"$vertexalpha" 1
}
[/code]
I have tried it both with and without $vertexalpha, both are the same.
Sorry, you need to Log In to post a reply to this thread.