How To

From Valve Developer Community
Jump to navigation Jump to search
English (en)Translate (Translate)

How to accomplish basic editing tasks with .vmdl assets using Model Editor Model Editor.

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:

  1. Launch Model Editor if it is not already open.
  2. From the File menu, select New VMDL From Mesh File.
  3. Browse to a mesh file.
  4. 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.
  5. To add collision geometry go to the main menu bar and select Model > Collision > Add Physics Mesh.
  6. Browse to a collision mesh.
  7. View the collision mesh via the Display > Collision Geo menu item.

File > New

To create a model by first creating an empty model file:

  1. Launch Model Editor if it is not already open.
  2. From the File menu, select New.
  3. Name the new file, and save it in the current game's content folder.
  4. You should see an empty session of Model Editor.
  5. Add a mesh by going to the main menu and selecting Model > Mesh > Add Mesh.
  6. Browse to a mesh file.
  7. 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.
Note.pngNote:Every animation compiles into a sequence, so the list of sequences show in this tool represents all the animations on a compiled model.
  • 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

  1. From the main menu bar go to Model->Mesh->Add Mesh
  2. To edit the mesh properties select the mesh item under the "Mesh List" item in the Outliner
  3. Edit the properties in the Property Editor
  4. Save to see the changes

Add Collision

  1. From the main menu bar go to Model->Collision Add Physics Mesh
  2. To see the collision mesh in the viewport check Display->"Collision Geo"
  3. To edit the mesh properties select the physics mesh item under the "Physics Mesh List" item in the Outliner
  4. Edit the properties in the Property Editor
  5. Save to see the changes

Add Hitboxes

There are multiple ways to add hitboxes to a model.

Individually:

  1. From the main menu bar Model->Hitboxes->Add Hitbox
  2. Give the hitbox a name and press OK.
  3. Select the parent joint and press OK.

Autopopulate:

  1. From the main menu bar Model->Hitboxes->Autopopulate Hitboxes
  2. 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:

  1. From the main menu bar, select Model->Hitboxes->Add Hitbox Set List to create an empty hitbox set list
  2. Select the item in the Outliner, hit the "+" button in the Property Editor to create a new hitbox set
  3. Hit the "+" next to "Hitboxes" to add a hitbox

Editing Hitboxes

  1. From the main menu select Display->Hitboxes to show the hitboxes
  2. 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

Add an Attachment

There are multiple ways to add attachments to a model.

Individually:

  1. From the main menu, bar select Model->Attachments->Add Attachments
  2. Give the attachment a name and press OK.
  3. Select the parent joint and press OK.

By attachment list:

  1. From the main menu bar select Model->Attachments->Add Attachment List to create an empty attachment list.
  2. Select the attachment list item in the Outliner
  3. Hit the "+" button in the Property Editor next to Attachments to add an attachment

Editing Attachments

  1. From the main menu select Display->Attachment to show attachments in the viewport
  2. 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
Note.pngNote:The values are stored relative to the influence object.

Add an Animation

  1. To add an animation to a model, go to the main menu Animation->Add Animation
  2. 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
  3. Browse to and select the animation files ( multiple files can be selected at once )
  4. The new animations will appear in the Outliner, under their associated group

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

  1. Add a material group list with Model->Add Material Group List
  2. From the main menu select Tools->Edit Material Groups
  3. Click Add to add a new group
  4. Right-click on the new group and select "Rename" to rename it
  5. Right- click on a material and select "Browse To Material"
  6. Select the material to associate with this group
  7. Save the session ( File->Save )
  8. Click on the new group to switch it in the viewport
Note.pngNote:do not edit the default group.

Add Level Of Detail Meshes

  1. From the main menu bar select Model->Mesh->Add LOD groups
  2. From the "LOD group List" Outliner item, right click and select "Add LOD Group"
    Note.pngNote:Another way is to select the item, then click the "+" next to "LOD Groups" in the Property Editor
    Tip.pngTip:Make sure meshes have been added for the LOD groups to use.
  3. Select the LOD item ( found under "LOD Group List" in the Outliner )
  4. Edit the properties in the Property Editor
    • Set a switch distance
    • Add meshed to the group by hitting the "+" next to "Mesh List"
    Tip.pngTip:Make sure the first LOD group is set to a switch distance of 0.

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

  1. To add a mesh group go to Model->Mesh->Add Mesh Group
  2. Select the "Mesh Groups" item in the Outliner
  3. To add a new mesh group select the Mesh Groups "+" icon in the Property Editor.
  4. 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
Note.pngNote:This does not affect in game visibility.
Tip.pngTip:Unlike Source, the Dota Workshop Tools can have collision meshes included in mesh groups.