{"id":13696906,"url":"https://github.com/measuredweighed/BSP2OBJ","last_synced_at":"2025-05-03T17:32:31.301Z","repository":{"id":57416487,"uuid":"105670051","full_name":"measuredweighed/BSP2OBJ","owner":"measuredweighed","description":"🎮 BSP2OBJ is a command-line utility capable of converting Quake, Quake 2, Daikatana, Hexen 2, Kingpin and Half-Life map files into OBJ meshes","archived":false,"fork":false,"pushed_at":"2022-12-28T21:35:34.000Z","size":1426,"stargazers_count":47,"open_issues_count":2,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-13T03:03:16.393Z","etag":null,"topics":["daikatana","half-life","hexen2","modelling","pak","pak-files","quake","quake2"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/measuredweighed.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-10-03T15:41:50.000Z","updated_at":"2024-10-27T03:29:00.000Z","dependencies_parsed_at":"2023-01-31T07:31:00.450Z","dependency_job_id":null,"html_url":"https://github.com/measuredweighed/BSP2OBJ","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/measuredweighed%2FBSP2OBJ","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/measuredweighed%2FBSP2OBJ/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/measuredweighed%2FBSP2OBJ/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/measuredweighed%2FBSP2OBJ/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/measuredweighed","download_url":"https://codeload.github.com/measuredweighed/BSP2OBJ/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252226876,"owners_count":21714888,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["daikatana","half-life","hexen2","modelling","pak","pak-files","quake","quake2"],"created_at":"2024-08-02T18:00:49.646Z","updated_at":"2025-05-03T17:32:30.922Z","avatar_url":"https://github.com/measuredweighed.png","language":"Python","funding_links":[],"categories":["Mapping"],"sub_categories":["QuakeWorld"],"readme":"![BSP2OBJ](logo.png)\n\nBSP2OBJ is a Python module and command-line utility that is capable of converting BSP map files into OBJ/MTL files (with accompanying PNG textures). It comes with support for Quake, Quake 2 and Half-Life maps.\n\n## Installation\n\nThe easiest way to install BSP2OBJ is to simply use `pip` like so:\n\n```\npip install bsp2obj\n```\n\nThe installation process should create an easily accessible `bsp2obj` command-line utility.\n\n## Using the command-line utility\n\n### Exporting Quake/Quake 2 maps:\nBoth Quake and Quake 2 store map and other associated metadata within PAK files. As such, you'll need to let BSP2OBJ know the target PAK file with the `-p` argument. Additionally, you'll also need to pass along the path of the colour palette within the PAK file to ensure texture data is decoded correctly. This can be done using the `-c` argument.\n\nHere's how to extract the starting level of Quake 1:\n```\nbsp2obj -g q1 -o q1_start -p Q1.PAK -m maps/start.bsp -c gfx/palette.lmp\n```\n\nAnd heres how you'd extra the first demo level from Quake 2:\n```\nbsp2obj -g q2 -o q2_demo1 -p Q2.PAK -m maps/demo1.bsp -c pics/colormap.pcx\n```\n\n### Exporting a Half-Life map:\nHalf-Life differed slightly from Quake and Quake 2 by ditching the use of PAK files and opting to instead store textures and other metadata in the file system. As a result, you can omit the `-p` argument in this case, and instead pass absolute paths to the required `.bsp` and `.lmp` palette files.\n\nHere's how I went about extracting the first level of Half-Life from my Steam library on macOS:\n```\nbsp2obj -g hl1 -o hl_c1a0 -m /Users/measuredweighed/Library/Application\\ Support/Steam/steamapps/common/Half-Life/valve/maps/c1a0.bsp -c /Users/measuredweighed/Library/Application\\ Support/Steam/steamapps/common/Half-Life/valve/gfx/palette.lmp\n```\n\n### Exporting or listing PAK contents\nYou may provide the optional argument `-e` to export files contained within a PAK file that match a given regular expression. As an example, one could dump all of the `.bsp` files in a PAK file like so:\n```\nbsp2obj -g q2 -p Q2.PAK -e \".bsp\"\n```\n\nAlternatively, if you provide a pattern of `*` every file will be exported:\n```\nbsp2obj -g q2 -p Q2.PAK -e \"*\"\n```\n\nIf you'd prefer to list files within a PAK, swap the `-e` flag for `-l`","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeasuredweighed%2FBSP2OBJ","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmeasuredweighed%2FBSP2OBJ","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeasuredweighed%2FBSP2OBJ/lists"}