Texture File name woes.

Started by KELLZ, July 02, 2016, 06:34:15 AM

Previous topic - Next topic

KELLZ

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?

wallworm

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:

  • the $cdmaterials of the QC that was imported for this
  • The line in the VMT that imported with this
  • Your global MatGen path setting

KELLZ

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.
I've used a different prop for this example as there are many, hope this is enough to help.

wallworm

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

KELLZ

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?

wallworm

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.

KELLZ

I've got a texture! Thanks for the help, now to automate this somehow for the 50 or so missing textures.

KELLZ

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.

SMF spam blocked by CleanTalk