VMF to SMD

From Valve Developer Community
Jump to: navigation, search
VMF to SMD
Author UltimateSniper
Size 160 KiB
Date 25 Nov 2013
Current Version 2.0.2
Prerequisites .NET Framework 4.0
Download

VMF to SMD (V2) is a rather simple program, which is effectively a "Map to Model" converter. It can convert Valve Map Files or Generic Maps to reference Studio Model Data files, for use with Valve's Studio Model Compiler.

This tool is aimed mainly at mappers, who want to create large-scale surrounding models for their maps. It is also aimed at modellers, who want to start off from a simple, Hammer-generated map-scale model, and carry on with the details from there. I also understand that many find map editors much easier to work with than model editors. However, anyone who has use for this application should by all means use it.

Features

VMFtoSMDV2.png
  • Support for Generic Map files — Supports the Generic Map format (used mainly in Goldsource map editors). Note that options will change depending on which file-type is opened.
  • Choose unwanted materials/textures — Choose the materials/textures you wish the converter to disregard, meaning that all faces with that material/texture will not be converted to triangles.
  • Convert material/texture alignment info — Choose whether or not to convert the material/texture alignment information. If selected, it is necessary that you choose a Materials/Textures Folder, because the dimensions of the materials/textures used are required for converting between the two types (UV vectors & shifts to UV coordinates).
  • Material/texture folder — Select the folder from which to read the materials/textures which aren't selected in the skip list. The materials/textures may be in the filesystem as separate .VMT and .VTF files (or .BMP files for MAPs), or in compressed VPK or GCF files (or WAD files for MAPs).
  • Copy materials/textures — Copy the materials/textures found to the specified folder, with their new names (for VMFs, only .VMT files will be copied, as you can modify those to refer to the original .VTF files or create new ones).
    Note:This only copies the base file(s) for the material - so materials with more than a single base .VTF referenced in the .VMT will not be fully copied.
  • Remove material sub-folders — Eliminates the sub-folders in VMF material names (as valve models do not permit them).
  • Rename materials with same names — Renames materials with the same file names, to avoid conflict when in the same folder.
  • Calc Error — In the event of non-material/texture related errors, try increasing this value. I advise a value between 0.01 and 0.00001. Lower values improve the precision of the calculations, higher values allow for larger error in the map's plane data. If the map contains only plane vertices with integer coordinates, I advise this to be set close to its maximum value for the lowest chance of error. If you still receive errors, try removing the most complicated and/or large objects from the map.
Note:To read GCF/VPK/WAD files: The supplied HLLib.dll must be in the same folder as the program. Only packages in the given folder (not subfolders) will be read.
Note:To read materials from GCF/VPK files: There must be a "materials" folder somewhere in the package, from which the materials will be read (eg. "cake/red.vmt" will be read from SOMEWHERE_IN_PACKAGE/materials/cake/red.vmt).
Note:For the conversion to work: UV vectors in the VMF CANNOT BE PARALLEL OR 0 (the map compiler would also error if this were the case).
Note:If any conversion errors are encountered: They will be put in a log file, which you will have access to at the end. Error boxes that come up after the program has started may be caused only by bad programming on my part - if any appear, please email them to me!

Version History

  • 2.0.2 — Fixed a bug where non-english systems would not correctly read floats from VMF files.
  • 2.0.1 — Fixed a bug where the program would not read material/texture files from filesystem.
  • 2.0.0 — Added options for VMF material names. Moved all basic conversion errors to a log file, with a notification & link at the end. Added support for reading materials/textures from GCF, VPK and WAD files (using HLLib v2.4.3). Improved (and compacted) GUI (+ updated icon). Streamlined material/texture alignment conversion code. General code cleanup.
  • 1.1.0 — Fixed a lot of bugs, including errors in .VMT reading. Made dev/ textures auto-select when reading .VMFs. Improved the conversion method (brush corners are now calculated, rather than assumed to be plane-defining points). Added a 'Calculation Error' field, which should help solve most errors that occur. Also, fixed some bugs in the .VMF reading.
  • 1.0.0 — Initial release.

External links