A tool to convert bsp maps (Half-Life and other GoldSrc games) into glTF scenes.
- Export embedded texture, and optionally from wads
- Lightmaps!
- Option to exclude sky polygons
- BSP31 support (Xash3D)
- Basic VBSP support (Source Engine)
- Extract all textures from wad as pngs
To export map
./bsp-converter <path/to/map.bsp> [options]
or
./bsp-converter <map-name> -game <path/to/game/dir/> [options]
To extract textures from wad
./bsp-converter path/to/file.bsp
To convert vtf texture to png
./bsp-converter path/to/file.vtf
-lm <number>
- set a maximum lightmap atlas size (default 2048). Actual size is calculated based on surfaces and can be smaller.-skip_sky
- exclude polygons with 'sky' texture from export-lstyle <number>|all|merge
- export lightmap with a specified lightstyle index or all lightyles, or merge into one.-uint16
- sets index buffer type to usigned short. Useful for old mobile GPU without GL_OES_element_index_uint. Will split models into smaller meshes if required.-tex
- export all textures, including loaded from wads.-game <path>
- directory containing "maps" dir and .wad files-v
- verbose log
Project also contains:
- plugin for Blender automating lightmap materials setup.
- Some shaders for Unity to add custom lightmaps
- nlohmann/json
- stb_image_write
- richgel999/bc7enc_rdo for BC1,BC3 decoding
This project is licensed under the MIT License - see the LICENSE file for details