1 #1 komorebi 1 Frags – +

Something new that was just discovered by JarateKing is that one can edit the material proxies of a .vmt to make anything beneath the material translucent, or, more accurately, make it refract. One potential use of this function is to make your viewmodels transparent. This is already mentioned in his hud's thread but I know a lot of people haven't seen it. A couple things to note: This method is simple hud-editing.



It shouldn't ever result in a VAC ban.



However: this might be considered an exploit as for some reason it affects some map textures as well, specifically spawn doors. This is disappointing as it increases the likelihood of this being patched in some way.



If used in conjunction with chris' or comanglia's maxframes fps configs it will work on all maps.



Right now it does not work on dx8, only dx9 (which sucks).



It should work on macintosh, not sure of linux.



Assuming the above conditions are met: it ~should~ work on all servers, sv_pure 2 or otherwise, at least until the workaround for custom materials is patched (if ever). Some public servers have broken all custom materials for me personally, usually ones running sourcemod to limit classes or disable capping on hightower. Someone in this thread mentioned skial badwater not working. It's possible there's some servermod that might render this ineffective, not sure.

To put it in layman's terms: one is putting a transparent screen underneath their health and ammo that refracts light such that everything underneath it is transparent. Since your viewmodels are technically considered a part of your hud (??) they are partially transparent. This does not affect the actual tf2 map you are playing on, just your viewmodels . (edit: apparently this does affect the map?) Here's how to add this feature into any hud: 1. Materials First you will need to get the custom materials in question. Here is a download link, and here, for reference, is what the .vmt file actually look like: "Refract" { "%keywords" "tf" "$refractamount" "0.0" "$refracttint" "{255 255 255}" "$refractblur" "0.0" "$scale" "[1 1]" "$normalmap" "vgui/replay/thumbnails/REFRACTnormal_transparent" } Compared to what it ~normally~ looks like. "UnlitGeneric" { "$translucent" "1" "$basetexture" "vgui\replay\thumbnails\seeker" "$vertexcolor" "1" "$no_fullbright" "1" "$ignorez" "1" } Once you have both the .vtf and the .vmt, put them in custom/ * any name * /materials/vgui/replay/thumbnails. 2. HudLayout Next you will need to reference the material in HudLayout.res in your scripts folder. Copy/paste this into the file. It needs to follow the formatting used by hudlayout. Put it right where the cursor is in the below screenshot (default hud used for example): http://i.imgur.com/xPN1OdC.png Make sure not to delete any existing brackets while doing so. The below is what you copy-paste. "TransparentViewmodelMask" { //alpha doesn't work for this, you need to change the texture's alpha "ControlName" "ImagePanel" "fieldName" "TransparentViewmodelMask" "xpos" "0" "ypos" "0" "zpos" "-100" "wide" "f0" "tall" "480" "visible" "1" "enabled" "1" "image" "replay/thumbnails/REFRACTnormal_transparent" "scaleImage" "1" } 3. Config Settings The final step is to edit your fps config so that certain console commands don't disable your viewmodels' transparency. Find these console commands in your config and replace them with the following: // Prism Settings (for refract) mat_motion_blur_enabled 1 //afaik the only sure-fire way to keep refract masking on mat_motion_blur_strength 0 //effectively disables motion blur, personal choice + motion blur gets masked and looks bad with refract masking mat_disable_bloom 1 //disables bloom so refract masking doesn't create a dark rectangle over light materials mat_hdr_level 0 mat_colcorrection_disableentities 1 mat_colorcorrection 0 Using these commands should make this work on all maps, with or without water. Big thanks to -Icaria- from reddit for going through chris' maxframes and commenting out each line to find these. More feedback on these being the only commands neccesary welcome. If my explanation is too complicated or you don't get it, there's a simple version of this post that might help here. That's it! Your viewmodels will now look like this: shitty youtube video: https://www.youtube.com/watch?v=1yqZTt0Lc78&feature=youtu.be imgur album:

http://imgur.com/a/L0t9v

