Wall Worm Forums

Design Tools => Materials and Textures => Topic started by: KELLZ on July 02, 2016, 06:34:15 AM

Title: Texture File name woes.
Post by: KELLZ on July 02, 2016, 06:34:15 AM
Hello, I'm having issues with the filenames of some props being incorrect. It wants the filename to be ..vtf.tga which is causing issues obviously. Is there anyway to fix this issue on my end besides changing each individual file? (https://www.wallworm.net/proxy.php?request=http%3A%2F%2Fi.imgur.com%2Fv4hXchV.png&hash=f7a162b60760787582a8f32b19768242734edd61)
Title: Re: Texture File name woes.
Post by: wallworm on July 02, 2016, 07:59:15 AM
I've seen that bug in the past and was able to eliminate it from WW for any of the testing that I've done.

Can you post:
Title: Re: Texture File name woes.
Post by: KELLZ on July 02, 2016, 09:36:50 AM
1. "$CDMaterials "models\props\de_cbble\bomb_site_stat_a\"
2.
"VertexLitGeneric"
{
"$basetexture" "models\props\de_cbble\bomb_site_stat_a\bomb_site_stat_a.vtf"
"$phongexponent" 20
"$phongalbedotint" "1"
"$phongtint" "[.1 .15 .1]"
"$phongdisablehalflambert" "1"
"$phongexponenttexture" "models\props\de_cbble\bomb_site_stat_a\bomb_site_stat_a_exp.vtf"
"$phong" "1"
"$phongboost" "25"
"$phongfresnelranges" "[.8 0.5 1]"
"$bumpmap" "models\props\de_cbble\bomb_site_stat_a\bomb_site_stat_a_normal"

"$basemapalphaphongmask" "1"
"$detail" "detail\noise_detail_01"
"$detailscale" "[ 6 6 ]"
"$detailblendfactor" "0.5"

"$envmap" "env_cubemap"

"$envmapfresnel" ".2"
//"$baseAlphaEnvMapMaskMinMaxExp" "[1 1 3]"
"$envmaptint" "[.2 .2 .2]"

3. (https://www.wallworm.net/proxy.php?request=http%3A%2F%2Fi.imgur.com%2FdieL328.png&hash=0b42b3bd01a1ec9621de1f0b89962f878712b60f)
I've used a different prop for this example as there are many, hope this is enough to help.
Title: Re: Texture File name woes.
Post by: wallworm on July 02, 2016, 09:47:48 AM
OK, I see the problem.

The parser doesn't strip any data from the texture names and presumes that no file extension is used in texture paths. In this case the VMT should have these fields changed to:

"$basetexture" "models\props\de_cbble\bomb_site_stat_a\bomb_site_stat_a"

"$phongexponenttexture" "models\props\de_cbble\bomb_site_stat_a\bomb_site_stat_a_exp"

Notice, the lack of a ".vtf" extension.

Standard VMT files do not contain any file extensions.

From there WW will take the values and look for files in this order:

models\props\de_cbble\bomb_site_stat_a\bomb_site_stat_a.vtf
models\props\de_cbble\bomb_site_stat_a\bomb_site_stat_a.tga
models\props\de_cbble\bomb_site_stat_a\bomb_site_stat_a.psd

And it will look for these files in the:

* Mat Library subfolders
* SDK Content Materialsrc subfolders
* Game Materials subfolders
* Additional Path Materials subfolders
Title: Re: Texture File name woes.
Post by: KELLZ on July 02, 2016, 10:27:46 AM
I'm unsure if I'm tackling this incorrectly, but all I have to do is edit the VMT and delete the extensions and I should be fine, correct?
Title: Re: Texture File name woes.
Post by: wallworm on July 02, 2016, 10:31:25 AM
Yes.

But remember that if WW cannot find the TGA in the paths it looks, it will still be missing. So in this case:

[LOOKUPROOTS]\models\props\de_cbble\bomb_site_stat_a\bomb_site_stat_a.tga

Where [LOOKUPROOTS] = one of the paths listed above.

If Using WW Pro, it will also derive the VTF files from one of those paths.
Title: Re: Texture File name woes.
Post by: KELLZ on July 02, 2016, 11:05:08 AM
I've got a texture! Thanks for the help, now to automate this somehow for the 50 or so missing textures.
Title: Re: Texture File name woes.
Post by: KELLZ on July 02, 2016, 11:55:36 AM
I've got it working and all is well now, once again I appreciate the help.

For the future if anyone else has this same issue and is wondering how to batch edit their VMT's, here's how. In Notepad++ there is a drop down menu called "Search" and in that menu we want to use the function "Find in Files". In the "Find what:" we want to search for ".vtf" and in the "Replace with:"  we want to leave it blank. for the "Filters:" we want to change it to "*.vmt*. That way we're only editing files that have the extension ".vmt". Choose your directory where your vmts are located and click the "Replace in Files" button and that should work. If that doesn't work make sure the checkbox that reads "In all sub-folders" is checked. Hope this helps people.