Upvote Upvoted 10 Downvote Downvoted
Toggleable transparent viewmodels
posted in Customization
1
#1
0 Frags +

So I found a way to toggle transparent viewmodels in game.
You can just bind a button to toggle them, no lag or anything.
I tested it in casual, community servers and even valve comp and it's working fine.
I got the proper settings and transparency files from this thread: https://www.teamfortress.tv/21928/transparent-viewmodels-in-any-hud
And edited this static ambassador crosshair mod: https://github.com/juniorsgithub/tf2-static-ambassador-crosshair

Heres how you do it:

  1. Download the static ambassador crosshair mod and unzip it in your game's custom folder. Inside the amby-crosshair folder delete the "materials" folder.
    Also follow this step from the mod's guide:juniorIf you use a custom HUD

    Inside your HUD's folder, navigate to /resource/ui and look for huditemattributetracker.res.
    If it is there (doesn't have to), move it (not copy) into the amby-crosshair folder. If it asks you to overwrite you're doing it right.
  2. Download the transparent viewmodel files and extract them in the amby-crosshair folder.
  3. Inside of the amby-crosshair folder, open the crosshair.txt file with a text editor and change this part:
    // VTF image version
    "Image"
    {
    	visible 			1
    
    	xPos				cs-0.5+0
    	yPos				cs-0.5+0
    	wide				24
    	tall				24
    
    	image				"replay/thumbnails/crosshairs/cross"
    	drawColor			"50 220 0 255"
    }
    To:
    // VTF image version
    "Image"
    {
    	"xpos"			"0"
    	"ypos"			"0"
    	"zpos"			"-100"
    	"wide"			"f0"
    	"tall"			"480"
    	"visible"		"1"
    	"enabled"		"1"
    	"image"			"replay/thumbnails/REFRACTnormal_transparent"
    	"scaleImage"	"1"
    }
    In the same file, scroll to the very bottom and change:
    //#base "resource/OnlyWithMinmodeOn.res"
    //#base "resource/OnlyWithMinmodeOff.res"
    //#base "resource/AboveNormalCrosshair.res"
    to:
    //#base "resource/OnlyWithMinmodeOn.res"
    #base "resource/OnlyWithMinmodeOff.res"
    //#base "resource/AboveNormalCrosshair.res"
    (this will make it so when hud minmode is on, it will display the regular contraker overlay)
    If you want the regular overlay when minmode is OFF, change to this instead:
    #base "resource/OnlyWithMinmodeOn.res"
    //#base "resource/OnlyWithMinmodeOff.res"
    //#base "resource/AboveNormalCrosshair.res"
  4. Make sure you have the proper settings for transparent viewmodels. If you use mastercomfig just use the transparent viewmodels addon, it should work fine. If not I will just quote the original thread:komorebi// 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

How to toggle:

All the info you need on that is in the amby crosshair mod page but to sum it up:

  1. Toggle transparent viewmodel by toggling
    tf_contract_progress_show
    tf_contract_competitive_show
    0 will turn transparent viewmodels off, 1 will turn them on. A value of 2 seems to also keep them transparent.
  2. cl_hud_minmode 0/1
    should toggle between regular contract overlay and the transparency toggle but it might be broken after the changes. I have not tested properly yet. Fixed, works properly now.

Now you can also have different binds/aliases that besides turning transparent viewmodels on and off, they also toggle the settings they need to work (like motion blur for example).
Like this:

alias transparencyON "mat_motion_blur_enabled 1; tf_contract_progress_show 1; tf_contract_competitive_show 1"

alias transparencyOFF "mat_motion_blur_enabled 0; tf_contract_progress_show 0; tf_contract_competitive_show 0"

Bugs
1. Screen gets darker when you have them on but disable viewmodels. I think this was an issue transparent viewmodels always had. Fixed by disabling transparency and viewmodels together.
2. I joined a community server and I had to spam the toggle commands 2-3 times before viewmodels turned transparent? Only happened once and on that server, they work instantly in casual and all other servers I tried. Happened again on some server, seems to be a regular issue:

komorebiSome 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.

But instead of getting stuck like that, with this toggleable method you can fix them by toggling them on and off a few times on the rare occasion that it happens.
3. They won't be transparent when you're in the menu(that includes using the console). Not exactly a bug but worth mentioning.
4. I'm pretty sure the contracker overlay doesn't work anymore, need to do some more testing. Simple fix, updated the instructions.

And that's all, if there are any issues let me know. Hope this hasn't been posted before, I searched around and couldn't find toggleable transparent viewmodels.

So I found a way to toggle transparent viewmodels in game.
You can just bind a button to toggle them, no lag or anything.
I tested it in casual, community servers and even valve comp and it's working fine.
I got the proper settings and transparency files from this thread: https://www.teamfortress.tv/21928/transparent-viewmodels-in-any-hud
And edited this static ambassador crosshair mod: https://github.com/juniorsgithub/tf2-static-ambassador-crosshair

[b]Heres how you do it:[/b]
[olist]
[*] Download the [url=https://github.com/juniorsgithub/tf2-static-ambassador-crosshair]static ambassador crosshair mod[/url] and unzip it in your game's custom folder. Inside the amby-crosshair folder delete the "materials" folder.
Also follow this step from the mod's guide:
[quote=junior]
If you use a custom HUD

Inside your HUD's folder, navigate to /resource/ui and look for huditemattributetracker.res.
If it is there (doesn't have to), [b]move [/b]it (not copy) into the amby-crosshair folder. If it asks you to overwrite you're doing it right.
[/quote]
[*] Download the [url=https://www.teamfortress.tv/21928/transparent-viewmodels-in-any-hud/?page=5#144]transparent viewmodel files[/url] and extract them in the amby-crosshair folder.
[*] Inside of the amby-crosshair folder, open the crosshair.txt file with a text editor and change this part:
[code]// VTF image version
"Image"
{
visible 1

xPos cs-0.5+0
yPos cs-0.5+0
wide 24
tall 24

image "replay/thumbnails/crosshairs/cross"
drawColor "50 220 0 255"
}
[/code]
To:
[code]// VTF image version
"Image"
{
"xpos" "0"
"ypos" "0"
"zpos" "-100"
"wide" "f0"
"tall" "480"
"visible" "1"
"enabled" "1"
"image" "replay/thumbnails/REFRACTnormal_transparent"
"scaleImage" "1"
}[/code]
In the same file, scroll to the very bottom and change:
[code]//#base "resource/OnlyWithMinmodeOn.res"
//#base "resource/OnlyWithMinmodeOff.res"
//#base "resource/AboveNormalCrosshair.res"[/code]
to:
[code]//#base "resource/OnlyWithMinmodeOn.res"
#base "resource/OnlyWithMinmodeOff.res"
//#base "resource/AboveNormalCrosshair.res"[/code]
(this will make it so when hud minmode is on, it will display the regular contraker overlay)
If you want the regular overlay when minmode is OFF, change to this instead:
[code]#base "resource/OnlyWithMinmodeOn.res"
//#base "resource/OnlyWithMinmodeOff.res"
//#base "resource/AboveNormalCrosshair.res"[/code]
[*] Make sure you have the proper settings for transparent viewmodels. If you use mastercomfig just use the transparent viewmodels addon, it should work fine. If not I will just quote the original thread:
[quote=komorebi]// 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[/quote]
[/olist]

[b]How to toggle:[/b]

All the info you need on that is in the amby crosshair mod page but to sum it up:
[olist]
[*] Toggle transparent viewmodel by toggling
[code]tf_contract_progress_show
tf_contract_competitive_show[/code]
0 will turn transparent viewmodels off, 1 will turn them on. A value of 2 seems to also keep them transparent.
[*] [code]cl_hud_minmode 0/1[/code] [s][i]should[/i] toggle between regular contract overlay and the transparency toggle but it might be broken after the changes. I have not tested properly yet.[/s] Fixed, works properly now.
[/olist]

Now you can also have different binds/aliases that besides turning transparent viewmodels on and off, they also toggle the settings they need to work (like motion blur for example).
Like this:
[code]alias transparencyON "mat_motion_blur_enabled 1; tf_contract_progress_show 1; tf_contract_competitive_show 1"

alias transparencyOFF "mat_motion_blur_enabled 0; tf_contract_progress_show 0; tf_contract_competitive_show 0"[/code]

[b]Bugs[/b]
[s]1. Screen gets darker when you have them on but disable viewmodels. I think this was an issue transparent viewmodels always had.[/s] Fixed by disabling transparency and viewmodels together.
2. I joined a community server and I had to spam the toggle commands 2-3 times before viewmodels turned transparent? Only happened once and on that server, they work instantly in casual and all other servers I tried. Happened again on some server, seems to be a regular issue:
[quote=komorebi]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.[/quote]
[u]But[/u] instead of getting stuck like that, with this toggleable method you can fix them by toggling them on and off a few times on the rare occasion that it happens.
3. They won't be transparent when you're in the menu(that includes using the console). Not exactly a bug but worth mentioning.
[s]4. I'm pretty sure the contracker overlay doesn't work anymore, need to do some more testing.[/s] Simple fix, updated the instructions.

And that's all, if there are any issues let me know. Hope this hasn't been posted before, I searched around and couldn't find toggleable transparent viewmodels.
Please sign in through STEAM to post a comment.