ValveSoftware / Source-1-Games

Source 1 based games such as TF2 and Counter-Strike: Source
648 stars 75 forks source link

[TF2] Step By step how to fix broken vmt parameters on weapons #5325

Open condor00fr opened 11 months ago

condor00fr commented 11 months ago

This is the Stock Revolver's vmt file, located inside "materials/models/weapons/c_models/c_revolver"

ctf_2fort0002

It looks plain and kind of plastic looking, wich is bad, but it wasn't always this way.

For the Love and War uptate, all the weapon models where converted from the old V_model/W_model system to the C_model system we currently use, unfortunately a lot of weapons, moslty stock, suffered from a lot of visual downgrades that have yet been adressed.

This is the Revolver's currently used vmt file:

"$baseTexture" "models/weapons/c_models/c_revolver/c_revolver" "$phongexponenttexture" "models/weapons/c_models/c_revolver/c_revolver_exp"

"$phong" "1"
//commented out to use the exponent mask
//"$phongexponent" "255"
"$phongboost" "2"   
"$phongalbedotint" "1"

//scales up the exponent texture which usually only has about 120 levels of exponent
"$phongexponentfactor"  "90"
//"$phongalbedotint" "0"

"$lightwarptexture" "models/lightwarps/softened_weapon_lightwarp"

"$phongfresnelranges"   "[.3 .5 3]"
"$halflambert" "1"
"$glowcolor" "1"

"$envmap" "env_cubemap"
"$envmaptint" "[.075 .075 .075]"

"$tempvar" "0"

//commented out to use the exponent mask
//"$basephongexponent" "15"
//"$basephongboost" "3"

"$basemapalphaphongmask" "1"

"$rimlight" "1"                     
"$rimlightexponent" "1"             
"$rimlightboost" "1.5"
"$rimmask" "1"

This is all but an incoherent mess of randomised parameters, some being uneeded, while others where mistakenly changed and modified (It's using the wrong lightwarp for instance)

So, how do we fix this you may ask? first, we gotta talk about the location of that vmt file: "materials/models/weapons/c_models" and why that mathers:

All stock weapons's files, plus a few unlockables lile the Jumpers, ambassador, and some festive and australium variants.

However, there's an other folder: "materials/models/weapons/c_items"

What does that folder contains? literally all weapons's vmt files converted to c_model, including copies of all the prementioned weapons currently located at "materials/models/weapons/c_models" (exept Stock pistol, shotgun, grenade launcher, jumpers and all Sticky bomb variants"

As it turns out, the vmt copies inside the "materials/models/weapons/c_items" folder haven't recieved any visual downgrade at all, and still uses the parameters of theirs pre-Love and war counterparts.

Here's the untouched vmt parametters for the revolver texture located in "materials/models/weapons/c_items"

"$phong" "1" "$phongexponent" "25" "$phongboost" "10"
"$lightwarptexture" "models\lightwarps\weapon_lightwarp" "$phongfresnelranges" "[1.5 .5 3]" "$halflambert" "1"

"$basemapalphaphongmask" "1"

"$rimlight" "1"                     
"$rimlightexponent" "20"                
"$rimlightboost" ".25"

"360?$color2" "[ 0.5 0.5 0.5 ]"

"$glowcolor" "1"

Applying theses to the currently used texture, and there's the result, a cool looking revolver that dosn't look like a cheap plastic nerf gun, it's also worth noting that the Festive revolver uses thoses parameters already, and the Australium variants too are using theirs pre-love and war paramters! Wich means it would only be logical to re-introduce them for consistancy sake, or even improved upon, as they lack an exponent textures (Thanks to Wosheereal for pointing that out)

ctf_2fort0000

So... I have two questions requarding all this:

  1. Why aren't the vmt files located inside "materials/models/weapons/c_items" used instead of the currently ducked up ones? They look so much better!
  2. With theses textures being there since god knows how long, then what's the point of the "materials/models/weapons/c_models" folder in the first place? it's useless!
condor00fr commented 11 months ago

Note: the"materials/models/weapons/c_items" folder dosn't have any of the "degradation" skins you can choose when applying war paints "Factory new, field tested... ect) now of course we can always move them into the afordmentioned folder in case it is decided to remove the materials/models/weapons/c_models" folder altogether.

Wosheereal commented 11 months ago

It's because those c_item versions are unused and are the older ones compared to the ones in c_models.

Those c_item versions were from love and war when c_model stock weapons were just hacked versions of w_models.

Wosheereal commented 11 months ago

These vmts also remove the exponent textures of said stock weapons. There is a way to keep the exponent texture of the weapons while improving the materials. I was going to send a git issue and a email on how to improve them and replicate them in-game so they could be added in the next or future update.