Giter Site home page Giter Site logo

rasteve / bs2source2 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from markmeltzer/bs2source2

0.0 0.0 0.0 1.22 MB

A script to automatically convert assets extracted from the game Bioshock to assets usable by the Source 2 game engine.

Python 100.00%

bs2source2's Introduction

Description

This script converts Bioshock assets extracted using Umodel by Gildor to assets usable by the Half Life: Alyx workshop tools. It uses the PSK Import addon for Blender by Befzz to convert the PSKX files to FBX files, the PSKX files to create VMDL files, the extracted .prop.txt files to create VMAT files as well as copying the proper textures/texture channels and meshes to the mod content folder. For the materials it currently supports, diffuse textures, normal maps, opacity maps and emmisive textures.

See the following link for a demonstration: https://youtu.be/_TiCz_8QooM

Requirements:

How to use

Extracting assets:

  1. Put the umodel.exe and SDL2.dll files in the Bioshock root directory (for example: C:\SteamLibrary\steamapps\common\Bioshock).
  2. Run umodel.exe.
  3. Click ok and wait for the next window to open.
  4. In the Package window select Content->Maps in the left pane and select from which map you want to export the assets in the right pane. Click Export.
  5. Check Use object groups instead of types and set Texture format to TGA (uncompressed). Here you can also set which folder you want to export the assets to. Click ok to start the export.

Converting the assets to Source 2:

  1. Download the files of this repository and extract them anywhere.
  2. Open a commandline window where you extracted the files and run the following command: python3 autoconvert.py "ASSET ROOT" "MOD CONTENT ROOT" where "ASSET ROOT" is the folder containing assets or subfolders containing the assets (by default this would be some path/UmodelExport) and "MOD CONTENT ROOT" is the root folder of the content folder of your mod (for example: G:\SteamLibrary\steamapps\common\Half-Life Alyx\content\hlvr_addons\my_cool_mod). Both should be enclosed in quotation marks.
  3. The source 2 tools will compile the assets when trying to show them in the asset viewer. So looking at all the assets at once in the asset viewer will cause your PC to slow down or the source 2 tools to crash. Either slowly scroll through the assets in the asset browser or simply search for the once you want to use. Once the assets have been compiled, all is dandy.

Notes:

  • When a model seems to kind of show through itself, open the corresponding material and swap translucency for alpha check.
  • Add "PhysicsHullFile" and use the mesh fbx and import scale 0.0043 in ModelDoc to add collision to the models.
  • Generally tweak the materials of the models to make them look better(for example, play around with metallness and roughness).

Known bugs/Todo:

  • automatically figure out wether to use translucency or alpha check (this currently causes some models to show through themselves)
  • automatically add hulls to vmdls
  • add options to not overwrite existing files (should speed up the whole process when converting the assets of multiple levels, since a lot of assets are duplicated across levels)
  • add options to only to part of the conversion (creating vmats, copying textures, creating vmdls, converting meshes)

bs2source2's People

Contributors

markmeltzer avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.