Something new that was just discovered by [url=http://teamfortress.tv/user/jarateking]JarateKing[/url] is that one can edit the material proxies of a .vmt to make anything beneath the material translucent, or, more accurately, make it refract. One potential use of this function is to make your viewmodels transparent. This is already mentioned in his hud's thread but I know a lot of people haven't seen it.



A couple things to note:

[list]

[*] This method is simple hud-editing.

[*] It shouldn't ever result in a VAC ban.

[*] However: this might be considered an exploit as for some reason it affects some map textures as well, specifically spawn doors. This is disappointing as it increases the likelihood of this being patched in some way.

[*] If used in conjunction with chris' or comanglia's maxframes fps configs it will work on all maps.

[*] Right now it does not work on dx8, only dx9 (which sucks).

[*] It should work on macintosh, not sure of linux.

[*] Assuming the above conditions are met: it ~should~ work on all servers, sv_pure 2 or otherwise, at least until the workaround for custom materials is patched (if ever). Some public servers have broken all custom materials for me personally, usually ones running sourcemod to limit classes or disable capping on hightower. Someone in this thread mentioned skial badwater not working. It's possible there's some servermod that might render this ineffective, not sure.



[/list]

To put it in layman's terms: one is putting a transparent screen underneath their health and ammo that refracts light such that everything underneath it is transparent. Since your viewmodels are technically considered a part of your hud (??) they are partially transparent. [s]This does not affect the actual tf2 map you are playing on, just your viewmodels[/s]. (edit: apparently this does affect the map?) Here's how to add this feature into any hud:



[size=14][b]1. Materials[/b][/size]



First you will need to get the custom materials in question. Here is a [url=https://www.dropbox.com/s/ukzqswen7jb546z/transparent.zip?dl=0]download link[/url], and here, for reference, is what the .vmt file actually look like:



[code]"Refract"

{

"%keywords" "tf"

"$refractamount" "0.0"

"$refracttint" "{255 255 255}"

"$refractblur" "0.0"



"$scale" "[1 1]"

"$normalmap" "vgui/replay/thumbnails/REFRACTnormal_transparent"

}

[/code]

Compared to what it ~normally~ looks like.



[code]"UnlitGeneric"

{

"$translucent" "1"

"$basetexture" "vgui\replay\thumbnails\seeker"

"$vertexcolor" "1"

"$no_fullbright" "1"

"$ignorez" "1"

}[/code]



Once you have both the .vtf and the .vmt, put them in custom/ * any name * /materials/vgui/replay/thumbnails.



[size=14][b]2. HudLayout[/b][/size]



Next you will need to reference the material in HudLayout.res in your scripts folder. Copy/paste this into the file. It needs to follow the formatting used by hudlayout. Put it right where the cursor is in the below screenshot (default hud used for example):



[img]http://i.imgur.com/xPN1OdC.png[/img]



Make sure not to delete any existing brackets while doing so. The below is what you copy-paste.



[code]"TransparentViewmodelMask"

{

//alpha doesn't work for this, you need to change the texture's alpha

"ControlName" "ImagePanel"

"fieldName" "TransparentViewmodelMask"

"xpos" "0"

"ypos" "0"

"zpos" "-100"

"wide" "f0"

"tall" "480"

"visible" "1"

"enabled" "1"

"image" "replay/thumbnails/REFRACTnormal_transparent"

"scaleImage" "1"

}

[/code]

[size=14][b]3. Config Settings[/b][/size]



The final step is to edit your fps config so that certain console commands don't disable your viewmodels' transparency. Find these console commands in your config and replace them with the following:





[code]// Prism Settings (for refract)





mat_motion_blur_enabled 1 //afaik the only sure-fire way to keep refract masking on

mat_motion_blur_strength 0 //effectively disables motion blur, personal choice + motion blur gets masked and looks bad with refract masking

mat_disable_bloom 1 //disables bloom so refract masking doesn't create a dark rectangle over light materials

mat_hdr_level 0

mat_colcorrection_disableentities 1

mat_colorcorrection 0

[/code]



Using these commands should make this work on all maps, with or without water. Big thanks to [url=http://www.reddit.com/user/-Icaria-]-Icaria-[/url] from reddit for going through chris' maxframes and commenting out each line to find these. More feedback on these being the only commands neccesary welcome.



If my explanation is too complicated or you don't get it, there's a simple version of this post that might help [url=http://teamfortress.tv/thread/21928/transparent-viewmodels-in-any-hud/?page=2#37

]here[/url].



That's it! Your viewmodels will now look like this:



shitty youtube video:

[youtube]https://www.youtube.com/watch?v=1yqZTt0Lc78&feature=youtu.be[/youtube]



imgur album:

http://imgur.com/a/L0t9v