1
0
Fork 0
mirror of https://codeberg.org/icewind/vbsp.git synced 2026-06-03 10:44:07 +02:00
No description
  • Rust 99.1%
  • Nix 0.9%
Find a file
Robin Appelman 94614153b8
Merge pull request #22 from krakow10/prop-angles
Change StaticPropLump & Angles Fields Visibility to Public
2025-03-02 19:01:24 +01:00
.github/workflows update workflow 2025-02-15 17:02:38 +01:00
benches clippy fixes 2025-02-15 17:02:38 +01:00
common change StaticPropLump angles field visibility to pub 2025-03-02 18:33:39 +01:00
examples prepare for release 2025-03-02 15:15:47 +01:00
fuzz flake update 2023-12-09 16:31:34 +01:00
src Merge pull request #22 from krakow10/prop-angles 2025-03-02 19:01:24 +01:00
.envrc add flake 2022-12-05 16:51:22 +01:00
.gitignore entity utf8 fixes? 2023-12-27 20:12:26 +01:00
Cargo.lock split off common types into a separate crate for easier semver management 2025-03-02 18:25:36 +01:00
Cargo.toml split off common types into a separate crate for easier semver management 2025-03-02 18:25:36 +01:00
flake.lock prepare for release 2025-03-02 15:15:47 +01:00
flake.nix formatting 2025-02-15 17:02:38 +01:00
koth_bagel_rc2a.bsp valve bsp wip 2020-06-25 00:25:48 +02:00
LICENSE update readme 2020-06-26 19:50:06 +02:00
README.md update readme 2025-03-02 16:40:08 +01:00
test.bsp Improve speed, add lightmaps and light volumes, allow parsing entity section 2019-04-09 16:50:48 +02:00

VBSP

Rust parser for valve bsp files.

Currently supports bsp files from Counter Strike Source and Team Fortress 2, other source games using bsp version 19 or 20 might also work. Adding other sourcemod variants should be fairly straight forward and pull requests for them are welcome.

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.