Skip to content

Releases

v2.0.0

Choose a tag to compare

@REDxEYE REDxEYE released this 14 Nov 14:15

studiomdl_v2 — Release Notes

A cross-platform (Linux, Windows) 64-bit port of Valve's Source Filmmaker studiomdl, plus dmxconvert.

New features

  • .mpp compile (DMX model description): pass an .mpp instead of a QC; Valve's mdlcompile loaders are restored.
    Binary and keyvalues2 both load. The format is documented in MPP_FORMAT.md.
  • Flex optimization (-flexopt auto|on|off, -flexopt_min_static N, QC $flexoptimize): moves faces no flex touches
    into separate static meshes, keeping models under the engine's 65,535-vertex flex cache limit. Without it, flexes move
    vertices of other meshes. Prints a budget check and before/after statistics.
  • Weight fitting (-fitweights, experimental): reduces each vertex to the maximum number of bone influences with a
    least-squares fit over sample poses, instead of dropping the smallest weights.
  • UTF-8 paths everywhere: non-ASCII (e.g. Cyrillic) QC, source and output paths work on Windows and Linux.
  • Rig constraints in DMX: point, orient, aim, parent and twist constraints, including targets under DmeRig/DmeRigHandle.
  • No external DLLs: a single static executable, with no Steam or game binaries required.

Raised limits

  • Flex controllers: 128 (MAXSTUDIOFLEXCTRL)
  • Materials/skins: 128 (MAXSTUDIOSKINS, was 32)
  • Flexed vertices per model: 65,534 (MAXSTUDIOFLEXVERTS)

Fixes vs SFM's studiomdl.exe

  • Model splitting (vertex clamp): no crash for materials other than index 0; faces keep their material; flex
    controllers and rules are no longer duplicated per piece; flex keys that move nothing in a piece are culled.
    Pieces are named <model>_clamped<N>.
  • Hitboxes: the last hitbox is no longer written into every slot; auto-generated hitboxes have no garbage orientation.
  • VTA flexfile was ignored; DMX animations overflowed the heap (missing root bone slot); -t texture replacement
    read out of bounds; $collisionprecision had no effect; DMX $eyelid didn't find its model.
  • .mpp fixes: mdlPath prefix handling, castTextureShadows, noForcedFade spelling, missing motionControl no longer crashes.
  • Output is deterministic (no runtime pointers or uninitialized bytes in the files). The MDL checksum is correct on 64-bit.

Performance

  • The VTX vertex-cache optimization uses meshoptimizer instead of NvTriStrip: a large model now compiles in ~1.3 s instead of ~6.5 s,
    and vertex cache efficiency is better.

Under the hood

  • Physics ($collisionmodel/$collisionjoints) via a slim built-in vphys_lite.
  • Messages use std::format; one structured global state; std containers instead of fixed C arrays; scoped enums for studio flags.
  • Removed: threading, Xbox/PS3 code, Perforce, material system, rendering, the MDL/data cache, the Dme undo system,
    and SFM-only Dme classes (animation sets, film clips, tracks, cameras, game models, and others). DMX files containing
    removed types still load.

Known issues

  • Old-style VTA flexes are not carried into split pieces.