Source 2 Model Editor/Docs/How To

How to accomplish basic editing tasks with assets using .
== Creating a new asset ==
Some examples for how to get a model you have already created into Model Editor:
=== From a Mesh ===
To create a model using an existing mesh file as the base:
# Launch Model Editor if it is not already open.
# From the File menu, select New VMDL From Mesh File.
# Browse to a mesh file.
# A new session of model editor will appear with the mesh visible in the viewport.
#* The name of the VMDL is generated from the browsed to mesh file. For example a mesh called "test.fbx" will make a model named "test.vmdl". If the mesh has a "_mesh" suffix, that will be stripped off the VMDL name.
#* The VMDL file is created in the directory as the incoming mesh unless the mesh is in a directory named "dmx" or "fbx". If that is the case, the file will be saved one directory up. For example, a mesh saved in models/test/fbx/test.fbx will make a VMDL in models/test/test.vmdl.
# To add collision geometry go to the main menu bar and select Model > Collision > Add Physics Mesh.
# Browse to a collision mesh.
# View the collision mesh via the Display > Collision Geo menu item.
=== File > New ===
To create a model by first creating an empty model file:
# Launch Model Editor if it is not already open.
# From the File menu, select New.
# Name the new file, and save it in the current game's content folder.
# You should see an empty session of Model Editor.
# Add a mesh by going to the main menu and selecting Model > Mesh > Add Mesh. 
# Browse to a mesh file.
# The mesh will now be visible in the viewport.
== View Animations ==
If animations have been added to the model:
* Go to Tools->View Sequences to bring up the sequence select and playback interface.
* Open the animation group item in the Outliner, and select on an animation item to play the animation in the viewport.
== View Items on a DOTA Hero ==
* From the main menu bar, select Tools->Load Stock Hero Items
== Add a Mesh ==
# From the main menu bar go to Model->Mesh->Add Mesh
# To edit the mesh properties select the mesh item under the "Mesh List" item in the Outliner
# Edit the properties in the Property Editor
# Save to see the changes
* For attribute reference, see VMDL/Mesh.
== Add Collision ==
# From the main menu bar go to Model->Collision Add Physics Mesh
# To see the collision mesh in the viewport check Display->"Collision Geo"
# To edit the mesh properties select the physics mesh item under the "Physics Mesh List" item in the Outliner
# Edit the properties in the Property Editor
# Save to see the changes
* For attribute reference, see VMDL/PhysicsMesh.
== Add Hitboxes ==
There are multiple ways to add hitboxes to a model.
Individually:
# From the main menu bar Model->Hitboxes->Add Hitbox
# Give the hitbox a name and press OK.
# Select the parent joint and press OK.
Autopopulate:
# From the main menu bar Model->Hitboxes->Autopopulate Hitboxes
# Select/deselect the joints that need hitboxes, and hit the "Auto Populate" button
#* The size of the hitbox will be initially based off the bounding box of all vertices skinned to the parent joint
Hitbox set list:
# From the main menu bar, select Model->Hitboxes->Add Hitbox Set List to create an empty hitbox set list
# Select the item in the Outliner, hit the "+" button in the Property Editor to create a new hitbox set
# Hit the "+" next to "Hitboxes" to add a hitbox
=== Editing Hitboxes ===
# From the main menu select Display->Hitboxes to show the hitboxes
# To edit a hitbox, select the hitbox item in the editor or click the hitbox in the viewport
#* Use the gizmo to scale the hitbox size ( scale and box scale are available gizmo modes )
#* Or edit the values directly in the Property Editor
* For attribute reference, see VMDL/Hitboxes
== Add an Attachment ==
There are multiple ways to add attachments to a model.
Individually:
# From the main menu, bar select Model->Attachments->Add Attachments
# Give the attachment a name and press OK.
# Select the parent joint and press OK.
By attachment list:
# From the main menu bar select Model->Attachments->Add Attachment List to create an empty attachment list.
# Select the attachment list item in the Outliner
# Hit the "+" button in the Property Editor next to Attachments to add an attachment
* For attribute reference, see VMDL/Attachments.
=== Editing Attachments ===
# From the main menu select Display->Attachment to show attachments in the viewport
# To edit an attachment, select the attachment item in the editor.
#* Use the gizmo to translate and rotate the attachment 
#* Or edit the values directly in the Property Editor
== Add an Animation ==
# To add an animation to a model, go to the main menu Animation->Add Animation
# Animations are stored in Animation Groups, if the model has more than one already a UI will pop up asking which group the animations should be added to
# Browse to and select the animation files ( multiple files can be selected at once )
# The new animations will appear in the Outliner, under their associated group
* For attribute reference, see VMDL/Animation.
=== Playing and editing Animation ===
* To play an animation select the animation item in the Outliner
* Use the Timeline to control playback
* To edit the animation, select the Outliner item and edit it in the Property Editor
== Add Material Groups ==
# Add a material group list with Model->Add Material Group List
# From the main menu select Tools->Edit Material Groups
# Click Add to add a new group
# Right-click on the new group and select "Rename" to rename it
# Right- click on a material and select "Browse To Material" 
# Select the material to associate with this group
# Save the session ( File->Save )
# Click on the new group to switch it in the viewport
* For attribute reference, see VMDL/MaterialGroups.
== Add Level Of Detail Meshes ==
# From the main menu bar select Model->Mesh->Add LOD groups
# From the "LOD group List" Outliner item, right click and select "Add LOD Group"
#:
#:
# Select the LOD item ( found under "LOD Group List" in the Outliner )
# Edit the properties in the Property Editor
#:*Set a switch distance
#:*Add meshed to the group by hitting the "+" next to "Mesh List"
#:
* For attribute reference, see VMDL/LodGroup.
=== Viewing LOD Meshes ===
* To view LOD in the viewport
* From the main menu select LOD->Auto LOD 
** Now when you zoom in and out of the viewport the LOD will switch at the proper distance
* From the main menu select LOD->LOD to show that specific LOD
== Add Mesh Groups ==
# To add a mesh group go to Model->Mesh->Add Mesh Group
# Select the "Mesh Groups" item in the Outliner
# To add a new mesh group select the Mesh Groups "+" icon in the Property Editor.
# Select the mesh group item and edit the properties in the Property Editor
#:* Each Mesh group item in the Outliner has a checkbox that can be used to toggle visibility in the viewport
* For more information, see VMDL/MeshGroup.