Exporting VTF Gives error

Started by rainman400, August 26, 2012, 03:51:17 AM

Previous topic - Next topic

rainman400

SO, I have looked through the Forums and found a couple of guys having similar problems to mine, but just not the same one. I went ahead and tried the troubleshooting, and things have gotten better. For now, I am stuck with this error.

Also, when I place the .tga files into that folder, they disappear leaving behind batch files.

Any ideas? I am pretty positive that the paths are correct... and that Steam is running

wallworm

I'm not sure about this one. Send me your Max scene (and associated images) and I will see what might be the cause.

wallworm

#2
PS. I reread your post and had a new thought. Which version of WWMT are you using? There is a bug in versions older than WWMT 1.855 where the TGA can get deleted if your working TGA directory (where you are saving TGA files to with native render funcs, etc) is the same directory as the materialsrc folders.

This bug existed for a long time because I use the convention of saving all of my TGA files into the Max Project Folder \sceneassets\images folder ... and the exporter then sends a copy of this over to the Source SDK directory. The MAXScript functions were deleting the target SDK TGA and copying the new file into that folder... but it they are both the same directory the file gets deleted and there is nothing left to copy.

It was a pretty bad bug but I never noticed it because I don't use that method and it wasn't reported to me until recently. Anyway, the TGA going missing should no longer happen regardless of where you are putting your bitmaps for your Max bitmaps if you update to the latest WW. Maybe that will help solve your problem. Let me know if the problem persists after updating to latest WW (if indeed you don't have the latest).

rainman400

Hey .... thanks for the quick reply... How do you want me to send the .max scene to you.

I have the latest version of WWMT, and it still deletes the .tga files. I am doing something wrong... for sure... just can't seem to figure out what exactly.

Thanks a ton again :D

wallworm

I have found the problem and fixed it. Please download the latest WWMT and see if your problem goes away after install and re-opening WWMT.

rainman400

Success!!!


The .VTFs were created successfully. I still have a pink and black checkered pattern when I view it on the model viewer, but that must be something simple that I am overlooking.

Thanks a ton again, sir!

wallworm

Make sure you also export the VMT which is listed above the TGA list on the exporter.

rainman400

Yup. It creates a 01_-_Default.vmt . And it is in the same folder as the VMTs too.

wallworm

Open the VMT and paste the contents here. When I exported, I got this:

"VertexLitGeneric"
{

$model "1"
$basetexture "Ravish/Nair_Medkit_Diffuse"
$envmap "env_cubemap"
$bumpmap "Ravish/Nair_Medkit_Bump"
$envmapmask "Ravish/Nair_medkit_spec"
$selfillum "1" 
$selfillumtexture "Ravish/Nair_Medkit_Illum"
$selfillummask "Ravish/Nair_Medkit_Illum"
}


It is possible that the error earlier locked the file, making it un-writable. So if the contents of the VMT are not like above, try shutting down Max and then re-exporting the VMT.

I must point out that it's best to give your material name something that makes more sense. So in the Material Editor, open you Standard Material and change the name from "01 - Default" to something like "NairMedkit".

Also, you cannot use Specular Level and Bumpmap at the same time. What you need to do is merge the Specular Level map into the alpha channel of one of the other maps (like the bump, diff, etc).

To help this process, try using Alpha Spec. Because of the way that the alpha works, you may have to invert your specular bitmap first (so white is black and vice versa).

rainman400


"VertexLitGeneric"
{

$model "1"
$basetexture "Ravish/Nair_Medkit_Diffuse"
$envmap "env_cubemap"
$bumpmap "Ravish/Nair_Medkit_Bump"
$envmapmask "Ravish/Nair_medkit_spec"
$selfillum "1" 
$selfillumtexture "Ravish/Nair_Medkit_Illum"
$selfillummask "Ravish/Nair_Medkit_Illum"
}


I think the VMT is ok, by the looks of it. I changed the name of the material as well.

I tried exporting only the diffuse map and the vmt, still ended up with the checkered pattern. I am not deleting all the files before re-exporting, do you think that is causing an issue? Or do the files get overwritten?

wallworm

Well I neglected mentioning this... if you change the material name you need to re-export the model itself (so it references the new material name).

rainman400

I did that as well. Still have the pink n black going on.

I noticed that even when I delete the model and re-export it, and then import it into the model viewer, it comes up in the same position i left it in the last time i opened it. Could it be referencing some other instance of it?


wallworm

Quote from: rainman400 on August 26, 2012, 02:26:59 PM
I did that as well. Still have the pink n black going on.

I noticed that even when I delete the model and re-export it, and then import it into the model viewer, it comes up in the same position i left it in the last time i opened it. Could it be referencing some other instance of it?

It is possible that you exported the model twice under different locations and names and the new version isn't the one you are looking at in the model viewer. (I've made that mistake before). At this point it should all be working as expected. Check all the paths and model name ...

I'm going to be gone the rest of the day so hopefully you can get to the bottom of it and fix it. I'm sure a little investigation will solve your dilemma. Share your find and I will help when I return if you cannot resolve it.

rainman400

Will do, Sir.

Thanks for everything. I really appreciate it  :D :D

rainman400

Update:

So I tried pretty much everything that I could think of.... changed up the paths ... made sure there are no instances in other folders... etc.. still a little lost... The vtf files are ok.. I opened them using VTFEdit... so I guess the only problem is that the model viewer is pointing to some other folder. Sigh... I will keep at it for a bit... probably try putting the vtfs in some other folders to see if anything magically happens

SMF spam blocked by CleanTalk