Post-VPK folders?

Started by Pocket, October 16, 2013, 04:06:47 PM

Previous topic - Next topic

Pocket

Surprised this hasn't come up yet. I guess most Wall Worm users are modders who have their own folder structures set up anyway. I'm working on a thing for TF2, and I noticed that the default folders in Wall Worm's config are all from the pre-VPK era where people used the centralized Source SDK. I've migrated all of my stuff over and removed the SDK launcher entirely, so here's what I put instead:

modelsrc: C:\Program Files (x86)\Steam\SteamApps\common\Team Fortress 2\content\modelsrc
materialsrc:C:\Program Files (x86)\Steam\SteamApps\common\Team Fortress 2\content\materialsrc
mapsrc:C:\Program Files (x86)\Steam\SteamApps\common\Team Fortress 2\content\mapsrc
Bin Dir:C:\Program Files (x86)\Steam\SteamApps\common\Team Fortress 2\bin
Game Info: C:\Program Files (x86)\Steam\SteamApps\common\Team Fortress 2\tf

FGD: C:\Program Files (x86)\Steam\SteamApps\common\Team Fortress 2\bin\tf.fgd

I also entered the model and material folders manually, and saved the settings as a preset called "Team Fortress 2" for good measure. I ran the Material Library Generator and set the material folder to C:\Program Files (x86)\Steam\SteamApps\common\Team Fortress 2\tf\materials, and it seemed to run fine. But when I run the VMF importer, it's not finding the textures; I get blocks of solid color instead. I should mention that this applies to custom textures I've installed to the materials folder manually as well as ones in the game (the ones packed into the VPK files).

Is the problem with the folder paths I entered?

wallworm

For the  Material Library Generator to work correctly, you must set it to a path where you have all the TGA/PSD files for your materials. This is because 3ds Max and Wall Worm do not understand the VTF format.

So to get the textures to output correctly, you need to batch convert the VTF files from your materials folder into TGA files with VTFEdit.

Here is my setup for CS:GO (which also applies to other mods).

I used GCFScape to export my game materials from the VPK files into this folder:

C:\Users\Shawn\Documents\Vault\Demonstration\sceneassets\images\materials_csgo\materials

So inside that folder is Brick, Nature, etc

Then I ran VTFEdit to batch convert the VTF files into TGA files in that directory (and all sub directories).

Then I set the path above as the material library generator root path.

Now the tools can generate materials in Max.

Note that I think there is bug when setting the mat gen root in the global settings... so you may need to set the path once or twice.

Hopefully that helps.


wallworm

And regarding the VMF Importer, there is one issue that I need to track down, and it pertains to the following scenario. If you import a scene and the importer doesn't find the correct materials (either paths are wrong or files are missing), the importer then just creates blank placeholder materials with the correct name--with the intent that the use will later put whatever material they want.

The problem manifests when you notice the missing materials and then change the paths or add the missing files to the paths--the materials still don't show up.

The reason this happens is that, in order to speed up the import process, all materials are skipped that where already imported/processed. So even though they were not found, they continue to be not found. This continues until you've restarted Max.

I will need to build a function for resetting that or finding a smarter solution.

Pocket

I got it working. My first attempt after I created the TGA files got me an error saying it couldn't find VMTs for some reason, so I tried another location and that one worked. Odd, but workable. Thanks.

wallworm

Did you ever figure this out?

Also, what version of Max are you using, which SMD Exporter, and what are your global WW settings referring to Legacy options in the Materials section?

For the future, I always suggest in the global WW settings using the WW SMD Exporter and turn off all legacy material options. In the future, I may no longer keep the legacy options and non-ww smd exporter settings since I don't test them anymore and they often lead to confusion.

SMF spam blocked by CleanTalk