GithubHelp home page GithubHelp logo

rainbowredux / rainbowsixfileconverters Goto Github PK

View Code? Open in Web Editor NEW
13.0 4.0 5.0 452 KB

Convert data files from Rainbow Six and Rogue Spear to open formats.

License: MIT License

Python 100.00%
rainbow6 blender unreal rainbow-six modding unreal-engine python

rainbowsixfileconverters's Introduction

RainbowSixFileConverters

These collection of python scripts will allow you to extract data from Rainbow Six, Eagle Watch and Rogue Spear.

CodeFactor mypy

Discord

If you'd like to follow this project or help out, please join the discord channel at https://discord.gg/YygR4S8

Discussions of other projects related to older RSE games is also welcome.

Wiki

Currently the wiki is being filled out with information, make sure to check here for additional info. https://github.com/boristsr/RainbowSixFileConverters/wiki

Packages

This project consists of several python packages.

  • RainbowFileReaders - This package is dedicated to reading the Files from Rainbow Six, Rogue Spear and other Red Storm Entertainment games.
  • FileUtilities - This package consists of a few utility classes which are used in RainbowFileReaders
  • BlenderImporters - This package uses RainbowFileReaders to read files and then imports the data to Blender. Blender specific code resides here.

Requirements

RainbowFileReaders

  • Python 3.6 & newer
  • Pillow 5.0 is required for the RSB conversion utility

BlenderImporters

  • Blender 2.8

Notes on file formats and code

In almost all of the converters there are several fields which are unknown. These are stored in the classes as well as in the accompanying JSON files, and are labelled in ascending order, such as "unknown1". I've tried to account for later versions of the files even though i'm not focusing on those versions for this project, so these field names/numbers will still be taken into account.

For the avoidance of confusion, the shorthand abreviations and prefixes that are used in code are:

  • RSE - Red Storm Entertainment, shared data structures, or datastructures that can be conformed easily with a few variations between versions
  • R6 - Rainbow Six, Eagle Watch. The first game and mission pack in the series
  • RS - Rogue Spear, Urban Operations, (possibly Covert Ops Essentials). The second game in the series.

There are also prefixes for specific formats, like SOB, MAP, etc. These match the file extension of the file types that these datastructures appear in.

If a datastructure is specific to game version, but used in many files, it will contain a game prefix. If it's specific to a file type, it will contain a type prefix. If it is specific to a game and filetype, it will contain both.

[GamePrefix][FiletypePrefix]DataStructure

Status of specific formats

Please refer to the wiki

Usage

Commandline

I highly recommend the use of virtualenvwrapper.

Currently the gamepath is defined in settings.json. Most of the tools should reference this.

paths = []
paths.append("../Data/Test")

To setup the environment and run the scripts, run the following commands

mkvirtualenv -p python3 rainbow
workon rainbow
pip install pillow
python RSBtoPNGConverter.py
python SOBtoOBJConverter.py

List of provided commandline tools

  • MapConverter.py - Reads all maps and writes a plain text JSON to show the data in the file. Useful for learning the structure of maps.
  • RSBPNGCacheGenerator.py - Converts all RSBs to PNGs, with the suffix .CACHE.PNG. References the relevant CXP files to apply the alpha key. Single Threaded.
  • RSBtoPNGConverter.py - Converts all RSBs to PNGs. Does not reference CXP file, so no alpha keys are converted. Writes meta data to a JSON file beside the PNG. Uses multiprocessing.
  • SOBtoOBJConverter.py - Converts SOB files to OBJ files. OBJ doesn't support all data, so some data is lost in the process.
  • gameLoadTest.py - Uses RSEGameLoader to load a game and list missions. Will be expanded to test loading mods as well.

Blender Usage

Coming soon. It's a bit hacky at the moment and the tools need a bit of love as Unreal has been the focus recently. If you would like some help with these, please file an issue or jump on discord and I'll help you out.

Special Thanks

This project is made much easier thanks to the information published by Alexander Evdokimov (https://github.com/AlexKimov), at https://github.com/AlexKimov/RSE-file-formats.

rainbowsixfileconverters's People

Contributors

boristsr avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

rainbowsixfileconverters's Issues

Improve collision

  • Enable "gunpass" for masked material in Rainbow Six maps
  • Setup maps to use Floor and Floor45 flags as player collision
  • Work through visibility trace collision settings.

Read SHT files

  • These seem to be dynamically generated perhaps? They contain paths from local installs for textures.

Add a game loader that can:

  • list maps/missions and other assets on demand
  • Load resources on demand
  • Store relevant settings that can be passed to loaders to help with resource loading

R6MAP: Fix lighting

  • Identify purposes of all unknown variables.
  • Will use RS research to go back and compare values/ranges and finalise these values

Create test datapack.

  1. Create a datapack, containing assets from Rainbow Six, but strip everything so it's not a full game.
  2. Modify jenkinsfile + github actions script to download this pack as a step.
  3. Add unittest to github actions

This will remove the need for windows/linux path differences and allow more flexibility in test deployment.

Turn R6Constants.RSEGeometryFlags into a datatype

It should be a first class object, rather than just a class with static methods and constants. This should be an object that gets initialized with an int, and allows developers to access members directly, rather than just a dict.

Implement logic to prevent walking off ledges

Use the CharacterMovement controller in UE4 to walk on just GF_FLOOR and GF_FLOOR45 surfaces. This can ensure no walking off ledges by blocking walking off ledges over a certain height

R6 MAPS: Room support

  • Setup Room Detection in Unreal
  • Setup Room Toggling in Unreal
  • Display Level
  • Display Room
  • Display ShermanLevel
  • Display Rooms
  • Remember previous room when not "in" room
  • Disable Rooms when not visible

Identify room and level data and how it can be used in UE4

  • Identify Level definitions
  • Identify room definitions
  • Identify portal definitions

Implement Nightvision Effect

Night vision effect

  • Noise effect
  • Improved & animated noise
  • Green effect
  • Black fog
  • Brighten level
  • Improve fog accuracy compared to original game

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.