Asset rendering: models, NPCs, players, weapons, ragdolls, animations, materials #5

Open
opened 2026-03-16 06:58:11 +00:00 by kit · 1 comment
Owner

Render actual Source engine assets in the web client instead of placeholder boxes.

Scope (expanded from original MDL-only scope)

This covers the full rendering pipeline for all entity types:

  1. Static props — MDL geometry + VTF textures
  2. Players / NPCs — Playermodels with idle/walk animations
  3. Weapons — Viewmodel/worldmodel rendering
  4. Ragdolls — Server streams bone transforms, client poses skeleton
  5. Animated models — Sequence playback (idle, walk cycles, gestures)
  6. Materials — VMT parsing, VTF texture decoding (DXT → WebGL)

MDL pipeline

  • .mdl — model header, bone structure, sequences, materials
  • .vtx — optimized mesh strips/indices
  • .vvd — vertex data (positions, normals, UVs, bone weights)
  • .vtf — textures (DXT compressed, need to decode for WebGL)
  • .vmt — material definitions (shader, texture references, properties)

Additional server-side streaming needed

  • Bone transforms for ragdolls (additional entity state beyond pos/ang)
  • Animation sequence index per entity
  • Skin/bodygroup selection per entity

Parsing approach

  • WASM-compiled parsers from existing C/C++ implementations, or JS-native parsers
  • Candidates: SourceIO, Crowbar, various open-source MDL parsers

Depends on

  • #4 (BSP map rendering — establishes the WASM parsing pattern)
  • #3 (asset pipeline — closed, merged)
Render actual Source engine assets in the web client instead of placeholder boxes. ### Scope (expanded from original MDL-only scope) This covers the full rendering pipeline for all entity types: 1. **Static props** — MDL geometry + VTF textures 2. **Players / NPCs** — Playermodels with idle/walk animations 3. **Weapons** — Viewmodel/worldmodel rendering 4. **Ragdolls** — Server streams bone transforms, client poses skeleton 5. **Animated models** — Sequence playback (idle, walk cycles, gestures) 6. **Materials** — VMT parsing, VTF texture decoding (DXT → WebGL) ### MDL pipeline - `.mdl` — model header, bone structure, sequences, materials - `.vtx` — optimized mesh strips/indices - `.vvd` — vertex data (positions, normals, UVs, bone weights) - `.vtf` — textures (DXT compressed, need to decode for WebGL) - `.vmt` — material definitions (shader, texture references, properties) ### Additional server-side streaming needed - Bone transforms for ragdolls (additional entity state beyond pos/ang) - Animation sequence index per entity - Skin/bodygroup selection per entity ### Parsing approach - WASM-compiled parsers from existing C/C++ implementations, or JS-native parsers - Candidates: SourceIO, Crowbar, various open-source MDL parsers ### Depends on - #4 (BSP map rendering — establishes the WASM parsing pattern) - #3 (asset pipeline — closed, merged)
kit changed title from MDL model rendering (Phase 3) to Asset rendering: models, NPCs, players, weapons, ragdolls, animations, materials 2026-03-16 08:39:09 +00:00
Author
Owner

Basic MDL geometry rendering is working (positions, normals, UVs, VTF textures). Remaining scope has been split into focused issues:

  • #9 — Layered animation system (sequences, bone transforms)
  • #11 — Material overrides and entity color/alpha (rendercolor, renderamt)
  • #15 — Bodygroups and skins

This issue can serve as the umbrella tracker. The MDL parsing pipeline, VTX/VVD loading, and VTF decoding are done. What remains is the higher-level rendering features above, plus ragdoll streaming and weapon rendering mentioned in the original scope.

Basic MDL geometry rendering is working (positions, normals, UVs, VTF textures). Remaining scope has been split into focused issues: - #9 — Layered animation system (sequences, bone transforms) - #11 — Material overrides and entity color/alpha (`rendercolor`, `renderamt`) - #15 — Bodygroups and skins This issue can serve as the umbrella tracker. The MDL parsing pipeline, VTX/VVD loading, and VTF decoding are done. What remains is the higher-level rendering features above, plus ragdoll streaming and weapon rendering mentioned in the original scope.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
kit/gmod-web-stream#5
No description provided.