Giter Club home page Giter Club logo

starrailmotioncapture's Introduction

StarRailMotionCapture

Motion capture for the character models of Honkai: Star Rail base on Unity and MediaPipe.

Currently face only.

example

Known limitations

  • Face capture only supports character models with facial skeleton, e.g., the models ripped directly from StarRail.

Protocol

Protocols between the server and the client are written in protobuf and compiled using my customized version of protoc.

Server

Developed with Python 3.10.

It captures motion data using your webcam or from a video file and sends them to clients.

Setup

All the requirements are listed in Server/requirements.txt.

Enter the Server folder and create a virtual environment. Then, run the command below.

pip install -r requirements.txt

Edit config

Edit Server/src/config.py.

Start the server

Run Server/src/main.py.

Client

Developed with Unity 2022.3.

Requirements

Setup

  1. Prepare a character model in the scene.

  2. Prepare a blend shape asset to drive the character's facial expression.

    If you are using a datamined model, after setting its Scale Factor to 150 in the Import Settings, you can directly use the blend shape asset in the Client/BlendShapes folder.

    To create a custom blend shape asset, please read the 'Create custom blend shape asset' section.

  3. Add a Motion Actor (Game Model) component to your character.

    setup-model

  4. Add a UDP Session component to the scene and set the server's address and port. Then, drag your actors onto Actors field.

    setup-session

Run the client

Simply enter play mode in your Unity editor.

Create custom blend shape asset

  1. Create asset using context menu.

    create-bs-asset

  2. Double click the asset to open the editor. Assign the face renderer of the character to Debug Skinned Mesh Renderer.

    blend-shape-editor

  3. This editor supports Record/Preview mode like Unity's AnimationWindow, so you can use it as if you were using AnimationWindow.

  4. Use the tools to increase efficiency.

    blend-shape-editor-tools

starrailmotioncapture's People

Contributors

stalomeow avatar

Stargazers

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

Watchers

 avatar  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.