I tried to make a small glass TV coffe table. Trying to figure out how to make glass for the first time. I wanted glass to be transparent so first of all added "$Translucent" "1". But it seems like it makes whole prop transparent. Then i checked out "Alpha". But if i add "$alpha" "0" prop just disappears. I'm not sure how to make a part of prop glass-like but i've been trying for 5 hours and still have no clue. Could anyone explain this?
[URL="https://pp.userapi.com/c837622/v837622493/4fa8c/xMXmXDgJxG0.jpg"]https://pp.userapi.com/c837622/v837622493/4fa8c/xMXmXDgJxG0.jpg[/URL]
That's just "$translucent" "1"
[URL="http://www.image-share.com/upload/3574/195.png"]http://www.image-share.com/upload/3574/195.png[/URL]
added "$alpha" "0" and it's gone. I thought maybe if alpha 0 is totally invisible i should make it 0,5 or something like that but that was just pathetic. I might not understand what alpha is or something. I added alpha channel in texture in photoshop and made the part i want to be transparent kinda "transparent" so this had to work i guess.
[URL="http://www.image-share.com/upload/3574/196.png"]http://www.image-share.com/upload/3574/196.png[/URL]
And that's vmf file. I tried to find any transparent model to compare vmf and vtf but it seems like i can't find it anywhere so far.
[editline]12th July 2017[/editline]
[URL="http://rgho.st/6FCFd4dn7"]http://rgho.st/6FCFd4dn7[/URL]
Model files
P.S. - the problem might be about alpha channel but i'm not sure. Maybe i should try gimp. No idea.
You could use two different materials, one for the glass and another one for the legs. Making only the glass translucent, although im not sure if that is the best work around for it.
$alpha as said in [URL="https://developer.valvesoftware.com/wiki/$alpha"]https://developer.valvesoftware.com/wiki/$alpha[/URL] affects the whole materail, so if you set it to 0 the texture would be rendered with 0 alpha, making it invisible. $translucent
as far as I understand allows to render the faces behind the material, achieving that tranpsarent effect and despite the wiki stating that it uses the pixels of the vft to determine what is transparent and what is not. It is mainly use for 2d objects like decals as I guess source can't work layering of the faces in the model...
After reading some old threads I found out that I might be right...
[URL="https://facepunch.com/showthread.php?t=1473899&p=48095658&viewfull=1#post48095658"]https://facepunch.com/showthread.php?t=1473899&p=48095658&viewfull=1#post48095658[/URL]
[URL="https://facepunch.com/showthread.php?t=1051055&p=43045739&viewfull=1#post43045739"]https://facepunch.com/showthread.php?t=1051055&p=43045739&viewfull=1#post43045739[/URL]
You will need to edit your model and recompile it with two materials one for the glass and one for the legs. Shouldn't be that big a problem as you can use the same texture for both just change the vmts...
What Abi said, use separate vmts for the glass and the rest of the table, making only the glass translucent
Thanks AbiSv. That was kinda hard. Have to change env, texture a bit and etc and it'll look good.
[IMG]https://pp.userapi.com/c837622/v837622125/61771/sCQcemeaZPA.jpg[/IMG]
Sorry, you need to Log In to post a reply to this thread.