Skip to main content

Overview

Model displays render 3D models from World of Warcraft, including creatures, items, characters, and spell effects. They can show static models or track specific units.
Models are more resource-intensive than other display types. Use sparingly for best performance.

Basic Configuration

{
  regionType = "model",
  model_path = "Creature/Arthaslichking/arthaslichking.m2",
  modelIsUnit = false,
  width = 200,
  height = 200,
  
  model_x = 0,
  model_y = 0,
  model_z = 0,
  rotation = 0,
  scale = 1
}

Model Sources

{
  modelIsUnit = false,
  model_path = "Creature/Arthaslichking/arthaslichking.m2"
}
Direct path to M2 model file.

Position and Camera

Model Position

{
  model_x = 0,   -- Left/Right offset
  model_y = 0,   -- Forward/Back offset  
  model_z = 0    // Up/Down offset
}
Positive X moves right, positive Y moves forward, positive Z moves up.

Rotation

{
  rotation = 90  -- Degrees (0-360)
}

Scale

{
  scale = 1.5  -- 150% size
}

Dimensions

{
  width = 200,
  height = 200
}
Model dimensions define the viewport size, not the model size. Use scale to resize the model itself.

Animation

Animation Sequence

{
  sequence = 1,    -- Animation ID
  advance = true   // Advance animation automatically
}
Not all models have animation sequences. Invalid sequence IDs may cause the model to freeze.

Border and Background

{
  border = true,
  borderEdge = "Blizzard Tooltip",
  borderSize = 16,
  borderOffset = 5,
  borderInset = 11,
  borderColor = {1, 1, 1, 0.5},
  backdropColor = {0, 0, 0, 0.8},
  borderBackdrop = "Blizzard Tooltip"
}

Unit Model Tracking

When modelIsUnit = true, the model automatically updates:
{
  modelIsUnit = true,
  model_path = "target",  -- Track target's model
  
  // Auto-updates on:
  // - UNIT_MODEL_CHANGED
  // - PLAYER_TARGET_CHANGED (for target)
  // - PLAYER_FOCUS_CHANGED (for focus)
}

Player

model_path = "player"

Target

model_path = "target"

Focus

model_path = "focus"

Common Model Paths

Creatures

"Creature/Arthaslichking/arthaslichking.m2"
"Creature/Illidan/Illidan.m2"
"Creature/Lordofoutland/Lordofoutland.m2"
"Creature/Dragon/BlackDragon.m2"

Characters

-- Use unit models instead:
modelIsUnit = true
model_path = "player"

Spells and Effects

"Spells/Generic_Holy_Precast_Base.m2"
"Spells/Shadow_Missile.m2"
"Spells/Genericglow_High.m2"

Common Patterns

Player Model Display

{
  regionType = "model",
  modelIsUnit = true,
  model_path = "player",
  width = 150,
  height = 300,
  
  model_x = 0,
  model_y = 0,
  model_z = 0,
  rotation = 180,  // Face forward
  scale = 1.0
}

Target Portrait

{
  regionType = "model",
  modelIsUnit = true,
  model_path = "target",
  width = 100,
  height = 100,
  
  model_x = 0,
  model_y = 0,
  model_z = -0.5,  // Zoom to face
  rotation = 0,
  scale = 2.0,  // Closer view
  
  border = true,
  borderEdge = "Blizzard Tooltip"
}

Boss Model Display

{
  regionType = "model",
  modelIsUnit = true,
  model_path = "boss1",
  width = 200,
  height = 300,
  
  model_x = 0,
  model_y = 1,  // Pull back
  model_z = 0,
  rotation = 180,
  scale = 1.0
}

Static Decoration

{
  regionType = "model",
  modelIsUnit = false,
  model_path = "Creature/Dragon/BlackDragon.m2",
  width = 300,
  height = 300,
  
  model_x = 0,
  model_y = 2,  // Distant view
  model_z = 0,
  rotation = 45,
  scale = 0.8,
  
  sequence = 0,  // Idle animation
  advance = true
}

Advanced Techniques

Dynamic Model Selection

Use conditions to change models:
{
  conditions = {
    {
      check = {
        trigger = 1,
        variable = "value",
        op = ">",
        value = 50
      },
      changes = {{
        property = "model_path",
        value = "Creature/Illidan/Illidan.m2"
      }}
    }
  }
}

Camera Animation

Animate model position via animations:
{
  animation = {
    main = {
      type = "custom",
      use_rotate = true,
      rotate = 360,
      duration = 10  // Full rotation in 10s
    }
  }
}

Custom Positioning Function

-- Custom code action
local model = region.model
if model then
  model:SetPosition(0.5, 0, -1)
  model:SetFacing(math.rad(45))
end

Model Loading

Models use an object pool for efficiency:
-- Internal: Models acquired from pool on show
local model = AcquireModel(region, data)

-- Released back to pool on hide
ReleaseModel(model)
Models are automatically managed. They’re created when the display shows and recycled when hidden.

Properties Reference

Modifiable via Conditions

PropertyTypeDescription
widthnumberViewport width
heightnumberViewport height
Model positioning (model_x, model_y, model_z, rotation, scale) cannot be modified via conditions. Use custom code actions instead.

Performance Considerations

Complex models (high polygon count) impact performance. Limit number of visible models.
Animated models (advance=true) require more processing. Use only when needed.
Unit models update on events. Many unit-tracked models may cause lag in raids.
Models are hidden when display hides, stopping updates. World map and cinematics also hide all models.

Troubleshooting

  • Verify model path is correct (case-sensitive)
  • Check modelIsUnit matches your model source
  • Ensure width/height are set
  • Check if model file exists in game
  • Models hidden during world map/cinematics
  • Adjust scale value
  • Modify model_y to move closer/farther
  • Change viewport width/height
  • Adjust rotation value
  • Try rotation = 180 to face forward
  • Check model’s natural facing
  • Verify modelIsUnit = true
  • Check unit exists (target, focus, etc.)
  • Unit model events may have delay

Best Practices

Finding Model Paths

Model paths can be found in:
  • WoW Model Viewer tools
  • ListFile.txt from WoW client
  • Model path databases online
  • In-game experimentation
Many creature models are in Creature/[CreatureName]/[CreatureName].m2 format.

Icon Display

Lighter alternative for portraits

Animations

Animate model displays

Custom Code

Advanced model manipulation

Build docs developers (and LLMs) love