Talk:VMF to SMD

From Valve Developer Community
Jump to: navigation, search

Excellent idea, but it doesn't work in practice yet. I get this error:

Could not find material C:\Program Files (x86)\Steam\steamapps\SourceMods\Jailbreak\METAL\METALCOMBINE001.vmt

metalcombine001 is:

  1. A material that exists in the hl2 folder
  2. A material that exists in a GCF

Unless the error is wrong, the only way to get around it is to dump the entire material library of HL2 into my jailbreak mod folder!

Why do you look for the material files, anyway? The only data that makes it into the SMD is their name, and you already have that.

--TomEdwards 13:30, 26 September 2010 (UTC)


In the latest version, 1.1.0, I have made the reading of textures optional. It does say in the ReadMe.txt that the materials are required for the .VMF solid to have the textures aligned properly. Only the dimensions of the images are required for this purpose (required in the calculations).
Unfortunately, for this to work, you do indeed need to dump all the textures required by the model in to a parent folder (with a respective folder tree containing the materials). This is so that the files can be actually read (the dimensions are in the binary header of the file). I considered using the GCF decompiler DLL, but that would have required intrinsic work with something which will make the program much, MUCH bigger and rather much slower. There is also no possibility in the GCF decompiler to pass compressed file information without decompiling and outputting the files first...
So, unfortunately, this is the way it is until someone comes to me with a GCF reader which can pass compressed file data to this program.
BUT, you can still convert, just deselect the 'convert texture info' option.
--UltimateSniper 12:14, 4 November 2011 (PDT)