1 unstable release

0.1.0 Nov 11, 2023

#33 in #bsp

Download history 9/week @ 2024-02-19 25/week @ 2024-02-26 10/week @ 2024-03-04 15/week @ 2024-03-11 8/week @ 2024-03-18 10/week @ 2024-03-25 34/week @ 2024-04-01 2/week @ 2024-04-08 26/week @ 2024-04-15

73 downloads per month
Used in vbsp

MIT license

9KB
181 lines

VBSP

Rust parser for valve bsp files.

Currently only supports the tf2 version of bsp files, but adding other sourcemod variants should be fairly straight forward.

Example usage

fn main() -> Result<(), vbsp::BspError> {
    let data = std::fs::read("maps/cp_steel.bsp")?;
    let bsp = vbsp::Bsp::read(&data)?;
    println!("{:?}", bsp);

    Ok(())
}

See vbsp-to-gltf or vbspviewer for some more examples of how to use the bsp data.

TODO

  • smooth normals for displacements
  • smooth normals for faces

Credits

This project is adapted from the quake bsp parser and wouldn't be possible without information from the source engine wiki.

Dependencies

~1.5MB
~34K SLoC