Difference between revisions of "VMF to SMD"

From Valve Developer Community
Jump to: navigation, search
m (Added Screenshot)
(V2 Release)
Line 6: Line 6:
 
|-
 
|-
 
!style="border-style: solid; border-width: 1px; background-color: #555" align="left"|Size
 
!style="border-style: solid; border-width: 1px; background-color: #555" align="left"|Size
!style="border-style: solid; border-width: 1px" align="left"| 26.0 KiB
+
!style="border-style: solid; border-width: 1px" align="left"| 159 KiB
 
|-
 
|-
 
!style="border-style: solid; border-width: 1px; background-color: #555" align="left"|Date
 
!style="border-style: solid; border-width: 1px; background-color: #555" align="left"|Date
!style="border-style: solid; border-width: 1px" align="left"| 31 Aug 2011
+
!style="border-style: solid; border-width: 1px" align="left"| 10 Apr 2013
 
|-
 
|-
 
!style="border-style: solid; border-width: 1px; background-color: #555" align="left"|Current Version
 
!style="border-style: solid; border-width: 1px; background-color: #555" align="left"|Current Version
!style="border-style: solid; border-width: 1px" align="left"| 1.1.0
+
!style="border-style: solid; border-width: 1px" align="left"| 2.0.0
 
|-
 
|-
 
!style="border-style: solid; border-width: 1px; background-color: #555" align="left"|Prerequisites
 
!style="border-style: solid; border-width: 1px; background-color: #555" align="left"|Prerequisites
Line 24: Line 24:
 
|}
 
|}
  
'''VMF to SMD''' is a rather simple program, which can convert [[VMF|Valve Map File]]s to reference [[Studio Model Data]] files, for use with Valve's [[Studiomdl|Studio Model Compiler]].
+
'''VMF to SMD''' (V2) is a rather simple program, which can convert [[VMF|Valve Map File]]s or [[MAP_file_format|Generic Map]]s to reference [[Studio Model Data]] files, for use with Valve's [[Studiomdl|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. However, anyone who has use for this application should by all means use it.
+
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 ==
 
== Features ==
 
{|style="vertical-align:top;" align="right"
 
{|style="vertical-align:top;" align="right"
| [[File:VMFtoSMDV1_1.png]]
+
| [[File:VMFtoSMDV2.png]]
 
|}
 
|}
  
* '''Choose unwanted textures''' — Choose the textures you wish the converter to disregard, meaning that all faces with that texture will not be converted to triangles.
+
* '''Support for Generic Map files''' — Supports the [[MAP_file_format|Generic Map]] format (used mainly in [[Goldsource]] map editors). Note that options will change depending on which file-type is opened.
  
* '''Support for Generic Map files''' — Supports the [[MAP_file_format|Generic Map]] format (used mainly in [[Goldsource]] map editors).
+
* '''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.
  
* '''Material folder selection''' — Select the materials folder to read the .[[VMT]] materials from. This is required if converting texture info, because the dimensions of the textures used are required for converting between the two types (UV vectors & shifts to UV vertex coordinates).
+
* '''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 ([[VMF_documentation#U.2FV_Axis|UV vectors & shifts]] to [[UV_map|UV coordinates]]).
  
New in 1.1.0:
+
:* '''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 [[MAP_file_format|MAP]]s), or in compressed [[VPK]] or [[GCF]] files (or [[WAD]] files for [[MAP_file_format|MAP]]s).
* '''Convert texture info''' — Choose whether or not to convert the texture application information. If selected, it is necessary that you choose a Map Material Folder, which contains all the materials not selected in the list above it.
 
  
* '''Calc Error''' — Change this only if any errors say to do so, you may also change this if you repeatedly get an error not related to textures during conversion. In the event of errors, please increase 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 errors in the calculations of vertices. If the map contains only vertices at 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.
+
:* '''Copy materials/textures''' — Copy the materials/textures found to the specified folder, with their new names (for [[VMF]]s, only .[[VMT]] files will be copied, as you can modify those to refer to the original .[[VTF]] files or create new ones).
  
{{note|'''For the conversion to work''': [[UV]] vectors in the .[[VMF]] CANNOT BE PARALLEL (the map compiler would also error if this were the case).}}
+
* '''Remove material sub-folders''' — Eliminates the sub-folders in [[VMF]] material names (as [[Studiomdl_Data#Syntax_3|valve models]] do not permit them).
{{note|'''If 'Convert texture info' is selected''': All the NON-selected materials in the material list must exist, in their specified directory, within the user-specified material folder. (If this is not the case an error will appear, which will state the file the program is looking for, so that users can put a material there.)}}
+
 
 +
:* '''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.}}
 +
{{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 ==
 
== Version History ==
 +
* '''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 .[[VMF]]s. 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.1.0''' — Fixed a lot of bugs, including errors in .[[VMT]] reading. Made dev/ textures auto-select when reading .[[VMF]]s. 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.
  

Revision as of 18:28, 10 April 2013

VMF to SMD
Author UltimateSniper
Size 159 KiB
Date 10 Apr 2013
Current Version 2.0.0
Prerequisites .NET Framework 4.0
Download

VMF to SMD (V2) is a rather simple program, which 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).
  • 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.
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.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