GitXplorerGitXplorer
l

hlbsp-converter

public
28 stars
3 forks
0 issues

Commits

List of commits on branch main.
Unverified
13f58a837bb6611221d839da72ea058f91046823

Merge branch 'pseregiet-main'

llewa-j committed a year ago
Verified
0ae39bdbd1886bca6e7601d0b8907b2b9df82985

Merge branch 'main' into main

llewa-j committed a year ago
Unverified
8d743217334d1d2e8f5aaa83ab00312139871678

Fix crash in parseEntities and hlbsp_loadTextures

ppseregiet committed a year ago
Unverified
3c4514afd8caf8dd559b387f5ce8a6e310faf57d

Fix crash in parseEntities and hlbsp_loadTextures

ppseregiet committed a year ago
Unverified
3fd7be2c17667b6f01be3b1cab20ce051e32d839

Add missing headers

ppseregiet committed a year ago
Unverified
85379318f7ce2842002b1d16ab43771b0f2b7f59

vbsp: read leafs, export areas as separate meshes

llewa-j committed 2 years ago

README

The README file for this repository.

hlbsp-converter

A tool to convert bsp maps (Half-Life and other GoldSrc games) into glTF scenes.

Key features:

  • 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

Usage

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

Options

  • -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

Extras

Project also contains:

  • plugin for Blender automating lightmap materials setup.
  • Some shaders for Unity to add custom lightmaps

Dependencies (already included)

Acknowledgments

License

This project is licensed under the MIT License - see the LICENSE file for details