BSP map rendering (Phase 2) #4

Closed
opened 2026-03-16 06:58:11 +00:00 by kit · 0 comments
Owner

Render the server's current map in the web client.

Overview

  • On handshake, client knows the map name
  • Client requests the .bsp file via the asset pipeline (#3)
  • Parse BSP in browser using WASM-compiled parser
  • Render map geometry (brushes, displacements) in Three.js

BSP parsing

  • Source BSP format is well-documented and has existing C/C++ parsers
  • Candidates for WASM compilation: bspfile.h from Source SDK, or standalone parsers
  • Need to extract: vertices, faces, texture info, lightmaps
  • Displacements are important — many maps use them for terrain

Rendering

  • Convert BSP faces to Three.js BufferGeometry
  • Apply lightmap textures (baked lighting)
  • Handle skybox

Depends on

  • #3 (asset pipeline)
Render the server's current map in the web client. ### Overview - On handshake, client knows the map name - Client requests the `.bsp` file via the asset pipeline (#3) - Parse BSP in browser using WASM-compiled parser - Render map geometry (brushes, displacements) in Three.js ### BSP parsing - Source BSP format is well-documented and has existing C/C++ parsers - Candidates for WASM compilation: bspfile.h from Source SDK, or standalone parsers - Need to extract: vertices, faces, texture info, lightmaps - Displacements are important — many maps use them for terrain ### Rendering - Convert BSP faces to Three.js BufferGeometry - Apply lightmap textures (baked lighting) - Handle skybox ### Depends on - #3 (asset pipeline)
kit closed this issue 2026-03-17 01:06:15 +00:00
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#4
No description provided.