Skip to content

Commit

Permalink
Initial Release
Browse files Browse the repository at this point in the history
  • Loading branch information
snake-biscuits committed Sep 28, 2021
0 parents commit 3376f2f
Show file tree
Hide file tree
Showing 63 changed files with 8,042 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Python tests - core

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7, 3.8, 3.9]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest pytest-cov fake-bpy-module-2.93
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
pytest -vv --cov=bsp_tool
169 changes: 169 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,169 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# celery beat schedule file
celerybeat-schedule

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# Visual Studio Code
.vscode/

# Blender
.blend1
.blend2

# C++
# Prerequisites
*.d

# Compiled Object files
*.slo
*.lo
*.o
*.obj

# Precompiled Headers
*.gch
*.pch

# Compiled Dynamic libraries
*.so
*.dylib
*.dll

# Fortran module files
*.mod
*.smod

# Compiled Static libraries
*.lai
*.la
*.a
*.lib

# Executables
*.exe
*.out
*.app

# Other
*.blend[12]
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Changelog

# v1.0.0_b2.93 (~2021)
Initial Release
21 changes: 21 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2020 Jared Ketterer

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
95 changes: 95 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
# io_import_rbsp
Blender 2.93 importer for `rBSP` files (Titanfall Engine `.bsp`)


<!-- TODO: .gifs for guides -->
## Installation
* Get Blender 2.93+ from [Steam](https://store.steampowered.com/app/365670/Blender/) / [Blender.org](https://www.blender.org/download/)
* Head over to [releases](https://github.com/snake-biscuits/io_import_rbsp/releases/) & download `io_import_rbsp_v1.0.0_b2.93.zip`
Then, in Blender:
* `Edit > Preferences > Add-ons > Install`
* Find `io_import_rbsp_v1.0.0_b2.93.zip`
* Click `Install Addon`
* Check the box to enable `Import-Export: io_import_rbsp`


## Usage

> WARNING: Titanfall Engine maps are huge
> Imports can take multiple minutes and a few GB of RAM for the geometry alone
> Test a small map before loading Olympus and setting your PC on fire
### Extracting `.bsp`s
You will need to extract `.bsp`, `.bsp_lump` & `.ent` files for any map you want to extract. To do this:
* Grab a [Respawn VPK extractor](#Respawn-VPK)
* Locate the `.vpk`s for the game you want to work with (game must be installed)
- `Titanfall/vpk/`
- `Titanfall2/vpk/`
- `Apex Legends/vpk/`
* Open the `*.bsp.pak000_dir.vpk` for the map you want to load
- Titanfall 2 map names can be found here: [NoSkill Modding Wiki](https://noskill.gitbook.io/titanfall2/documentation/file-location/vpk-file-names)
- Lobbies are stored in `mp_common.bsp.pak000_dir.vpk`
* Extract the `.bsp`, `.ent`s & `.bsp_lumps` from the `maps/` folder to someplace you'll remember
- each `.vpk` holds assets for one `.bsp` (textures and models are stored elsewhere)
<!-- TODO: Materials & Models -->

### Blender Importer
Once you've extracted the files you need:
* `File > Import > Titanfall Engine .bsp`
* Select the `.bsp` (`.bsp_lump` & `.ent` files need to be in the same folder)
* Choose your settings
* Click Import
* Wait a few minutes (Can easily take 1hr+ on Apex Legends maps)
<!-- Cry when it breaks and send me an e-mail to fix it -->
<!-- Materials & Models will require paths set in Preferences & SourceIO -->


## Related Tools

### Respawn VPK
* [TitanfallVPKTool](https://github.com/p0358/TitanfallVPKTool)
- by `P0358`
* [UnoVPKTool](https://github.com/Unordinal/UnoVPKTool)
- by `Unordinal`
* [RSPNVPK](https://github.com/squidgyberries/RSPNVPK)
- Fork of `MrSteyk`'s Tool
* [Titanfall_VPKTool3.4_Portable](https://github.com/Wanty5883/Titanfall2/blob/master/tools/Titanfall_VPKTool3.4_Portable.zip)
- by `Cra0kalo` (currently Closed Source)

### Other
* [SourceIO](https://github.com/REDxEYE/SourceIO)
- GoldSrc & Source Engine importer (`.bsp`, `.vmt`, `.vtf`, `.mdl`)
* [SourceOps](https://github.com/bonjorno7/SourceOps)
- Source Engine model exporter
* [PyD3DBSP](https://github.com/mauserzjeh/PyD3DBSP) (Archived)
- Call of Duty 2 `.bsp` importer
* [blender_io_mesh_bsp](https://github.com/andyp123/blender_io_mesh_bsp)
- Quake 1 `.bsp` importer
* [Blender_BSP_Importer](https://github.com/QuakeTools/Blender_BSP_Importer)
- Quake 3 `.bsp` importer


## FAQs
* Why can't I see anything?
- Titanfall Engine maps are huge, you need to increase your view distance
- `3D View > N > View > Clip Start: 16, End: 51200`
- You will also need to increase the clipping distance for all cameras
* It broke? Help?
- Ask around on Discord, you might've missed a step someplace
- If you're loading a brand new Apex map, it might not be supported yet
* Can I use this to make custom maps?
- No, we don't know enough about Respawn's `.bsp` format to make compilers
- As easy as it might sound on paper, editing a `.bsp` directly is no small task
* Can I use this for animations?
- Sure! but be sure to credit the tool someplace
- And credit Respawn too! they made the maps in the first place

### Further Questions
I can be found on the following Titanfall related Discord Servers as `b!scuit#3659`:
* Titanfall 1: [TF Remnant Fleet](https://discord.gg/hKpQeJqdZR)
* Titanfall 2: [NoSkill Community](https://discord.gg/sEgmTKg)
* Apex Legends: [R5Reloaded](https://discord.com/invite/jqMkUdXrBr)
<!-- TODO: add Titanfall Online & Titanfall 2 Custom Servers when they go public -->

> NOTE: I am a fully time Uni Student in an Australian Timezone
> Don't go expecting an immediate response
7 changes: 7 additions & 0 deletions io_import_rbsp/TODOS.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
build script:
pack latest bsp_tool
strip out extensions
build blender addon .zip:
exclude build files & tests

disclaimers for steyk / dogecore involvement in apex material importing?
Loading

0 comments on commit 3376f2f

Please sign in to comment.