SkillAgentSearch skills...

Vbsp

Rust parser for valve bsp files

Install / Use

/learn @icewind1991/Vbsp
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Moved to https://codeberg.org/icewind/vbsp

VBSP

Rust parser for valve bsp files.

Mainly tested with Team Fortress 2 and Counter Strike Source files, other source games using bsp versions 19, 20 or 21 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.

View on GitHub
GitHub Stars13
CategoryDevelopment
Updated10mo ago
Forks9

Languages

Rust

Security Score

82/100

Audited on May 21, 2025

No findings