Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/icewind1991/vbsp
Rust parser for valve bsp files
https://github.com/icewind1991/vbsp
Last synced: about 2 months ago
JSON representation
Rust parser for valve bsp files
- Host: GitHub
- URL: https://github.com/icewind1991/vbsp
- Owner: icewind1991
- License: mit
- Created: 2020-06-26T17:51:28.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-02-14T14:42:56.000Z (10 months ago)
- Last Synced: 2024-04-14T14:44:52.807Z (8 months ago)
- Language: Rust
- Size: 21.4 MB
- Stars: 9
- Watchers: 3
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-tf2-devs - icewind1991/vbsp - rust - parser for `bsp` files (Table of contents / Format parsers)
README
# 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
```rust
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](https://github.com/icewind1991/vbsp-to-gltf) or [vbspviewer](https://github.com/icewind1991/vbspview) 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].[quake bsp parser]: https://github.com/Vurich/bsp
[source engine wiki]: https://developer.valvesoftware.com/wiki/Source_BSP_File_Format