Half-Life bsp map to gltf converter

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

Similar Resources

Wtf Riot? I just want to close League of Legends and live my life. Leave me alone. F*ck corporate adware.

RiotKiller Wtf Riot? Anyways... This application launches League of Legends by calling RiotClientServices.exe --launch-product=league_of_legends --lau

Mar 29, 2022

Sword Engine is a fork of Psych Engine that plans on adding more features and quality of life improvements.

Sword Engine is a fork of Psych Engine that plans on adding more features and quality of life improvements.

⚠️ WARNING: This README is currently incomplete, This warning will be removed once it's complete. Friday Night Funkin' - Sword Engine Sword Engine is

Jul 9, 2022

Arduino Conway's Game of Life with MAX7219 with 8x8 Dot Matrix Display

Arduino-GameOfLife Arduino Conway's Game of Life with an Arduino UNO, MAX7219 and an 8x8 Dot Matrix Display. Video - https://youtu.be/qY5oLLSfSIA Cont

Oct 13, 2021

Second life for famous JPEGView - fast and tiny viewer/editor for JPEG, BMP, PNG, WEBP, TGA, GIF and TIFF images with a minimalist GUI and base image processing.

Second life for famous JPEGView - fast and tiny viewer/editor for JPEG, BMP, PNG, WEBP, TGA, GIF and TIFF images with a minimalist GUI and base image processing.

JPEGView-Image-Viewer-and-Editor Updated Dec 07 2021. Version 1.1.1.0 has been released. Download link1, link2 added. Second life for famous JPEGView

Sep 14, 2022

Public domain, header-only file to simplify the C programmer's life in their interaction with strings

SCL_String Public domain, header-only file to simplify the C programmer's life in their interaction with strings NOTE: This library is still under con

Aug 22, 2022

A simple program to make your life a little easier when you evaluate the Rush exercises at 42.

Rush exercise number A simple program to make your life a little easier when you evaluate the Rush exercises at 42. Usage Run make to generate the exe

Feb 7, 2022

This is the source code for for the Plugin GAS Associate, that is supposed to make your life easier while using Unreal's Gameplay Ability System.

GASAssociate Description: This is the source code for for the Plugin GAS Associate, that is supposed to make your life easier while using Unreal's Gam

Sep 23, 2022

per - Simple unix permission viewer and converter

Per is a simple utility that can verbosely print unix permissions and convert between symbolic and numeric notations and vice-versa.

Feb 27, 2022

CRServoF - The CSRF serial protocol to PWM servo converter

 CRServoF - The CSRF serial protocol to PWM servo converter

CRServoF - The CSRF serial protocol to PWM servo converter I wanted to create a small project to mess around with PWM servo output for ExpressLRS, and

Sep 21, 2022
Comments
  • Make it compile on Linux

    Make it compile on Linux

    I also fixed some warnings about narrowing conversions and incorrect printf format specifiers. Hopefully I didn't break it on Windows 😅

    This is a great tool! Thanks a lot.

Custom DLLs for a really hard Half-Life Mod

Half Life 1 SDK LICENSE Half Life 1 SDK Copyright© Valve Corp. THIS DOCUMENT DESCRIBES A CONTRACT BETWEEN YOU AND VALVE CORPORATION (“Valve”). PLEASE

Jan 12, 2022
A Quake Enhanced mod to manipulate entities. Inspired by the Half-Life metamod plugin 'Entmod'

QEEntmod A Quake Enhanced mod to manipulate entities. Inspired by the Half-Life metamod plugin 'Entmod' Can be used standalone or easily implemented i

Jul 5, 2022
Half-Life Singleplayer SDK 2.3, updated to compile with Visual Studio 2019. Provided as-is with no further support. See the README for more information.

Half Life 1 SDK LICENSE Half Life 1 SDK Copyright© Valve Corp. THIS DOCUMENT DESCRIBES A CONTRACT BETWEEN YOU AND VALVE CORPORATION (“Valve”). PLEASE

Apr 9, 2022
DOOM BSP renderer for ZenithOS.

Zenith DOOM This project ports the DOOM BSP renderer to Zenith for use in custom games. It includes a zos/ directory in src/ which has includes that e

Jun 10, 2021
A single-file GLTF loader with no dependencies.

mvImporter Basic Usage #define MV_IMPORTER_IMPLEMENTATION #include "mvImporter.h" int main() { mvGLTFModel gltfmodel = mvLoadGLTF("C/dev/Resource

Sep 24, 2022
Full Firmware Package for the STM32WB series: HAL+LL drivers, CMSIS, BSP, MW, plus a set of Projects

STM32Cube is an STMicroelectronics original initiative to ease developers' life by reducing efforts, time and cost.

Sep 18, 2022
A fantasy map generator based on Martin O'Leary's "Generating fantasy map" notes
A fantasy map generator based on Martin O'Leary's

Fantasy Map Generator This program is an implementation of a fantasy map generator written in C++ based on the methods described in Martin O'Leary's "

Sep 6, 2022
A lightweight C++14 parsing library for tmx map files created with the Tiled map editor

tmxlite Description A lightweight C++14 parsing library for tmx map files created with the Tiled map editor. Requires no external linking, all depende

Sep 10, 2022
The HarmonicExciter is based on a half wave clipper, allow to add harmonics to the source by mix them in.
The HarmonicExciter is based on a half wave clipper, allow to add harmonics to the source by mix them in.

HarmonicExciter.lv2 The HarmonicExciter is based on a half wave clipper, allow to add harmonics to the source by mix them in. Dependencys libcairo2-de

Jan 2, 2022
STM32Cube is an STMicroelectronics original initiative to ease the developers life by reducing efforts, time and cost.

STM32Cube covers the overall STM32 products portfolio. It includes a comprehensive embedded software platform (this repo), delivered for each series (such as the STM32CubeU5 for the STM32U5 series).

Sep 20, 2022